From: Sebastian Ott <sebott@linux.vnet.ibm.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
Linux Kernel Developers List <linux-kernel@vger.kernel.org>,
linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH] PM / Hibernate: Don't mark pages dirty when reading pages while thawing
Date: Thu, 13 Jan 2011 13:36:15 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.02.1101131333071.1899@localhost6.localdomain6> (raw)
In-Reply-To: <1294898351-26156-1-git-send-email-tytso@mit.edu>
Hi,
On Thu, 13 Jan 2011, Theodore Ts'o wrote:
> Everything was sync'ed before the hibernation, so no pages could be
> dirty. So this causes a lot of wasted I/O activity right after
> resuming from hibernation.
>
> Worse, it also causes pages from files that were opened read/only to
> be marked writeble which makes them subject to writeback. This was
> discovered when ext4 was changed to so that the jinode pointer was not
> initialized unless the file was opened read/write, and this caused
> things to blow up. But that just unmasked a problem, since the pages
> belonging to the file in question should have never been marked dirty
> in the first place. It increases the chances the text blocks for
> executables like /usr/bin/killall will get corrupted when they are
> needlessly written, and of course it means extra write cycles to the
> SSD.
>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
> Cc: linux-pm@lists.linux-foundation.org
> ---
> kernel/power/block_io.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/power/block_io.c b/kernel/power/block_io.c
> index 83bbc7c..108a4f3 100644
> --- a/kernel/power/block_io.c
> +++ b/kernel/power/block_io.c
> @@ -49,8 +49,6 @@ static int submit(int rw, struct block_device *bdev, sector_t sector,
> if (bio_chain == NULL) {
> submit_bio(bio_rw, bio);
> wait_on_page_locked(page);
> - if (rw == READ)
> - bio_set_pages_dirty(bio);
> bio_put(bio);
> } else {
> if (rw == READ)
> --
> 1.7.3.1
>
>
I did some test with this patch applied, but sadly it didn't help.
The testcase was reduced to one hibernation followed by a sync.
Regards,
Sebastian
next prev parent reply other threads:[~2011-01-13 12:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 13:48 Oops while going into hibernate Sebastian Ott
2011-01-12 16:26 ` Ted Ts'o
2011-01-12 16:56 ` Sebastian Ott
2011-01-12 17:26 ` Ted Ts'o
2011-01-12 17:37 ` Sebastian Ott
2011-01-12 18:49 ` Sebastian Ott
2011-01-13 0:44 ` Theodore Tso
2011-01-13 5:56 ` Ted Ts'o
2011-01-13 5:59 ` [PATCH] PM / Hibernate: Don't mark pages dirty when reading pages while thawing Theodore Ts'o
2011-01-13 12:36 ` Sebastian Ott [this message]
2011-01-13 11:12 ` [linux-pm] Oops while going into hibernate Bojan Smojver
2011-01-13 11:49 ` Sebastian Ott
2011-01-13 11:48 ` Sebastian Ott
2011-01-13 12:11 ` [linux-pm] " Bojan Smojver
2011-01-13 12:31 ` Sebastian Ott
2011-01-13 13:36 ` Heiko Carstens
2011-01-13 18:46 ` Ted Ts'o
2011-01-13 21:30 ` [linux-pm] " Bojan Smojver
2011-01-14 9:53 ` Heiko Carstens
2011-01-14 13:14 ` Bojan Smojver
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=alpine.LFD.2.02.1101131333071.1899@localhost6.localdomain6 \
--to=sebott@linux.vnet.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=tytso@mit.edu \
/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