Page MenuHomeFreeBSD

Remove the VM map zone.
ClosedPublic

Authored by markj on Aug 13 2020, 4:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 7 2024, 1:55 AM
Unknown Object (File)
Jan 7 2024, 1:55 AM
Unknown Object (File)
Jan 7 2024, 1:55 AM
Unknown Object (File)
Jan 7 2024, 1:55 AM
Unknown Object (File)
Dec 23 2023, 3:30 AM
Unknown Object (File)
Dec 18 2023, 5:05 AM
Unknown Object (File)
Dec 8 2023, 11:10 PM
Unknown Object (File)
Sep 14 2023, 3:42 AM
Subscribers

Details

Summary

It is only used to allocate the kernel map, and the exec and pipe
submaps. Rename kmem_suballoc() to kmem_subinit(), and remove
vm_map_create().

Rename the pipe_map field of struct pipe to avoid conflicting with the
macro. I think pipe_pages is a better name since the structure really
only tracks the wired sources pages used during a direct write, not a
mapping itself.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32977
Build 30369: arc lint + arc unit

Event Timeline

markj requested review of this revision.Aug 13 2020, 4:36 AM
markj created this revision.

Please commit sys_pipe.c rename in advance.

This revision is now accepted and ready to land.Aug 13 2020, 12:31 PM

Fold vm_map_zdtor() into vmspace_zdtor().

This revision now requires review to proceed.Aug 13 2020, 3:38 PM

I agree with Kostik. Please go ahead and commit the pipe changes.

Rebase, drop pipe changes.

This revision is now accepted and ready to land.Aug 14 2020, 5:15 PM
alc added inline comments.
sys/vm/vm_map.c
220

This redundant because the very first thing done by vm_map_zinit() is memset(map, 0, ...

226–227

Much like the dtor, vm_map_zinit() could be folded into vmspace_zinit().

sys/vm/vm_map.c
882–883

Curiously, the lock descriptions are slightly different here than in vm_map_zinit(). I don't recall any reason for this difference.

  • Address feedback.
  • Harmonize lock names, since they also appear in the pre-defined lock order lists in subr_witness.c.
This revision now requires review to proceed.Aug 15 2020, 4:30 PM

Just an observation, not a request for further changes: I think that we could do better in terms of exploiting type stability on allocation of a vmspace. For example, I don't see why we explicitly set the vm_map's pmap field to NULL on deallocation and reinitialize it on allocation. Although the type of pmap may change on amd64 when recycling a vmspace, the vm_map will always be using the same storage for the pmap. Similarly, fields such as root, header.left, and header.right shouldn't require reinitialization.

sys/vm/vm_map.c
256

This comment is out-of-date. We explicitly pass pmap_pinit() and never NULL.

This revision is now accepted and ready to land.Aug 15 2020, 7:39 PM
This revision was automatically updated to reflect the committed changes.