The return value now gives the number of pages (starting at the
requested pindex) returned. This lets sendfile() use vm_page_grab_pages(),
which is marginally more cache-friendly.
Details
Details
I tried this patch with a simple benchmark that uses an AF_UNIX
stream socket pair to simulate a sendfile() to /dev/null. Throughput
goes up by about 1.5% when sending a large (8GB) memory-resident
file.
Edit: I had previous claimed a larger improvement, but had accidentally
been testing with the patch from D11943 applied as well.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/vm/vm_page.c | ||
---|---|---|
3181 ↗ | (On Diff #31839) | I would suggest the phrase "partial prefix". I think it conveys more information. |
Comment Actions
Brett, I added you to this change, because it will decrease the time spent in vm_radix_lookup() by your shm_open()/sendfile() test case.