Page MenuHomeFreeBSD

vm_page: Drop handling of VM_ALLOC_NOOBJ in vm_page_alloc_contig_domain()
ClosedPublic

Authored by markj on Sep 21 2021, 2:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 27, 6:23 AM
Unknown Object (File)
Mon, Mar 4, 4:10 AM
Unknown Object (File)
Mon, Mar 4, 4:10 AM
Unknown Object (File)
Mon, Mar 4, 4:09 AM
Unknown Object (File)
Mon, Mar 4, 4:09 AM
Unknown Object (File)
Mon, Mar 4, 4:09 AM
Unknown Object (File)
Sun, Mar 3, 1:24 AM
Unknown Object (File)
Sun, Mar 3, 1:24 AM
Subscribers

Details

Summary

As in vm_page_alloc_domain_after(), unconditionally preserve PG_ZERO.

Implement vm_page_alloc_noobj_contig_domain().

MFC after: never

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41623
Build 38512: arc lint + arc unit

Event Timeline

markj requested review of this revision.Sep 21 2021, 2:44 AM

Call vm_page_alloc_check() and vm_page_alloc_dequeue() in the right order.

This revision is now accepted and ready to land.Sep 21 2021, 12:42 PM

Add assertions to exclude all unexpected flags.

This revision now requires review to proceed.Sep 21 2021, 3:14 PM
This revision is now accepted and ready to land.Sep 22 2021, 3:25 PM
sys/vm/vm_page.c
2575

Missing a conditional pmap_page_set_memattr() call here.

I'm unclear on whether the conditional pmap_page_set_memattr() call was added.

Update mappings of the returned pages if memattr != VM_MEMATTR_DEFAULT.

This revision now requires review to proceed.Oct 17 2021, 8:50 PM
sys/vm/vm_page.c
2576–2577

Since this function only applies to ordinary (DRAM) memory, I would do the zeroing before changing the memattr. Until we return from this function, the pages are not yet being shared with whatever device might have led us to, for example, make the pages uncacheable.

Zero newly allocated pages before updating the direct map.

sys/vm/vm_page.c
2576–2577

I'd forgotten that pmap_page_set_memattr() flushes caches, otherwise it would seem incorrect in general to zero the page first. Maybe this deserves a comment.

sys/vm/vm_page.c
2576–2577

Yes, this deserves a comment.

markj marked an inline comment as done.

Explain why we zero the page before setting a memory attribute.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 20 2021, 1:23 AM
This revision was automatically updated to reflect the committed changes.