public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Richard Purdie <rpurdie@openedhand.com>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	Hugh Dickins <hugh@veritas.com>
Subject: Re: [PATCH, RFC/T] Fix handling of write failures to swap devices
Date: Fri, 27 Oct 2006 14:19:44 -0700	[thread overview]
Message-ID: <20061027141944.d68fef87.akpm@osdl.org> (raw)
In-Reply-To: <1161935995.5019.46.camel@localhost.localdomain>

On Fri, 27 Oct 2006 08:59:55 +0100
Richard Purdie <rpurdie@openedhand.com> wrote:

> Fix handling of write failures to swap devices.
> 
> Calling SetPageError(page) marks the data in memory as bad and processes using
> the page in question will die unexpectedly. This isn't necessary as the data 
> in the memory page is still valid, just the copy on disk isn't. This patch 
> therefore removes this call.
> 
> Setting set_page_dirty(page) is good as the memory page will be retained and 
> processes don't die. It will try to write out the page again soon but a second 
> attempt at a write is probably no more likely to succeed than the first 
> resulting in IO loops. We can do better.
> 
> This patch attempts to unuse the page in a similar manner to swapoff. If 
> successful, mark the swap page as bad and remove it from use. If we fail to
> remove all references, we fall back on set_page_dirty above which will retry 
> the write.
> 
> If we can mark the swap page as bad, adjust the VM accounting to reflect this.
> 

Sounds like a reasonable approach.  Please copy Hugh (our lead swapoff maintainer)
on this work.

How was this tested?

      parent reply	other threads:[~2006-10-27 21:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-27  7:59 [PATCH, RFC/T] Fix handling of write failures to swap devices Richard Purdie
2006-10-27  8:22 ` Nick Piggin
2006-10-27  8:44   ` Richard Purdie
2006-10-28  4:55     ` Nick Piggin
2006-10-28 10:43       ` Richard Purdie
2006-10-28 12:10         ` Nick Piggin
2006-10-30 11:55           ` Richard Purdie
2006-11-01  5:26             ` Nick Piggin
2006-11-01  9:24               ` Richard Purdie
2006-11-02 23:26               ` Richard Purdie
2006-12-13 11:43               ` Richard Purdie
2006-11-01  5:36             ` Nick Piggin
2006-11-01  9:32               ` Richard Purdie
2006-10-27  9:35   ` Richard Purdie
2006-10-27 21:19 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061027141944.d68fef87.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@openedhand.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox