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
F81996542: D20545.id.diff
Wed, Apr 24, 7:51 AM
Unknown Object (File)
Fri, Mar 29, 11:33 AM
Unknown Object (File)
Dec 20 2023, 8:27 AM
Unknown Object (File)
Dec 13 2023, 2:55 PM
Unknown Object (File)
Nov 1 2023, 10:26 PM
Unknown Object (File)
Aug 28 2023, 5:54 PM
Unknown Object (File)
Aug 15 2023, 5:50 AM
Unknown Object (File)
Jul 31 2023, 9:13 AM
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.