linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ying Han <yinghan@google.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Minchan Kim <minchan.kim@gmail.com>,
	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Tejun Heo <tj@kernel.org>, Pavel Emelyanov <xemul@openvz.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Li Zefan <lizf@cn.fujitsu.com>, Mel Gorman <mel@csn.ul.ie>,
	Christoph Lameter <cl@linux.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>,
	Michal Hocko <mhocko@suse.cz>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Zhu Yanhai <zhu.yanhai@gmail.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH V7 4/9] Add memcg kswapd thread pool
Date: Fri, 22 Apr 2011 00:59:26 -0700	[thread overview]
Message-ID: <BANLkTikfsLB8kTFZe+qj_jK=psgtFMfBMA@mail.gmail.com> (raw)
In-Reply-To: <20110422164622.a8350bc5.kamezawa.hiroyu@jp.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 2780 bytes --]

On Fri, Apr 22, 2011 at 12:46 AM, KAMEZAWA Hiroyuki <
kamezawa.hiroyu@jp.fujitsu.com> wrote:

> On Thu, 21 Apr 2011 23:10:58 -0700
> Ying Han <yinghan@google.com> wrote:
>
> > On Thu, Apr 21, 2011 at 10:59 PM, KAMEZAWA Hiroyuki <
> > kamezawa.hiroyu@jp.fujitsu.com> wrote:
> >
> > > On Thu, 21 Apr 2011 22:53:19 -0700
> > > Ying Han <yinghan@google.com> wrote:
> > >
> > > > On Thu, Apr 21, 2011 at 10:00 PM, KAMEZAWA Hiroyuki <
> > > > kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > > >
> > > > > On Thu, 21 Apr 2011 21:49:04 -0700
> > > > > Ying Han <yinghan@google.com> wrote:
> > > > >
> > > > > > On Thu, Apr 21, 2011 at 9:36 PM, KAMEZAWA Hiroyuki <
> > > > > > kamezawa.hiroyu@jp.fujitsu.com> wrote:
>
> > > add a counter for kswapd-scan and kswapd-reclaim, kswapd-pickup will
> show
> > > you information, if necessary it's good to show some latecy stat. I
> think
> > > we can add enough information by adding stats (or debug by perf tools.)
> > > I'll consider this a a bit more.
> > >
> >
> > Something like "kswapd_pgscan" and "kswapd_steal" per memcg? If we are
> going
> > to the thread-pool, we definitely need to add more stats to give us
> enough
> > visibility of per-memcg background reclaim activity. Still, not sure
> about
> > the cpu-cycles.
> >
>
> BTW, Kosaki requeted me not to have private thread pool implementation and
> use workqueue. I think he is right. So, I'd like to write a patch to
> enhance
> workqueue for using it for memcg (Of couse, I'll make a private workqueue.)
>
> Hmm. Can you give a bit more details of the logic behind? and what's about
the private workqueue? Also, how
we plan to solve the better debug-ability issue.


>
> ==
> 2. regarding to the alternative workqueue, which is more complicated and we
> need to be very careful of work items in the workqueue. We've experienced
> in
> one workitem stucks and the rest of the work item won't proceed. For
> example
> in dirty page writeback, one heavily writer cgroup could starve the other
> cgroups from flushing dirty pages to the same disk. In the kswapd case, I
> can
> imagine we might have similar senario. How to prioritize the workitems is
> another problem. The order of adding the workitems in the queue reflects
> the
> order of cgroups being reclaimed. We don't have that restriction currently
> but
> relying on the cpu scheduler to put kswapd on the right cpu-core to run. We
> "might" introduce priority later for reclaim and how are we gonna deal with
> that.
> ==
>
> From this, I feel I need to use unbound workqueue. BTW, with patches for
> current thread pool model, I think starvation problem by dirty pages
> cannot be seen.
> Anyway, I'll give a try.
>

Then do you suggest me to wait for your patch for my next post?

--Ying

>
> Thanks,
> -Kame
>
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 4099 bytes --]

  reply	other threads:[~2011-04-22  7:59 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22  4:24 [RFC PATCH V7 0/9] memcg: per cgroup background reclaim Ying Han
2011-04-22  4:24 ` [PATCH V7 1/9] Add kswapd descriptor Ying Han
2011-04-22  4:31   ` KAMEZAWA Hiroyuki
2011-04-22  4:47   ` KOSAKI Motohiro
2011-04-22  5:55     ` Ying Han
2011-04-22  4:24 ` [PATCH V7 2/9] Add per memcg reclaim watermarks Ying Han
2011-04-22  4:24 ` [PATCH V7 3/9] New APIs to adjust per-memcg wmarks Ying Han
2011-04-22  4:32   ` KAMEZAWA Hiroyuki
2011-04-22  4:24 ` [PATCH V7 4/9] Add memcg kswapd thread pool Ying Han
2011-04-22  4:36   ` KAMEZAWA Hiroyuki
2011-04-22  4:49     ` Ying Han
2011-04-22  5:00       ` KAMEZAWA Hiroyuki
2011-04-22  5:53         ` Ying Han
2011-04-22  5:59           ` KAMEZAWA Hiroyuki
2011-04-22  6:10             ` Ying Han
2011-04-22  7:46               ` KAMEZAWA Hiroyuki
2011-04-22  7:59                 ` Ying Han [this message]
2011-04-22  8:02                   ` KAMEZAWA Hiroyuki
2011-04-24 23:26                   ` KAMEZAWA Hiroyuki
2011-04-25  2:08                     ` Ying Han
2011-04-22  6:02         ` Zhu Yanhai
2011-04-22  6:14           ` Ying Han
2011-04-22  5:39   ` KOSAKI Motohiro
2011-04-22  5:56     ` KAMEZAWA Hiroyuki
2011-04-22  4:24 ` [PATCH V7 5/9] Infrastructure to support per-memcg reclaim Ying Han
2011-04-22  4:38   ` KAMEZAWA Hiroyuki
2011-04-22  5:11   ` KOSAKI Motohiro
2011-04-22  5:59     ` Ying Han
2011-04-22  5:27   ` KOSAKI Motohiro
2011-04-22  6:00     ` Ying Han
2011-04-22  4:24 ` [PATCH V7 6/9] Implement the select_victim_node within memcg Ying Han
2011-04-22  4:39   ` KAMEZAWA Hiroyuki
2011-04-22  4:24 ` [PATCH V7 7/9] Per-memcg background reclaim Ying Han
2011-04-22  4:40   ` KAMEZAWA Hiroyuki
2011-04-22  6:00   ` KOSAKI Motohiro
2011-04-22  7:54     ` Ying Han
2011-04-22  8:44       ` KOSAKI Motohiro
2011-04-22 18:37         ` Ying Han
2011-04-25  2:21           ` [PATCH] vmscan,memcg: memcg aware swap token KOSAKI Motohiro
2011-04-25  9:47             ` KAMEZAWA Hiroyuki
2011-04-25 17:13             ` Ying Han
2011-04-26  2:08               ` KOSAKI Motohiro
2011-04-22  4:24 ` [PATCH V7 8/9] Add per-memcg zone "unreclaimable" Ying Han
2011-04-22  4:43   ` KAMEZAWA Hiroyuki
2011-04-22  6:13   ` KOSAKI Motohiro
2011-04-22  6:17     ` Ying Han
2011-04-22  4:24 ` [PATCH V7 9/9] Enable per-memcg background reclaim Ying Han
2011-04-22  4:44   ` KAMEZAWA Hiroyuki

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='BANLkTikfsLB8kTFZe+qj_jK=psgtFMfBMA@mail.gmail.com' \
    --to=yinghan@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=cl@linux.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mel@csn.ul.ie \
    --cc=mhocko@suse.cz \
    --cc=minchan.kim@gmail.com \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --cc=riel@redhat.com \
    --cc=tj@kernel.org \
    --cc=xemul@openvz.org \
    --cc=zhu.yanhai@gmail.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).