Page MenuHomeFreeBSD

swap_pager: Removing handling for objects with OBJ_SWAP clear
ClosedPublic

Authored by markj on Jul 12 2022, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 20, 11:43 PM
Unknown Object (File)
Fri, May 10, 12:34 PM
Unknown Object (File)
Fri, May 10, 4:23 AM
Unknown Object (File)
Fri, May 10, 4:23 AM
Unknown Object (File)
Fri, May 10, 4:23 AM
Unknown Object (File)
Thu, May 9, 7:14 PM
Unknown Object (File)
Mon, Apr 29, 12:25 PM
Unknown Object (File)
Mar 21 2024, 7:08 PM
Subscribers

Details

Summary

With the removal of OBJT_DEFAULT, we can assume that pager operations
provide an object with OBJ_SWAP set. Also, we do not need to convert
objects from type OBJT_DEFAULT. Thus, remove checks for OBJ_SWAP and
remove code which modifies the object type.

No functional change intended.

Diff Detail

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

Event Timeline

markj requested review of this revision.Jul 12 2022, 4:22 PM
This revision is now accepted and ready to land.Jul 12 2022, 4:50 PM
sys/vm/swap_pager.c
2060

Currently, when we create an OBJT_DEFAULT object with vm_object_allocate_anon() and convert it to a swap object, writemappings is initialized here. After this change, writemappings will no longer be initialized for OBJT_SWAP objects created by vm_object_allocate_anon().

markj added inline comments.
sys/vm/swap_pager.c
2060

I added the initialization to _vm_object_allocate() in D35785.

sys/vm/swap_pager.c
2114

if (count == 0 || pctrie_is_empty(&srcobject->un_pager.swp.swp_blks)) ?

2235

if (pctrie_is_empty(&object->un_pager.swp.swp_blks))

return;  ?
alc added inline comments.
sys/vm/swap_pager.c
1798
if (pctrie_is_empty(&object->un_pager.swp.swp_blks))
2299
if (pctrie_is_empty(&object->un_pager.swp.swp_blks))

here too.

markj marked 5 inline comments as done.

Replace some removed OBJ_SWAP checks with checks for empty swap block trees.

This revision now requires review to proceed.Jul 14 2022, 2:14 PM
This revision is now accepted and ready to land.Jul 14 2022, 4:42 PM