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)
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
Unknown Object (File)
May 4 2023, 12:38 AM
Unknown Object (File)
Jan 20 2023, 4:48 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/vm/swap_pager.c
1657 ↗(On Diff #58336)

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

1673 ↗(On Diff #58336)

Another duplicate wakeup.

1738 ↗(On Diff #58336)

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 ↗(On Diff #58350)

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.