From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
shaggy@austin.ibm.com, jfs-discussion@lists.sourceforge.net,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: [PATCH] jfs: clear PAGECACHE_TAG_DIRTY for no-write pages
Date: Fri, 28 Dec 2007 19:42:36 +0800 [thread overview]
Message-ID: <398842168.09386@ustc.edu.cn> (raw)
Message-ID: <E1J8Dbo-0001e2-1T@localhost> (raw)
In-Reply-To: <1198841626.6821.92.camel@twins>
On Fri, Dec 28, 2007 at 12:33:46PM +0100, Peter Zijlstra wrote:
>
> On Fri, 2007-12-28 at 16:03 +0800, Fengguang Wu wrote:
> > Andrew,
> >
> > This patch fixed the 'pdflush stuck in D state' bug
> > http://bugzilla.kernel.org/show_bug.cgi?id=9291
> > and should be pushed to mainline ASAP.
> > ---
> >
> > When JFS decides to drop a dirty metapage, it simply clears the META_dirty bit
> > and leave alone the PG_dirty and PAGECACHE_TAG_DIRTY bits.
> >
> > When such no-write page goes to metapage_writepage(), the `relic'
> > PAGECACHE_TAG_DIRTY tag should be cleared, to prevent pdflush from
> > repeatedly trying to sync them.
> >
> > Also, avoid the redirty when a bio submission is planned.
> >
> > Tested-by: Markus Rehbach <Markus.Rehbach@gmx.de>
> > Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
> > ---
>
> > +++ b/fs/jfs/jfs_metapage.c
>
> > @@ -449,9 +450,15 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc)
> > goto dump_bio;
> >
> > submit_bio(WRITE, bio);
> > - }
> > - if (redirty)
> > + } else if (redirty) {
> > redirty_page_for_writepage(wbc, page);
> > + } else {
> > + write_lock_irq(&mapping->tree_lock);
> > + radix_tree_tag_clear(&mapping->page_tree,
> > + page_index(page),
> > + PAGECACHE_TAG_DIRTY);
> > + write_unlock_irq(&mapping->tree_lock);
> > + }
>
> I'm not liking this open-coded tag_clear, although I currently fail to
> come up with a nice solution.
Another option is to release/drop such pages ASAP. But what if the
metapage_writepage() is called even before we have the chance to
release it?
next prev parent reply other threads:[~2007-12-28 11:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-28 8:03 [PATCH] jfs: clear PAGECACHE_TAG_DIRTY for no-write pages Fengguang Wu
2007-12-28 8:03 ` Fengguang Wu
2007-12-28 11:33 ` Peter Zijlstra
2007-12-28 11:42 ` Fengguang Wu [this message]
2007-12-28 11:42 ` Fengguang Wu
2007-12-28 16:25 ` Dave Kleikamp
2007-12-28 16:53 ` Dave Kleikamp
2007-12-29 2:21 ` Fengguang Wu
2007-12-29 2:21 ` Fengguang Wu
2007-12-29 4:50 ` Dave Kleikamp
2007-12-29 5:51 ` Fengguang Wu
2007-12-29 5:51 ` Fengguang Wu
2007-12-29 15:20 ` Dave Kleikamp
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=398842168.09386@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@linux-foundation.org \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=peterz@infradead.org \
--cc=shaggy@austin.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.