Page MenuHomeFreeBSD

Improve error reporting in swap_pager
ClosedPublic

Authored by trasz on Mar 25 2019, 11:39 AM.
Tags
None
Referenced Files
F101311708: D19699.id55421.diff
Sun, Oct 27, 3:21 PM
F101309667: D19699.id55467.diff
Sun, Oct 27, 2:29 PM
F101305159: D19699.diff
Sun, Oct 27, 12:47 PM
Unknown Object (File)
Wed, Oct 16, 7:41 AM
Unknown Object (File)
Mon, Oct 14, 7:26 PM
Unknown Object (File)
Mon, Oct 14, 9:58 AM
Unknown Object (File)
Fri, Oct 11, 2:11 PM
Unknown Object (File)
Wed, Oct 9, 5:37 PM
Subscribers

Details

Summary

Improve error reporting when swap pager runs out of memory.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23284
Build 22316: arc lint + arc unit

Event Timeline

Why do you consider this to be an improvement ?

sys/vm/swap_pager.c
1258

If mentioning improvements for messages from swap pager, this one is the thing that I always wanted to fix when I see it, but forget right after.

Note that the message above is printed unconditionally after timeout, regardless of the page state. It should be only printed if page is still being read from the swap.

2696

cannot allocate bio.

I consider this an improvement, because swap pager's failure to allocate stuff is not an I/O error: it's an error internal to the swap_pager itself, and not eg the swap device. Besides, it makes it easier to find out exactly what happened, and find the source code line responsible for it.

sys/vm/swap_pager.c
1258

Not sure I understand. If the wait timed out, how can the page be already successfully read in?

2696

Ok, will fix.

sys/vm/swap_pager.c
1258

Reading is async, on loaded machine we might be woken up too late, e.g. the done callback could race with the callout which wakes up the thread. Also, this message probably should be printed only once for swapping attempt.

trasz added inline comments.
sys/vm/swap_pager.c
1258

To be honest I'd rather leave it for another time - I don't have a good way to reproduce that problem right now.

This revision is now accepted and ready to land.Mar 26 2019, 7:03 PM
This revision was automatically updated to reflect the committed changes.