diff options
author | dillon <dillon@FreeBSD.org> | 2002-06-19 09:39:41 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2002-06-19 09:39:41 +0000 |
commit | 7aa1bb9d056544a059b4be0616b86179bc88e108 (patch) | |
tree | 82e8afa76d01b565de9d16bba1f66d0f11988324 /usr.bin/printf | |
parent | 80af7bc382685a69865e5f3cf600e8f8efb39dd1 (diff) | |
download | FreeBSD-src-7aa1bb9d056544a059b4be0616b86179bc88e108.zip FreeBSD-src-7aa1bb9d056544a059b4be0616b86179bc88e108.tar.gz |
In rev 1.72 a situation related to write/mmap was fixed which could result
in a user process gaining visibility into the 'old' contents of a filesystem
block. There were two cases: (1) when uiomove() fails (user process issues
illegal write), and (2) when uiomove() overlaps a mmap() of the same file at
the same offset (fault -> recursive buffer I/O reads contents of old block).
Unfortunately 1.72 also had the unintended effect of forcing the filesystem
to do a read-before-write in the case of a full-block-write (non append case),
e.g. 'dd if=/dev/zero of=test.dat bs=1m count=256 conv=notrunc'. This
destroys performance.. not only is a read forced for every write, but
clustering breaks as well.
The solution is to clear the buffer manually in the full-block case rather
then asking BALLOC to do it (BALLOC issues the read-before-write). In the
partial-block case we want BALLOC to do it because the read-before-write
is necessary. This patch should greatly improve database and news-feed
server performance.
Found by: MKI <mki@mozone.net>
MFC after: 3 days
Diffstat (limited to 'usr.bin/printf')
0 files changed, 0 insertions, 0 deletions