From: Wu Fengguang <fengguang.wu@intel.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Minchan Kim <minchan.kim@gmail.com>,
Andrea Arcangeli <aarcange@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Dave Chinner <david@fromorbit.com>,
Chris Mason <chris.mason@oracle.com>,
Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 10/10] vmscan: Kick flusher threads to clean pages when reclaim is encountering dirty pages
Date: Mon, 13 Sep 2010 22:41:01 +0800 [thread overview]
Message-ID: <20100913144101.GA15130@localhost> (raw)
In-Reply-To: <20100913141046.GI23508@csn.ul.ie>
On Mon, Sep 13, 2010 at 10:10:46PM +0800, Mel Gorman wrote:
> On Mon, Sep 13, 2010 at 09:48:45PM +0800, Wu Fengguang wrote:
> > > + /*
> > > + * If reclaim is encountering dirty pages, it may be because
> > > + * dirty pages are reaching the end of the LRU even though the
> > > + * dirty_ratio may be satisified. In this case, wake flusher
> > > + * threads to pro-actively clean up to a maximum of
> > > + * 4 * SWAP_CLUSTER_MAX amount of data (usually 1/2MB) unless
> > > + * !may_writepage indicates that this is a direct reclaimer in
> > > + * laptop mode avoiding disk spin-ups
> > > + */
> > > + if (file && nr_dirty_seen && sc->may_writepage)
> > > + wakeup_flusher_threads(nr_writeback_pages(nr_dirty));
> >
> > wakeup_flusher_threads() works, but seems not the pertinent one.
> >
> > - locally, it needs some luck to clean the pages that direct reclaim is waiting on
>
> There is a certain amount of luck involved but it's depending on there being a
> correlation between old inodes and old pages on the LRU list. As long as that
> correlation is accurate, some relevant pages will get cleaned. Testing on
> previously released versions of this patch did show that the percentage of
> dirty pages encountered during reclaim were reduced as a result of this patch.
Yup.
> > - globally, it cleans up some dirty pages, however some heavy dirtier
> > may quickly create new ones..
> >
> > So how about taking the approaches in these patches?
> >
> > - "[PATCH 4/4] vmscan: transfer async file writeback to the flusher"
> > - "[PATCH 15/17] mm: lower soft dirty limits on memory pressure"
> >
>
> There is a lot going on in those patches. It's going to take me a while to
> figure them out and formulate an opinion.
OK. I also need some time off for doing other works :)
> > In particular the first patch should work very nicely with memcg, as
> > all pages of an inode typically belong to the same memcg. So doing
> > write-around helps clean lots of dirty pages in the target LRU list in
> > one shot.
> >
>
> It might but as there is also a correlation between old dirty inodes and
> the location of dirty pages, it is tricky to predict if it is better and
> if so, by how much.
It at least guarantees to clean the one page pageout() is running into :)
Others will depend on the locality/sequentiality of the workload. But
as the write-around pages are in the same LRU lists, the vmscan code
will hit them sooner or later.
Thanks,
Fengguang
WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Minchan Kim <minchan.kim@gmail.com>,
Andrea Arcangeli <aarcange@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Dave Chinner <david@fromorbit.com>,
Chris Mason <chris.mason@oracle.com>,
Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 10/10] vmscan: Kick flusher threads to clean pages when reclaim is encountering dirty pages
Date: Mon, 13 Sep 2010 22:41:01 +0800 [thread overview]
Message-ID: <20100913144101.GA15130@localhost> (raw)
In-Reply-To: <20100913141046.GI23508@csn.ul.ie>
On Mon, Sep 13, 2010 at 10:10:46PM +0800, Mel Gorman wrote:
> On Mon, Sep 13, 2010 at 09:48:45PM +0800, Wu Fengguang wrote:
> > > + /*
> > > + * If reclaim is encountering dirty pages, it may be because
> > > + * dirty pages are reaching the end of the LRU even though the
> > > + * dirty_ratio may be satisified. In this case, wake flusher
> > > + * threads to pro-actively clean up to a maximum of
> > > + * 4 * SWAP_CLUSTER_MAX amount of data (usually 1/2MB) unless
> > > + * !may_writepage indicates that this is a direct reclaimer in
> > > + * laptop mode avoiding disk spin-ups
> > > + */
> > > + if (file && nr_dirty_seen && sc->may_writepage)
> > > + wakeup_flusher_threads(nr_writeback_pages(nr_dirty));
> >
> > wakeup_flusher_threads() works, but seems not the pertinent one.
> >
> > - locally, it needs some luck to clean the pages that direct reclaim is waiting on
>
> There is a certain amount of luck involved but it's depending on there being a
> correlation between old inodes and old pages on the LRU list. As long as that
> correlation is accurate, some relevant pages will get cleaned. Testing on
> previously released versions of this patch did show that the percentage of
> dirty pages encountered during reclaim were reduced as a result of this patch.
Yup.
> > - globally, it cleans up some dirty pages, however some heavy dirtier
> > may quickly create new ones..
> >
> > So how about taking the approaches in these patches?
> >
> > - "[PATCH 4/4] vmscan: transfer async file writeback to the flusher"
> > - "[PATCH 15/17] mm: lower soft dirty limits on memory pressure"
> >
>
> There is a lot going on in those patches. It's going to take me a while to
> figure them out and formulate an opinion.
OK. I also need some time off for doing other works :)
> > In particular the first patch should work very nicely with memcg, as
> > all pages of an inode typically belong to the same memcg. So doing
> > write-around helps clean lots of dirty pages in the target LRU list in
> > one shot.
> >
>
> It might but as there is also a correlation between old dirty inodes and
> the location of dirty pages, it is tricky to predict if it is better and
> if so, by how much.
It at least guarantees to clean the one page pageout() is running into :)
Others will depend on the locality/sequentiality of the workload. But
as the write-around pages are in the same LRU lists, the vmscan code
will hit them sooner or later.
Thanks,
Fengguang
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-09-13 14:41 UTC|newest]
Thread overview: 133+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 10:47 [PATCH 0/9] Reduce latencies and improve overall reclaim efficiency v1 Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-06 10:47 ` [PATCH 01/10] tracing, vmscan: Add trace events for LRU list shrinking Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-06 10:47 ` [PATCH 02/10] writeback: Account for time spent congestion_waited Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-06 10:47 ` [PATCH 03/10] writeback: Do not congestion sleep if there are no congested BDIs or significant writeback Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-07 15:25 ` Minchan Kim
2010-09-07 15:25 ` Minchan Kim
2010-09-08 11:04 ` Mel Gorman
2010-09-08 11:04 ` Mel Gorman
2010-09-08 14:52 ` Minchan Kim
2010-09-08 14:52 ` Minchan Kim
2010-09-09 8:54 ` Mel Gorman
2010-09-09 8:54 ` Mel Gorman
2010-09-12 15:37 ` Minchan Kim
2010-09-12 15:37 ` Minchan Kim
2010-09-13 8:55 ` Mel Gorman
2010-09-13 8:55 ` Mel Gorman
2010-09-13 9:48 ` Minchan Kim
2010-09-13 9:48 ` Minchan Kim
2010-09-13 10:07 ` Mel Gorman
2010-09-13 10:07 ` Mel Gorman
2010-09-13 10:20 ` Minchan Kim
2010-09-13 10:20 ` Minchan Kim
2010-09-13 10:30 ` Mel Gorman
2010-09-13 10:30 ` Mel Gorman
2010-09-08 21:23 ` Andrew Morton
2010-09-08 21:23 ` Andrew Morton
2010-09-09 10:43 ` Mel Gorman
2010-09-09 10:43 ` Mel Gorman
2010-09-09 3:02 ` KAMEZAWA Hiroyuki
2010-09-09 3:02 ` KAMEZAWA Hiroyuki
2010-09-09 8:58 ` Mel Gorman
2010-09-09 8:58 ` Mel Gorman
2010-09-06 10:47 ` [PATCH 04/10] vmscan: Synchronous lumpy reclaim should not call congestion_wait() Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-07 15:26 ` Minchan Kim
2010-09-07 15:26 ` Minchan Kim
2010-09-08 6:15 ` Johannes Weiner
2010-09-08 6:15 ` Johannes Weiner
2010-09-08 11:25 ` Wu Fengguang
2010-09-08 11:25 ` Wu Fengguang
2010-09-09 3:03 ` KAMEZAWA Hiroyuki
2010-09-09 3:03 ` KAMEZAWA Hiroyuki
2010-09-06 10:47 ` [PATCH 05/10] vmscan: Synchrounous lumpy reclaim use lock_page() instead trylock_page() Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-07 15:28 ` Minchan Kim
2010-09-07 15:28 ` Minchan Kim
2010-09-08 6:16 ` Johannes Weiner
2010-09-08 6:16 ` Johannes Weiner
2010-09-08 11:28 ` Wu Fengguang
2010-09-08 11:28 ` Wu Fengguang
2010-09-09 3:04 ` KAMEZAWA Hiroyuki
2010-09-09 3:04 ` KAMEZAWA Hiroyuki
2010-09-09 3:15 ` KAMEZAWA Hiroyuki
2010-09-09 3:15 ` KAMEZAWA Hiroyuki
2010-09-09 3:25 ` Wu Fengguang
2010-09-09 3:25 ` Wu Fengguang
2010-09-09 4:13 ` KOSAKI Motohiro
2010-09-09 4:13 ` KOSAKI Motohiro
2010-09-09 9:22 ` Mel Gorman
2010-09-09 9:22 ` Mel Gorman
2010-09-10 10:25 ` KOSAKI Motohiro
2010-09-10 10:25 ` KOSAKI Motohiro
2010-09-10 10:33 ` KOSAKI Motohiro
2010-09-10 10:33 ` KOSAKI Motohiro
2010-09-10 10:33 ` KOSAKI Motohiro
2010-09-13 9:14 ` Mel Gorman
2010-09-13 9:14 ` Mel Gorman
2010-09-14 10:14 ` KOSAKI Motohiro
2010-09-14 10:14 ` KOSAKI Motohiro
2010-09-06 10:47 ` [PATCH 06/10] vmscan: Narrow the scenarios lumpy reclaim uses synchrounous reclaim Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-09 3:14 ` KAMEZAWA Hiroyuki
2010-09-09 3:14 ` KAMEZAWA Hiroyuki
2010-09-06 10:47 ` [PATCH 07/10] vmscan: Remove dead code in shrink_inactive_list() Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-07 15:33 ` Minchan Kim
2010-09-07 15:33 ` Minchan Kim
2010-09-06 10:47 ` [PATCH 08/10] vmscan: isolated_lru_pages() stop neighbour search if neighbour cannot be isolated Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-07 15:37 ` Minchan Kim
2010-09-07 15:37 ` Minchan Kim
2010-09-08 11:12 ` Mel Gorman
2010-09-08 11:12 ` Mel Gorman
2010-09-08 14:58 ` Minchan Kim
2010-09-08 14:58 ` Minchan Kim
2010-09-08 11:37 ` Wu Fengguang
2010-09-08 11:37 ` Wu Fengguang
2010-09-08 12:50 ` Mel Gorman
2010-09-08 12:50 ` Mel Gorman
2010-09-08 13:14 ` Wu Fengguang
2010-09-08 13:14 ` Wu Fengguang
2010-09-08 13:27 ` Mel Gorman
2010-09-08 13:27 ` Mel Gorman
2010-09-09 3:17 ` KAMEZAWA Hiroyuki
2010-09-09 3:17 ` KAMEZAWA Hiroyuki
2010-09-06 10:47 ` [PATCH 09/10] vmscan: Do not writeback filesystem pages in direct reclaim Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-13 13:31 ` Wu Fengguang
2010-09-13 13:31 ` Wu Fengguang
2010-09-13 13:55 ` Mel Gorman
2010-09-13 13:55 ` Mel Gorman
2010-09-13 14:33 ` Wu Fengguang
2010-09-13 14:33 ` Wu Fengguang
2010-10-28 21:50 ` Christoph Hellwig
2010-10-28 21:50 ` Christoph Hellwig
2010-10-29 10:26 ` Mel Gorman
2010-10-29 10:26 ` Mel Gorman
2010-09-06 10:47 ` [PATCH 10/10] vmscan: Kick flusher threads to clean pages when reclaim is encountering dirty pages Mel Gorman
2010-09-06 10:47 ` Mel Gorman
2010-09-09 3:22 ` KAMEZAWA Hiroyuki
2010-09-09 3:22 ` KAMEZAWA Hiroyuki
2010-09-09 9:32 ` Mel Gorman
2010-09-09 9:32 ` Mel Gorman
2010-09-13 0:53 ` KAMEZAWA Hiroyuki
2010-09-13 0:53 ` KAMEZAWA Hiroyuki
2010-09-13 13:48 ` Wu Fengguang
2010-09-13 13:48 ` Wu Fengguang
2010-09-13 14:10 ` Mel Gorman
2010-09-13 14:10 ` Mel Gorman
2010-09-13 14:41 ` Wu Fengguang [this message]
2010-09-13 14:41 ` Wu Fengguang
2010-09-06 10:49 ` [PATCH 0/9] Reduce latencies and improve overall reclaim efficiency v1 Mel Gorman
2010-09-06 10:49 ` Mel Gorman
2010-09-08 3:14 ` KOSAKI Motohiro
2010-09-08 3:14 ` KOSAKI Motohiro
2010-09-08 8:38 ` Mel Gorman
2010-09-08 8:38 ` Mel Gorman
2010-09-13 23:10 ` Minchan Kim
2010-09-13 23:10 ` Minchan Kim
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=20100913144101.GA15130@localhost \
--to=fengguang.wu@intel.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=david@fromorbit.com \
--cc=hannes@cmpxchg.org \
--cc=hch@lst.de \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@gmail.com \
--cc=riel@redhat.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.