Page MenuHomeFreeBSD

vm_page: define partial page invalidate
ClosedPublic

Authored by dougm on Fri, Feb 21, 5:40 PM.
Tags
None
Referenced Files
F110725619: D49096.id151318.diff
Sat, Feb 22, 9:18 AM
F110717981: D49096.id.diff
Sat, Feb 22, 7:06 AM
F110714352: D49096.id151320.diff
Sat, Feb 22, 5:55 AM
F110701286: D49096.id151302.diff
Sat, Feb 22, 1:57 AM
F110700786: D49096.id151315.diff
Sat, Feb 22, 1:49 AM
F110698036: D49096.diff
Sat, Feb 22, 1:03 AM
F110684643: D49096.diff
Fri, Feb 21, 9:17 PM
F110684330: D49096.diff
Fri, Feb 21, 9:12 PM
Subscribers

Details

Summary

Two different functions in different files do the same thing - fill a partial page with zeroes. Add that functionality to vm_page.c and remove it elsewhere to avoid code duplication.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dougm requested review of this revision.Fri, Feb 21, 5:40 PM
This revision is now accepted and ready to land.Fri, Feb 21, 7:43 PM
sys/vm/vm_page.c
5090

I'd suggest noting that this function may temporarily drop the object lock.

5093

This name is somewhat strange. From the VM's perspective it's not invalidating the page (which normally would involve clearing bits from the page's valid mask), it's just zeroing a region of it. It's the tmpfs and shm objects that are being invalidated.

I'd suggest vm_page_grab_zero_partial() or something like that.

5130

I believe most of this function could be replaced by vm_page_grab_valid(&m, object, pindex, VM_PAGE_ALLOC_WAITOK);

This revision was automatically updated to reflect the committed changes.
dougm marked 2 inline comments as done.

Accept some suggestions from @markj.

sys/vm/vm_page.c
5130

When I recognize that, I'll be happy to make a change to exploit it, but I don't right now.

markj added inline comments.
sys/vm/vm_page.c
5090
5130

Sorry, you're right that it's not quite the right fit.

This revision is now accepted and ready to land.Sat, Feb 22, 12:34 AM
This revision was automatically updated to reflect the committed changes.