diff options
author | ivoras <ivoras@FreeBSD.org> | 2008-10-30 14:05:57 +0000 |
---|---|---|
committer | ivoras <ivoras@FreeBSD.org> | 2008-10-30 14:05:57 +0000 |
commit | 1f332d86bf5e4cfc63df682d8859c4f4fac21026 (patch) | |
tree | 346118ee48560d0625d63c6017022305731d9dd9 /sys/dev/adb/adbvar.h | |
parent | fbca48f8d5b2e879565c548e81b7c3da7d1b36dc (diff) | |
download | FreeBSD-src-1f332d86bf5e4cfc63df682d8859c4f4fac21026.zip FreeBSD-src-1f332d86bf5e4cfc63df682d8859c4f4fac21026.tar.gz |
Teach cat(1) and cp(1) to use a larger buffer if enough memory is present
in the system. A simple heuristics is used to detect what is "enough"
memory: if number of physmem pages is greater than 32k (equalling 128 MB
on machines with 4 kB pages).
Typical immediate result of these changes is reduction in context switches
and the goal is to increase efficiency by using large buffers:
before: /usr/bin/time -hlp cat file1 > file2
...
163 voluntary context switches
11194 involuntary context switches
after: /usr/bin/time -hlp ./cat file1 > file2
...
417 voluntary context switches
272 involuntary context switches
Reviewed by: hackers@ (no objections to earlier version of cat patch)
Approved by: gnn (mentor)
MFC after: 4 months
Diffstat (limited to 'sys/dev/adb/adbvar.h')
0 files changed, 0 insertions, 0 deletions