Page MenuHomeFreeBSD

Break down swap_pager_swapoff function into small functions.
ClosedPublic

Authored by ota_j.email.ne.jp on Jun 7 2019, 1:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 20, 11:01 PM
Unknown Object (File)
Thu, Jan 16, 6:57 PM
Unknown Object (File)
Wed, Dec 25, 10:54 AM
Unknown Object (File)
Nov 23 2024, 10:34 AM
Unknown Object (File)
Nov 18 2024, 3:54 AM
Unknown Object (File)
Nov 16 2024, 2:47 AM
Unknown Object (File)
Nov 14 2024, 8:07 AM
Unknown Object (File)
Nov 13 2024, 9:42 PM
Subscribers

Details

Summary

Originally in D13484.
Simpler code refactoring is taken out from sensitive changes.

swp_pager_force_dirty() and swp_pager_force_launder() out of swp_pager_force_pagein().
swap_pager_swapoff_object() out of swap_pager_swapoff()

Test Plan

Regresssion - no functionality changes.

Diff Detail

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

Event Timeline

sys/vm/swap_pager.c
1657

This is an extra wakeup, after the wakeup in the caller.

1673

Another duplicate wakeup.

1736

No need to wrap this line to fit in 80 columns.

Move vm_object_pip_wakeup() and vm_pager_page_unswapped() back to swp_pager_force_pagein().

These 2 functions will be adjusted to handle multiple pages in D13484.

This revision is now accepted and ready to land.Jun 8 2019, 4:44 PM
kib added inline comments.
sys/vm/swap_pager.c
1736

I believe that the patch is fine, but looking at it, I realized that swp_pager_force_pagein()->swap_pager_getpages() drops vm_object lock, which IMO allows sb to become invalid pointer. And even the busy state of the page around the unlock is not enough IIMO.

This revision was automatically updated to reflect the committed changes.