Linux Container Development
 help / color / mirror / Atom feed
From: yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org (YAMAMOTO Takashi)
To: kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org
Cc: a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH][RFC] dirty balancing for cgroups
Date: Wed,  6 Aug 2008 18:10:05 +0900 (JST)	[thread overview]
Message-ID: <20080806091005.B883A5A7B@siro.lan> (raw)
In-Reply-To: Your message of "Wed, 6 Aug 2008 17:53:52 +0900" <20080806175352.6330c00a.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>

hi,

> On Wed,  6 Aug 2008 17:20:46 +0900 (JST)
> yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org (YAMAMOTO Takashi) wrote:
> 
> > hi,
> > 
> > > On Fri, 11 Jul 2008 17:34:46 +0900 (JST)
> > > yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org (YAMAMOTO Takashi) wrote:
> > > 
> > > > hi,
> > > > 
> > > > > > my patch penalizes heavy-writer cgroups as task_dirty_limit does
> > > > > > for heavy-writer tasks.  i don't think that it's necessary to be
> > > > > > tied to the memory subsystem because i merely want to group writers.
> > > > > > 
> > > > > Hmm, maybe what I need is different from this ;)
> > > > > Does not seem to be a help for memory reclaim under memcg.
> > > > 
> > > > to implement what you need, i think that we need to keep track of
> > > > the numbers of dirty-pages in each memory cgroups as a first step.
> > > > do you agree?
> > > > 
> > > yes, I think so, now.
> > > 
> > > may be not difficult but will add extra overhead ;( Sigh..
> > 
> > the following is a patch to add the overhead. :)
> > any comments?
> > 
> Do you have some numbers ? ;) 

not yet.

> I like this because this seems very straightforward. thank you.

good to hear.

> How about changing these to be
> 
> ==
> void mem_cgroup_test_set_page_dirty()
> {
> 	if (try_lock_page_cgroup(pg)) {
> 		pc = page_get_page_cgroup(pg);
> 		if (pc ......) {
> 		}
> 		unlock_page_cgroup(pg)
> 	}
> }
> ==

i'm not sure how many opportunities to update statistics
we would lose for the trylock failure.
although the statistics don't need to be too precise,
its error should have a reasonable upper-limit to be useful.

> Off-topic: I wonder we can delete this "lock" in future.
> 
> Because page->page_cgroup is
>  1. attached at first use.(Obiously no race with set_dirty)
>  2. deleted at removal. (force_empty is problematic here..)

i hope it's possible. :)

YAMAMOTO Takashi

> 
> But, now, we need this lock.
> 
> Thanks,
> -Kame
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo-Bw31MaZKKs0EbZ0PF+XxCw@public.gmane.org  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org"> email-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org </a>

  parent reply	other threads:[~2008-08-06  9:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080711175213.dc69f068.kamezawa.hiroyu@jp.fujitsu.com>
     [not found] ` <20080711175213.dc69f068.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-08-06  8:20   ` [PATCH][RFC] dirty balancing for cgroups YAMAMOTO Takashi
     [not found]     ` <20080806082046.349BE5A5F-Pcsii4f/SVk@public.gmane.org>
2008-08-06  8:53       ` KAMEZAWA Hiroyuki
     [not found]         ` <20080806175352.6330c00a.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-08-06  9:10           ` YAMAMOTO Takashi [this message]
2008-08-07 13:36       ` Peter Zijlstra
     [not found] <1218116168.8625.38.camel@twins>
2008-08-13  7:15 ` YAMAMOTO Takashi
     [not found] ` <20080813071505.930965A75@siro.lan>
     [not found]   ` <20080813071505.930965A75-Pcsii4f/SVk@public.gmane.org>
2008-08-18  7:58     ` KAMEZAWA Hiroyuki
     [not found] <20080709060034.0CB2D5A29@siro.lan>
     [not found] ` <20080709060034.0CB2D5A29-Pcsii4f/SVk@public.gmane.org>
2008-07-10 23:54   ` KAMEZAWA Hiroyuki
2008-07-14 13:37   ` Peter Zijlstra
     [not found] <20080711141511.515e69a5.kamezawa.hiroyu@jp.fujitsu.com>
     [not found] ` <20080711141511.515e69a5.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-11  5:59   ` YAMAMOTO Takashi
     [not found] ` <20080711055926.9AF4F5A03@siro.lan>
     [not found]   ` <20080711055926.9AF4F5A03-Pcsii4f/SVk@public.gmane.org>
2008-07-11  7:13     ` KAMEZAWA Hiroyuki
     [not found]   ` <20080711161349.c5831081.kamezawa.hiroyu@jp.fujitsu.com>
     [not found]     ` <20080711083446.AC5425A22@siro.lan>
     [not found]       ` <20080711083446.AC5425A22-Pcsii4f/SVk@public.gmane.org>
2008-07-11  8:52         ` KAMEZAWA Hiroyuki
     [not found]     ` <20080711161349.c5831081.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-11  8:34       ` YAMAMOTO Takashi
2008-07-14 13:49       ` Peter Zijlstra
     [not found]     ` <1216043344.12595.89.camel@twins>
2008-07-17  1:43       ` YAMAMOTO Takashi
2008-08-14  8:38       ` Paul Menage
     [not found] <20080711085449.ba7d14dd.kamezawa.hiroyu@jp.fujitsu.com>
     [not found] ` <20080711085449.ba7d14dd.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-11  4:06   ` YAMAMOTO Takashi
     [not found]     ` <20080711040657.87AE71E3DF1-Pcsii4f/SVk@public.gmane.org>
2008-07-11  5:15       ` KAMEZAWA Hiroyuki
2008-07-09  6:00 YAMAMOTO Takashi

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=20080806091005.B883A5A7B@siro.lan \
    --to=yamamoto-jcdqpdek3idl9jvzuh4aog@public.gmane.org \
    --cc=a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    /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