Page MenuHomeFreeBSD

vm_map: overlap system map mutex and user man sx
ClosedPublic

Authored by kib on Dec 5 2024, 11:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 5, 8:52 PM
Unknown Object (File)
Sun, Jan 5, 1:41 AM
Unknown Object (File)
Mon, Dec 30, 2:38 PM
Unknown Object (File)
Fri, Dec 27, 10:41 AM
Unknown Object (File)
Fri, Dec 27, 10:01 AM
Unknown Object (File)
Fri, Dec 27, 4:38 AM
Unknown Object (File)
Fri, Dec 27, 3:32 AM
Unknown Object (File)
Dec 11 2024, 5:22 PM
Subscribers

Diff Detail

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

Event Timeline

kib requested review of this revision.Dec 5 2024, 11:02 PM

My comments are just suggestions.

sys/vm/vm_map.c
296

Maybe explicitly set map->system_map = false here, just for clarity.

sys/vm/vm_map.h
214

Should we change the system_map type to bool?

488–489

As a matter of style, I'd prefer a separate vm_map_init_system() rather than having a naked boolean parameter.

This revision is now accepted and ready to land.Dec 6 2024, 2:30 PM
kib marked 3 inline comments as done.Dec 7 2024, 12:00 AM
kib added inline comments.
sys/vm/vm_map.c
296

I added a comment to memset() above. IMO assigning the field twice is not needed. More, I would ask myself question why this is done.

sys/vm/vm_map.h
214

I consider moving it to flag in the next proposed change. In fact, lets add it to this review.

kib marked 2 inline comments as done.

Add wrapper map_is_system_map().
Convert system_map and needs_wakeup to flags.

This revision now requires review to proceed.Dec 7 2024, 12:04 AM
sys/vm/vm_map.h
78

Do we still use this?

282

vm_map_is_system() would be, IMHO, more stylistically consistent, and 1 character shorter. :-) Otherwise, I'm supportive of this change.

kib marked 2 inline comments as done.

vm_map_is_system()
Remove vm_flags_t
Some updates to vm_map(9)

This revision is now accepted and ready to land.Dec 8 2024, 9:06 AM