diff options
author | emaste <emaste@FreeBSD.org> | 2015-07-07 02:17:24 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-07-07 02:17:24 +0000 |
commit | 46c04bda4200a90700782ef64c0b3b57fd5f7692 (patch) | |
tree | 1496fb0b37cb346cf2aa62cf10189cbaa16df607 /sys/ddb/db_watch.h | |
parent | a060063a487e71aee85b154308b20e3c3d050c54 (diff) | |
download | FreeBSD-src-46c04bda4200a90700782ef64c0b3b57fd5f7692.zip FreeBSD-src-46c04bda4200a90700782ef64c0b3b57fd5f7692.tar.gz |
MFC r284928: speed up ar(1) on UFS file systems
Fault in the buffer prior to writing to workaround poor performance due
to interaction with kernel fs deadlock avoidance code. See the comment
prior to vn_io_fault_doio() in sys/kern/vfs_vnops.c for details of the
issue.
On my stable/10 desktop with a 16MB obj.o and "ar r out.a obj.o" I see
the following run times (seconds):
x ar.r284891
+ ar.patched
+----------------------------------------------------------------------+
|+ |
|+ x|
|+ xx|
|A |A|
+----------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 3 1.307 1.321 1.315 1.3143333 0.0070237692
+ 3 0.020 0.023 0.022 0.021666667 0.0015275252
Difference at 95.0% confidence
-1.29267 +/- 0.0115203
-98.3515% +/- 0.876513%
(Student's t, pooled s = 0.00508265)
Thanks to kib for diagnosing and explaining the issue and suggesting
the workaround.
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/ddb/db_watch.h')
0 files changed, 0 insertions, 0 deletions