From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
hugh@veritas.com, taka@valinux.co.jp
Subject: Re: [RFC][PATCH 3/5] memcg : mem+swap controller kconfig
Date: Tue, 4 Nov 2008 18:13:43 +0900 [thread overview]
Message-ID: <20081104181343.3b0eb168.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20081104175406.cb46d68d.nishimura@mxp.nes.nec.co.jp>
On Tue, 4 Nov 2008 17:54:06 +0900
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> > +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
> > +static void __init enable_swap_cgroup(void)
> > +{
> > + if (really_do_swap_account)
> > + do_swap_account = 1;
> > +}
> I think check for !mem_cgroup_subsys.disabled is also needed here.
>
Hmm, mem_cgroup_create() is called even when disabled ?
.......seems so.
Ok, will fix. thank you for checking it.
Regards,
-Kame
>
> Thanks,
> Daisuke Nishimura.
>
> > +#else
> > +static void __init enable_swap_cgroup(void)
> > +{
> > +}
> > +#endif
> > +
> > static struct cgroup_subsys_state *
> > mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
> > {
> > @@ -1377,6 +1398,7 @@ mem_cgroup_create(struct cgroup_subsys *
> >
> > if (unlikely((cont->parent) == NULL)) {
> > mem = &init_mem_cgroup;
> > + enable_swap_cgroup();
> > } else {
> > mem = mem_cgroup_alloc();
> > if (!mem)
> > @@ -1460,3 +1482,13 @@ struct cgroup_subsys mem_cgroup_subsys =
> > .attach = mem_cgroup_move_task,
> > .early_init = 0,
> > };
> > +
> > +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
> > +
> > +static int __init disable_swap_account(char *s)
> > +{
> > + really_do_swap_account = 0;
> > + return 1;
> > +}
> > +__setup("noswapaccount", disable_swap_account);
> > +#endif
> > Index: mmotm-2.6.28-rc2+/Documentation/kernel-parameters.txt
> > ===================================================================
> > --- mmotm-2.6.28-rc2+.orig/Documentation/kernel-parameters.txt
> > +++ mmotm-2.6.28-rc2+/Documentation/kernel-parameters.txt
> > @@ -1543,6 +1543,9 @@ and is between 256 and 4096 characters.
> >
> > nosoftlockup [KNL] Disable the soft-lockup detector.
> >
> > + noswapaccount [KNL] Disable accounting of swap in memory resource
> > + controller. (See Documentation/controllers/memory.txt)
> > +
> > nosync [HW,M68K] Disables sync negotiation for all devices.
> >
> > notsc [BUGS=X86-32] Disable Time Stamp Counter
> > Index: mmotm-2.6.28-rc2+/include/linux/memcontrol.h
> > ===================================================================
> > --- mmotm-2.6.28-rc2+.orig/include/linux/memcontrol.h
> > +++ mmotm-2.6.28-rc2+/include/linux/memcontrol.h
> > @@ -77,6 +77,9 @@ extern void mem_cgroup_record_reclaim_pr
> > extern long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, struct zone *zone,
> > int priority, enum lru_list lru);
> >
> > +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
> > +extern int do_swap_account;
> > +#endif
> >
> > #else /* CONFIG_CGROUP_MEM_RES_CTLR */
> > struct mem_cgroup;
> >
>
--
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>
next prev parent reply other threads:[~2008-11-04 9:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-31 2:50 [RFC][PATCH 0/5] memcg : some patches related to swap KAMEZAWA Hiroyuki
2008-10-31 2:52 ` [RFC][PATCH 1/5] memcg : force_empty to do move account KAMEZAWA Hiroyuki
2008-10-31 9:25 ` Daisuke Nishimura
2008-11-04 6:15 ` Paul Menage
2008-11-04 6:17 ` KAMEZAWA Hiroyuki
2008-11-04 6:23 ` Paul Menage
2008-11-04 6:25 ` KAMEZAWA Hiroyuki
2008-10-31 2:54 ` [RFC][PATCH 2/5] memcg : handle swap cache KAMEZAWA Hiroyuki
2008-11-04 8:42 ` Daisuke Nishimura
2008-11-04 9:04 ` KAMEZAWA Hiroyuki
2008-11-04 10:28 ` Daisuke Nishimura
2008-11-05 0:07 ` KAMEZAWA Hiroyuki
2008-11-05 2:03 ` KAMEZAWA Hiroyuki
2008-10-31 2:55 ` [RFC][PATCH 3/5] memcg : mem+swap controller kconfig KAMEZAWA Hiroyuki
2008-11-04 8:54 ` Daisuke Nishimura
2008-11-04 9:13 ` KAMEZAWA Hiroyuki [this message]
2008-10-31 2:58 ` [RFC][PATCH 4/5] memcg : add swap_cgroup KAMEZAWA Hiroyuki
2008-10-31 2:59 ` [RFC][PATCH 5/5] memcg : mem+swap controller KAMEZAWA Hiroyuki
2008-11-02 6:43 ` [RFC][PATCH 6/5] memcg : synchronous LRU 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=20081104181343.3b0eb168.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=taka@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