From: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
To: Andrea Righi <righi.andrea@gmail.com>
Cc: Paul Menage <menage@google.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
agk@sourceware.org, akpm@linux-foundation.org, axboe@kernel.dk,
baramsori72@gmail.com, Carl Henrik Lunde <chlunde@ping.uio.no>,
dave@linux.vnet.ibm.com, Divyesh Shah <dpshah@google.com>,
eric.rannaud@gmail.com, fernando@oss.ntt.co.jp,
Hirokazu Takahashi <taka@valinux.co.jp>,
Li Zefan <lizf@cn.fujitsu.com>,
matt@bluehost.com, dradford@bluehost.com, ngupta@google.com,
randy.dunlap@oracle.com, roberto@unbit.it,
Ryo Tsuruta <ryov@valinux.co.jp>,
Satoshi UCHIDA <s-uchida@ap.jp.nec.com>,
subrata@linux.vnet.ibm.com, yoshikawa.takuya@oss.ntt.co.jp,
Nauman Rafique <nauman@google.com>,
fchecconi@gmail.com, paolo.valente@unimore.it,
containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/7] cgroup: io-throttle controller (v14)
Date: Fri, 24 Apr 2009 09:10:15 +0800 [thread overview]
Message-ID: <49F11177.6000709@cn.fujitsu.com> (raw)
In-Reply-To: <20090423101400.GA16768@linux>
Andrea Righi wrote:
> page_cgroup_*_onwer are defined in mm/page_cgroup.c, that is built if
> CONFIG_PAGE_TRACKING=y. But from init/Kconfig:
page_cgroup_*_onwer also depend on CONFIG_SPARSEMEM, if !defined(CONFIG_SPARSEMEM),
they won't be built. So just move them out of CONFIG_SPARSEMEM block.
>
> config CGROUP_IO_THROTTLE
> bool "Enable cgroup I/O throttling"
> depends on CGROUPS && RESOURCE_COUNTERS && EXPERIMENTAL
> select MM_OWNER
> select PAGE_TRACKING
> ^^^^^^^^^^^^^
> mmmh??? it should be correct.
>
> And I don't understand how the following patch can fix this problem...
>
> Could you post your .config?
>
> Thanks,
> -Andrea
>
>> Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
>> ---
>> mm/page_cgroup.c | 65 ++++++++++++++++++++++++++---------------------------
>> 1 files changed, 32 insertions(+), 33 deletions(-)
>>
>> diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
>> index b3b394c..9c392f1 100644
>> --- a/mm/page_cgroup.c
>> +++ b/mm/page_cgroup.c
>> @@ -244,6 +244,38 @@ static int __meminit page_cgroup_callback(struct notifier_block *self,
>>
>> #endif
>>
>> +void __init page_cgroup_init(void)
>> +{
>> + unsigned long pfn;
>> + int fail = 0;
>> +
>> + if (mem_cgroup_disabled() && iothrottle_disabled())
>> + return;
>> +
>> + for (pfn = 0; !fail && pfn < max_pfn; pfn += PAGES_PER_SECTION) {
>> + if (!pfn_present(pfn))
>> + continue;
>> + fail = init_section_page_cgroup(pfn);
>> + }
>> + if (fail) {
>> + printk(KERN_CRIT
>> + "try cgroup_disable=memory,blockio boot option\n");
>> + panic("Out of memory");
>> + } else {
>> + hotplug_memory_notifier(page_cgroup_callback, 0);
>> + }
>> + printk(KERN_INFO "allocated %ld bytes of page_cgroup\n", total_usage);
>> + printk(KERN_INFO
>> + "try cgroup_disable=memory,blockio option if you don't want\n");
>> +}
>> +
>> +void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
>> +{
>> + return;
>> +}
>> +
>> +#endif
>> +
>> /**
>> * page_cgroup_get_owner() - get the owner ID of a page
>> * @page: the page we want to find the owner
>> @@ -317,39 +349,6 @@ int page_cgroup_copy_owner(struct page *npage, struct page *opage)
>> return 0;
>> }
>>
>> -void __init page_cgroup_init(void)
>> -{
>> - unsigned long pfn;
>> - int fail = 0;
>> -
>> - if (mem_cgroup_disabled() && iothrottle_disabled())
>> - return;
>> -
>> - for (pfn = 0; !fail && pfn < max_pfn; pfn += PAGES_PER_SECTION) {
>> - if (!pfn_present(pfn))
>> - continue;
>> - fail = init_section_page_cgroup(pfn);
>> - }
>> - if (fail) {
>> - printk(KERN_CRIT
>> - "try cgroup_disable=memory,blockio boot option\n");
>> - panic("Out of memory");
>> - } else {
>> - hotplug_memory_notifier(page_cgroup_callback, 0);
>> - }
>> - printk(KERN_INFO "allocated %ld bytes of page_cgroup\n", total_usage);
>> - printk(KERN_INFO
>> - "try cgroup_disable=memory,blockio option if you don't want\n");
>> -}
>> -
>> -void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
>> -{
>> - return;
>> -}
>> -
>> -#endif
>> -
>> -
>> #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
>>
>> static DEFINE_MUTEX(swap_cgroup_mutex);
>> --
>> 1.5.4.rc3
>
>
>
--
Regards
Gui Jianfeng
next prev parent reply other threads:[~2009-04-24 1:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-18 21:37 [PATCH 0/7] cgroup: io-throttle controller (v14) Andrea Righi
[not found] ` <1240090636-898-1-git-send-email-righi.andrea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-04-20 8:39 ` Gui Jianfeng
2009-04-20 8:39 ` Gui Jianfeng
[not found] ` <49EC34C1.6010709-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-04-20 14:48 ` Andrea Righi
2009-04-20 14:48 ` Andrea Righi
2009-04-21 1:16 ` Gui Jianfeng
2009-04-21 1:16 ` Gui Jianfeng
2009-04-21 9:58 ` Andrea Righi
2009-04-22 1:09 ` Gui Jianfeng
[not found] ` <49EE6E3C.8050409-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-04-22 12:43 ` Andrea Righi
2009-04-22 12:43 ` Andrea Righi
2009-04-23 2:58 ` Gui Jianfeng
[not found] ` <49EFD948.7050803-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-04-23 10:14 ` Andrea Righi
2009-04-23 10:14 ` Andrea Righi
2009-04-24 1:10 ` Gui Jianfeng
2009-04-24 1:10 ` Gui Jianfeng [this message]
[not found] ` <49F11177.6000709-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-04-24 8:13 ` Andrea Righi
2009-04-24 8:13 ` Andrea Righi
2009-04-23 2:58 ` Gui Jianfeng
2009-04-22 1:09 ` Gui Jianfeng
[not found] ` <49ED1E66.6030604-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-04-21 9:58 ` Andrea Righi
-- strict thread matches above, loose matches on Subject: below --
2009-04-18 21:37 Andrea Righi
2009-04-18 21:38 Andrea Righi
2009-04-18 21:38 Andrea Righi
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=49F11177.6000709@cn.fujitsu.com \
--to=guijianfeng@cn.fujitsu.com \
--cc=agk@sourceware.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=balbir@linux.vnet.ibm.com \
--cc=baramsori72@gmail.com \
--cc=chlunde@ping.uio.no \
--cc=containers@lists.linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=dpshah@google.com \
--cc=dradford@bluehost.com \
--cc=eric.rannaud@gmail.com \
--cc=fchecconi@gmail.com \
--cc=fernando@oss.ntt.co.jp \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=matt@bluehost.com \
--cc=menage@google.com \
--cc=nauman@google.com \
--cc=ngupta@google.com \
--cc=paolo.valente@unimore.it \
--cc=randy.dunlap@oracle.com \
--cc=righi.andrea@gmail.com \
--cc=roberto@unbit.it \
--cc=ryov@valinux.co.jp \
--cc=s-uchida@ap.jp.nec.com \
--cc=subrata@linux.vnet.ibm.com \
--cc=taka@valinux.co.jp \
--cc=yoshikawa.takuya@oss.ntt.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.