From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>,
"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH 4/4] memcg: fix rmdir, force_empty with THP
Date: Fri, 21 Jan 2011 08:41:51 +0900 [thread overview]
Message-ID: <20110121084151.4673c179.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20110121083930.d803126f.kamezawa.hiroyu@jp.fujitsu.com>
On Fri, 21 Jan 2011 08:39:30 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Thu, 20 Jan 2011 14:41:08 +0100
> Johannes Weiner <hannes@cmpxchg.org> wrote:
>
> > On Tue, Jan 18, 2011 at 11:43:48AM +0900, KAMEZAWA Hiroyuki wrote:
> > >
> > > Now, when THP is enabled, memcg's rmdir() function is broken
> > > because move_account() for THP page is not supported.
> > >
> > > This will cause account leak or -EBUSY issue at rmdir().
> > > This patch fixes the issue by supporting move_account() THP pages.
> > >
> > > Changelog:
> > > - style fix.
> > > - add compound_lock for avoiding races.
> > >
> > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > ---
> > > mm/memcontrol.c | 37 ++++++++++++++++++++++++++-----------
> > > 1 file changed, 26 insertions(+), 11 deletions(-)
> > >
> > > Index: mmotm-0107/mm/memcontrol.c
> > > ===================================================================
> > > --- mmotm-0107.orig/mm/memcontrol.c
> > > +++ mmotm-0107/mm/memcontrol.c
> >
> > > @@ -2267,6 +2274,8 @@ static int mem_cgroup_move_parent(struct
> > > struct cgroup *cg = child->css.cgroup;
> > > struct cgroup *pcg = cg->parent;
> > > struct mem_cgroup *parent;
> > > + int charge = PAGE_SIZE;
> >
> > No need to initialize, you assign it unconditionally below.
> >
> > It's also a bit unfortunate that the parameter/variable with this
> > meaning appears under a whole bunch of different names. page_size,
> > charge_size, and now charge. Could you stick with page_size?
> >
>
> charge_size != page_size.
>
> Clean up as you like, later. I'll Ack.
>
> > > @@ -2278,17 +2287,23 @@ static int mem_cgroup_move_parent(struct
> > > goto out;
> > > if (isolate_lru_page(page))
> > > goto put;
> > > + /* The page is isolated from LRU and we have no race with splitting */
> > > + charge = PAGE_SIZE << compound_order(page);
> >
> > Why is LRU isolation preventing the splitting?
> >
>
> That's my mistake of comment, which was in the older patch.
> I use compound_lock now. I'll post clean up.
>
It seems patches are sent to Linus's tree.
I'll post some clean up patches for memcontrol.c.
I hope that will not break other guy's works.
Thanks,
-kame
--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-01-20 23:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 2:35 [PATCH 0/4] fix THP and memcg issues v3 KAMEZAWA Hiroyuki
2011-01-18 2:36 ` [PATCH 1/4] memcg: modify accounting function for supporting THP better KAMEZAWA Hiroyuki
2011-01-18 2:40 ` [PATCH 2/4] memcg: fix USED bit handling at uncharge in THP KAMEZAWA Hiroyuki
2011-01-19 12:10 ` Johannes Weiner
2011-01-20 0:55 ` KAMEZAWA Hiroyuki
2011-01-18 2:42 ` [PATCH 3/4] memcg: fix LRU accounting with THP KAMEZAWA Hiroyuki
2011-01-18 2:43 ` [PATCH 4/4] memcg: fix rmdir, force_empty " KAMEZAWA Hiroyuki
2011-01-20 13:41 ` Johannes Weiner
2011-01-20 23:39 ` KAMEZAWA Hiroyuki
2011-01-20 23:41 ` KAMEZAWA Hiroyuki [this message]
2011-01-21 0:21 ` nishimura
-- strict thread matches above, loose matches on Subject: below --
2011-01-18 2:06 [PATCH 0/4] fix THP and memcg issues v2 KAMEZAWA Hiroyuki
2011-01-18 2:10 ` [PATCH 2/4] memcg: fixe USED bit handling at uncharge with THP KAMEZAWA Hiroyuki
2011-01-18 2:15 ` [PATCH 4/4] memcg: fix rmdir, force_empty " 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=20110121084151.4673c179.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.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