[lkml]   [2006]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: end_swap_bio_write error handling
On Thu, 2006-08-31 at 10:58 +0900, KAMEZAWA Hiroyuki wrote:
> Now, swap-write-failure-fixup.patch is merged in -mm kernel.
> ==
> ==
> error message comes and a page turns to be dirty again.

+ if (!uptodate) {
+ /*
+ * We failed to write the page out to swap-space.
+ * Re-dirty the page in order to avoid it being reclaimed.
+ * Also print a dire warning that things will go BAD (tm)
+ * very quickly.
+ *
+ * Also clear PG_reclaim to avoid rotate_reclaimable_page()
+ */
+ set_page_dirty(page);
+ printk(KERN_ALERT "Write-error on swap-device (%d:%d)\n",
+ imajor(bio->bi_bdev->bd_inode),
+ iminor(bio->bi_bdev->bd_inode));
+ ClearPageReclaim(page);

I'm not 100% convinced this will help as if you SetPageError, it will
still end up killing off the processes involved. Removing the
SetPageError gives much more stable results in my testing. I was
wondering how to stop it repeatedly trying to write to the particular
swap file sector. ClearPageReclaim() doesn't appear to help much as
rotate_reclaimable_page() does check if a page is dirty.

Ideally, we should remap the page to a new swap sector so we can mark
the existing one as bad. The easiest way to do that might be to have the
page move out of the PageSwapCache although I've not worked out how to
do that yet.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-08-31 10:09    [W:0.046 / U:0.544 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site