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
F107297441: D35786.diff
Sun, Jan 12, 4:06 AM
F107291942: D35786.diff
Sun, Jan 12, 2:19 AM
Unknown Object (File)
Wed, Jan 1, 1:06 PM
Unknown Object (File)
Sat, Dec 28, 4:17 PM
Unknown Object (File)
Oct 4 2024, 12:26 AM
Unknown Object (File)
Oct 2 2024, 7:11 AM
Unknown Object (File)
Sep 30 2024, 9:42 PM
Unknown Object (File)
Sep 30 2024, 7:39 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 46432
Build 43321: 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
2117

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