Page MenuHomeFreeBSD

swap_pager: Unbusy readahead pages after an I/O error
ClosedPublic

Authored by markj on Apr 5 2024, 7:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 6:23 AM
Unknown Object (File)
Tue, Oct 22, 6:22 AM
Unknown Object (File)
Tue, Oct 22, 6:22 AM
Unknown Object (File)
Tue, Oct 22, 6:22 AM
Unknown Object (File)
Tue, Oct 22, 6:17 AM
Unknown Object (File)
Oct 2 2024, 4:29 AM
Unknown Object (File)
Sep 24 2024, 9:23 AM
Unknown Object (File)
Sep 24 2024, 5:48 AM
Subscribers

Details

Summary

The swap pager itself allocates readahead pages, so should take care to
unbusy them after a read error, just as it does in the non-error case.

PR: 277538

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 56929
Build 53817: arc lint + arc unit

Event Timeline

markj requested review of this revision.Apr 5 2024, 7:16 PM
sys/vm/swap_pager.c
1689

Then why leave invalid pages on the object queue?
More, moving invalid pages to inactive queue does not sound right.

sys/vm/swap_pager.c
1689

I think it's possible in principle for the page to be wired. So, the code needs to look like this:

if (!vm_page_wired(m) || vm_page_remove(m))
        vm_page_free(m);

It seemed more straightforward to just release the page to the head of the inactive queue (_noreuse) in this rare case. There is no problem with having invalid pages on the inactive queue.

sys/vm/swap_pager.c
1689

There is vm_page_free_invalid()

markj marked an inline comment as done.

Use vm_page_free_invalid().

This revision is now accepted and ready to land.Apr 5 2024, 9:27 PM