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)
Thu, May 9, 1:48 PM
Unknown Object (File)
Sat, May 4, 8:17 PM
Unknown Object (File)
Fri, Apr 26, 4:47 AM
Unknown Object (File)
Apr 11 2024, 7:20 PM
Unknown Object (File)
Apr 8 2024, 8:20 PM
Unknown Object (File)
Apr 8 2024, 4:10 PM
Unknown Object (File)
Apr 8 2024, 1:27 PM
Unknown Object (File)
Apr 8 2024, 8: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 Not Applicable
Unit
Tests Not Applicable

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