Improve error reporting when swap pager runs out of memory.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Why do you consider this to be an improvement ?
sys/vm/swap_pager.c | ||
---|---|---|
1258 ↗ | (On Diff #55421) | 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 ↗ | (On Diff #55421) | 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 ↗ | (On Diff #55421) | Not sure I understand. If the wait timed out, how can the page be already successfully read in? |
2696 ↗ | (On Diff #55421) | Ok, will fix. |
sys/vm/swap_pager.c | ||
---|---|---|
1258 ↗ | (On Diff #55421) | 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. |
sys/vm/swap_pager.c | ||
---|---|---|
1258 ↗ | (On Diff #55421) | To be honest I'd rather leave it for another time - I don't have a good way to reproduce that problem right now. |