[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49F11177.6000709@cn.fujitsu.com>
Date: Fri, 24 Apr 2009 09:10:15 +0800
From: Gui Jianfeng <guijianfeng@...fujitsu.com>
To: Andrea Righi <righi.andrea@...il.com>
CC: Paul Menage <menage@...gle.com>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
agk@...rceware.org, akpm@...ux-foundation.org, axboe@...nel.dk,
baramsori72@...il.com, Carl Henrik Lunde <chlunde@...g.uio.no>,
dave@...ux.vnet.ibm.com, Divyesh Shah <dpshah@...gle.com>,
eric.rannaud@...il.com, fernando@....ntt.co.jp,
Hirokazu Takahashi <taka@...inux.co.jp>,
Li Zefan <lizf@...fujitsu.com>, matt@...ehost.com,
dradford@...ehost.com, ngupta@...gle.com, randy.dunlap@...cle.com,
roberto@...it.it, Ryo Tsuruta <ryov@...inux.co.jp>,
Satoshi UCHIDA <s-uchida@...jp.nec.com>,
subrata@...ux.vnet.ibm.com, yoshikawa.takuya@....ntt.co.jp,
Nauman Rafique <nauman@...gle.com>, fchecconi@...il.com,
paolo.valente@...more.it, containers@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/7] cgroup: io-throttle controller (v14)
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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists