mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: nishimura@mxp.nes.nec.co.jp, LKML <linux-kernel@vger.kernel.org>,
	"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
	"yamamoto@valinux.co.jp" <yamamoto@valinux.co.jp>,
	ryov@valinux.co.jp, "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [RFC][PATCH -mm 0/7] memcg: lockless page_cgroup v1
Date: Thu, 21 Aug 2008 12:54:18 +0900	[thread overview]
Message-ID: <20080821125418.741b826b.nishimura@mxp.nes.nec.co.jp> (raw)
In-Reply-To: <20080821111740.49f99038.kamezawa.hiroyu@jp.fujitsu.com>

On Thu, 21 Aug 2008 11:17:40 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Wed, 20 Aug 2008 20:00:06 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> 
> > On Wed, 20 Aug 2008 19:41:08 +0900
> > KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > 
> > > On Wed, 20 Aug 2008 18:53:06 +0900
> > > KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > > 
> > > > Hi, this is a patch set for lockless page_cgroup.
> > > > 
> > > > dropped patches related to mem+swap controller for easy review.
> > > > (I'm rewriting it, too.)
> > > > 
> > > > Changes from current -mm is.
> > > >   - page_cgroup->flags operations is set to be atomic.
> > > >   - lock_page_cgroup() is removed.
> > > >   - page->page_cgroup is changed from unsigned long to struct page_cgroup*
> > > >   - page_cgroup is freed by RCU.
> > > >   - For avoiding race, charge/uncharge against mm/memory.c::insert_page() is
> > > >     omitted. This is ususally used for mapping device's page. (I think...)
> > > > 
> > > > In my quick test, perfomance is improved a little. But the benefit of this
> > > > patch is to allow access page_cgroup without lock. I think this is good 
> > > > for Yamamoto's Dirty page tracking for memcg.
> > > > For I/O tracking people, I added a header file for allowing access to
> > > > page_cgroup from out of memcontrol.c
> > > > 
> > > > The base kernel is recent mmtom. Any comments are welcome.
> > > > This is still under test. I have to do long-run test before removing "RFC".
> > > > 
> > > Known problem: force_emtpy is broken...so rmdir will struck into nightmare.
> > > It's because of patch 2/7.
> > > will be fixed in the next version.
> > > 
> > 
> > This is a quick fix but I think I can find some better solution..
> > ==
> > Because removal from LRU is delayed, mz->lru will never be empty until
> > someone kick drain. This patch rotate LRU while force_empty and makes
> > page_cgroup will be freed.
> > 
> 
> I'd like to rewrite force_empty to move all usage to "default" cgroup.
> There are some reasons.
> 
> 1. current force_empty creates an alive page which has no page_cgroup.
>    This is bad for routine which want to access page_cgroup from page.
>    And this behavior will be an issue of race condition in future.    
I agree that current force_empty is not good in this point.

> 2. We can see amount of out-of-control usage in default cgroup.
> 
> But to do this, I'll have to avoid "hitting limit" in default cgroup.
> I'm now wondering to make it impossible to set limit to default cgroup.
> (will show as a patch in the next version of series.) 
> Does anyone have an idea ?
> 
I don't have a strong objection about setting default cgroup unlimited
and moving usages to default cgroup.

But I think this is related to hierarchy support as Balbir-san says.
And, setting default cgroup unlimited would not be so strange if
hierarchy is supported.


Thanks,
Daisuke Nishimura.

  parent reply	other threads:[~2008-08-21  5:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19  8:30 [PATCH -mm][preview] memcg: a patch series for next [0/9] KAMEZAWA Hiroyuki
2008-08-19  8:37 ` [PATCH -mm][preview] memcg: a patch series for next [1/9] KAMEZAWA Hiroyuki
2008-08-19  8:38   ` [PATCH -mm][preview] memcg: a patch series for next [2/9] KAMEZAWA Hiroyuki
2008-08-19  8:39   ` [PATCH -mm][preview] memcg: a patch series for next [3/9] KAMEZAWA Hiroyuki
2008-08-19  8:40   ` [PATCH -mm][preview] memcg: a patch series for next [4/9] KAMEZAWA Hiroyuki
2008-08-19  8:41   ` [PATCH -mm][preview] memcg: a patch series for next [5/9] KAMEZAWA Hiroyuki
2008-08-19  8:42   ` [PATCH -mm][preview] memcg: a patch series for next [6/9] KAMEZAWA Hiroyuki
2008-08-19  8:43   ` [PATCH -mm][preview] memcg: a patch series for next [7/9] KAMEZAWA Hiroyuki
2008-08-19  8:44   ` [PATCH -mm][preview] memcg: a patch series for next [8/9] KAMEZAWA Hiroyuki
2008-08-22 10:29     ` Daisuke Nishimura
2008-08-22 11:54       ` KAMEZAWA Hiroyuki
2008-08-19  8:44   ` [PATCH -mm][preview] memcg: a patch series for next [9/9] KAMEZAWA Hiroyuki
2008-08-19  9:11 ` [PATCH -mm][preview] memcg: a patch series for next [0/9] Daisuke Nishimura
2008-08-20  1:26   ` KAMEZAWA Hiroyuki
2008-08-20  3:30 ` Balbir Singh
2008-08-20  3:51   ` KAMEZAWA Hiroyuki
2008-08-20  9:53 ` [RFC][PATCH -mm 0/7] memcg: lockless page_cgroup v1 KAMEZAWA Hiroyuki
2008-08-20  9:55   ` [RFC][PATCH -mm 1/7] memcg: page_cgroup_atomic_flags.patch KAMEZAWA Hiroyuki
2008-08-20  9:59   ` [RFC][PATCH -mm 2/7] memcg: delayed_batch_freeing_of_page_cgroup.patch KAMEZAWA Hiroyuki
2008-08-20 10:03   ` [RFC][PATCH -mm 3/7] memcg: freeing page_cgroup by rcu.patch KAMEZAWA Hiroyuki
2008-08-20 10:04   ` [RFC][PATCH -mm 4/7] memcg: lockless page_cgroup KAMEZAWA Hiroyuki
2008-08-20 10:05   ` [RFC][PATCH -mm 5/7] memcg: prefetch mem cgroup per zone KAMEZAWA Hiroyuki
2008-08-20 10:07   ` [RFC][PATCH -mm 6/7] memcg: make-mapping-null-before-calling-uncharge.patch KAMEZAWA Hiroyuki
2008-08-22  4:57     ` Daisuke Nishimura
2008-08-22  5:48       ` KAMEZAWA Hiroyuki
2008-08-20 10:08   ` [RFC][PATCH -mm 7/7] memcg: add page_cgroup.h header file KAMEZAWA Hiroyuki
2008-08-20 10:41   ` [RFC][PATCH -mm 0/7] memcg: lockless page_cgroup v1 KAMEZAWA Hiroyuki
2008-08-20 11:00     ` KAMEZAWA Hiroyuki
2008-08-21  2:17       ` KAMEZAWA Hiroyuki
2008-08-21  3:36         ` Balbir Singh
2008-08-21  3:58           ` KAMEZAWA Hiroyuki
2008-08-21  3:54         ` Daisuke Nishimura [this message]
2008-08-21  8:34       ` KAMEZAWA Hiroyuki
2008-08-20 11:33   ` Hirokazu Takahashi

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=20080821125418.741b826b.nishimura@mxp.nes.nec.co.jp \
    --to=nishimura@mxp.nes.nec.co.jp \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryov@valinux.co.jp \
    --cc=yamamoto@valinux.co.jp \
    /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

all inboxes | Powered by JetHome®