From: Nick Piggin <npiggin@suse.de>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: Nikita Danilov <danilov@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Theodore Tso <tytso@mit.edu>,
Christoph Hellwig <hch@infradead.org>,
Dave Chinner <david@fromorbit.com>,
Chris Mason <chris.mason@oracle.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"Li, Shaohua" <shaohua.li@intel.com>,
Myklebust Trond <Trond.Myklebust@netapp.com>,
"jens.axboe@oracle.com" <jens.axboe@oracle.com>,
Jan Kara <jack@suse.cz>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 30/45] vmscan: lumpy pageout
Date: Wed, 7 Oct 2009 13:32:25 +0200 [thread overview]
Message-ID: <20091007113225.GS30316@wotan.suse.de> (raw)
In-Reply-To: <20091007111454.GB15936@localhost>
On Wed, Oct 07, 2009 at 07:14:54PM +0800, Wu Fengguang wrote:
> On Wed, Oct 07, 2009 at 06:38:37PM +0800, Nikita Danilov wrote:
> > Hello,
> >
> > > When pageout a dirty page, try to piggy back more consecutive dirty
> > > pages (up to 512KB) to improve IO efficiency.
> > >
> > > Only ext3/reiserfs which don't have its own aops->writepages are
> > > supported in this initial version.
> > >
> >
> > [...]
> >
> > > /*
> > > + * only write_cache_pages() supports for_reclaim for now
> > > + */
> > > + if (!mapping->a_ops->writepages) {
> > > + wbc.range_start = (page->index + 1) << PAGE_CACHE_SHIFT;
> > > + wbc.nr_to_write = LUMPY_PAGEOUT_PAGES - 1;
> > > + generic_writepages(mapping, &wbc);
> > > + }
> >
> > This might end up calling ->writepage() on a page_mapped() page,
> > which used to be a problem, at least for shmem (see
> > BUG_ON(page_mapped(page)) in shmem_writepage()).
>
> Good catch, thanks a lot!
You also have a problem in that you aren't allowed to touch mapping
after the page is unlocked. So this patch looks buggy. I didn't see
where Nikita mentions the inode reclaim race, but this is it.
It seems tempting to do this lumpy writeout here, but... hmm, I
don't know. I would like to see workloads where it matters now,
and then I would like to know why normal writeout doesn't keep
up.
Then... maybe it's enough simply to allow the filesystem to do
their own clustering because they can tell when writepage is called
for reclaim.
But if you have real cases where this helps, it would be very
interesting.
next prev parent reply other threads:[~2009-10-07 11:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 10:38 [PATCH 30/45] vmscan: lumpy pageout Nikita Danilov
2009-10-07 11:14 ` Wu Fengguang
2009-10-07 11:32 ` Nick Piggin [this message]
2009-10-07 11:37 ` Nikita Danilov
2009-10-07 13:29 ` Wu Fengguang
2009-10-07 13:42 ` Wu Fengguang
2009-10-07 14:20 ` Wu Fengguang
2009-10-07 14:50 ` Nikita Danilov
2009-10-07 15:00 ` Wu Fengguang
2009-10-07 15:50 ` Nikita Danilov
2009-10-08 2:37 ` Wu Fengguang
2009-10-08 8:20 ` Hugh Dickins
2009-10-08 10:12 ` Wu Fengguang
-- strict thread matches above, loose matches on Subject: below --
2009-10-07 7:38 [PATCH 00/45] some writeback experiments Wu Fengguang
2009-10-07 7:38 ` [PATCH 30/45] vmscan: lumpy pageout Wu Fengguang
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=20091007113225.GS30316@wotan.suse.de \
--to=npiggin@suse.de \
--cc=Trond.Myklebust@netapp.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=danilov@gmail.com \
--cc=david@fromorbit.com \
--cc=fengguang.wu@intel.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jens.axboe@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=shaohua.li@intel.com \
--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;
as well as URLs for NNTP newsgroup(s).