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)
Sat, Jan 31, 2:26 AM
Unknown Object (File)
Sun, Jan 25, 1:10 PM
Unknown Object (File)
Sat, Jan 24, 11:24 PM
Unknown Object (File)
Sat, Jan 24, 5:06 PM
Unknown Object (File)
Wed, Jan 21, 2:26 AM
Unknown Object (File)
Jan 1 2026, 6:23 PM
Unknown Object (File)
Dec 28 2025, 8:52 PM
Unknown Object (File)
Nov 26 2025, 12:14 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