linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	Mel Gorman <mel@csn.ul.ie>, Rik van Riel <riel@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/4] writeback: integrated background work
Date: Tue, 14 Sep 2010 08:53:41 +0800	[thread overview]
Message-ID: <20100914005341.GA5377@localhost> (raw)
In-Reply-To: <AANLkTi=JuBKdqbGrukVwfVfgs1gixdRd3t77ZGEUL9wj@mail.gmail.com>

On Tue, Sep 14, 2010 at 06:46:01AM +0800, Minchan Kim wrote:
> Hi Wu,
> 
> On Mon, Sep 13, 2010 at 9:31 PM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> > Check background work whenever the flusher thread wakes up. A The page
> > reclaim code may lower the soft dirty limit immediately before sending
> > some work to the flusher thread.
> 
> I looked over this series. First impression is the approach is good. :)

Thanks :)

> But let me have a question.
> I can't find things about soft dirty limit.
> Maybe it's a thing based on your another patch series.

Yes, it's in the series "[RFC] soft and dynamic dirty throttling
limits", in particular the patch "[PATCH 15/17] mm: lower soft dirty
limits on memory pressure". https://patchwork.kernel.org/patch/173232/

> But at least, could you explain it in this series if it is really
> related to this series?

The above patch with URL has a chunk:

@@ -745,6 +745,16 @@  static unsigned long shrink_page_list(st
                }
 
                if (PageDirty(page)) {
+
+                       if (file && scanning_global_lru(sc)) {
+                               int dp = VM_DIRTY_PRESSURE >>
+                                       (DEF_PRIORITY + 1 - sc->priority);
+                               if (vm_dirty_pressure > dp) {
+                                       vm_dirty_pressure = dp;
+                                       vm_dirty_pressure_node = numa_node_id();
+                               }
+                       }
+

which lowers the soft dirty limits. It could explicitly check and
start background work, however doesn't do so because this patchset
will take care of it, by adding this chunk immediately after the above
code:

@@ -756,6 +756,19 @@ static unsigned long shrink_page_list(st
                                }
                        }

+                       if (page_is_file_cache(page) && mapping &&
+                           sync_writeback == PAGEOUT_IO_ASYNC) {
+                               if (!bdi_start_inode_writeback(
+                                       mapping->backing_dev_info,
+                                       mapping->host, page_index(page))) {
+                                       SetPageReclaim(page);
+                                       goto keep_locked;
+                               } else if (!current_is_kswapd() &&
+                                          printk_ratelimit()) {
+                                       printk(KERN_INFO "cannot pageout\n");
+                               }
+                       }
+                       

The bdi_start_inode_writeback() will wake up the flusher thread, which
will then check for background writeback (behavior added by this patch).

> >
> > This is also the prerequisite of next patch.
> 
> I can't understand why is the prerequisite of next patch.
> Please specify it.

Because the next patch breaks out of the background work (to serve
other works first). The code in this patch will resume the background
work when other works are done.

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>

  reply	other threads:[~2010-09-14  0:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 12:31 [PATCH 0/4] [RFC] transfer vmscan pageout works to the flusher thread Wu Fengguang
2010-09-13 12:31 ` [PATCH 1/4] writeback: integrated background work Wu Fengguang
2010-09-13 22:46   ` Minchan Kim
2010-09-14  0:53     ` Wu Fengguang [this message]
2010-09-14 12:45   ` Jan Kara
2010-09-13 12:31 ` [PATCH 2/4] writeback: quit background/periodic work when other works are enqueued Wu Fengguang
2010-09-14 12:40   ` Jan Kara
2010-11-01 12:07     ` Wu Fengguang
2010-11-01 15:08       ` Jan Kara
2010-11-01 15:13       ` Jan Kara
2010-11-01 12:14     ` [PATCH 1/2] writeback: integrated background writeback work Wu Fengguang
2010-11-01 12:22       ` [PATCH 2/2] writeback: stop background/kupdate works from livelocking other works Wu Fengguang
2010-11-01 15:22         ` Christoph Hellwig
2010-11-02  1:57         ` Minchan Kim
2010-11-05 12:15         ` Johannes Weiner
2010-11-01 15:21       ` [PATCH 1/2] writeback: integrated background writeback work Christoph Hellwig
2010-11-01 20:37         ` Wu Fengguang
2010-11-01 20:39         ` [PATCH 1/2 v2] " Wu Fengguang
2010-11-02  1:55           ` Minchan Kim
2010-11-05 12:01           ` Johannes Weiner
2010-09-13 12:31 ` [PATCH 3/4] writeback: introduce bdi_start_inode_writeback() Wu Fengguang
2010-09-14 13:36   ` Jan Kara
2010-11-01 12:35     ` Wu Fengguang
2010-09-13 12:31 ` [PATCH 4/4] vmscan: transfer async file writeback to the flusher 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=20100914005341.GA5377@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jack@suse.cz \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --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 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).