Page MenuHomeFreeBSD

Remove the VM map zone.

Authored by markj on Aug 13 2020, 4:36 AM.



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

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

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

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.
220 ↗(On Diff #75826)

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

226–227 ↗(On Diff #75826)

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

882–883 ↗(On Diff #75826)

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.

247 ↗(On Diff #75857)

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.