From: Johannes Weiner <hannes@cmpxchg.org>
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: linux-mm <linux-mm@kvack.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: Re: [RFC][PATCH] memcg: add valid check at allocating or freeing memory
Date: Sun, 26 Dec 2010 00:06:17 +0100 [thread overview]
Message-ID: <20101225230617.GH2048@cmpxchg.org> (raw)
In-Reply-To: <20101224093131.274c8728.nishimura@mxp.nes.nec.co.jp>
Hi Daisuke-san,
two other things:
On Fri, Dec 24, 2010 at 09:31:31AM +0900, Daisuke Nishimura wrote:
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -146,6 +146,8 @@ unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
> gfp_t gfp_mask);
> u64 mem_cgroup_get_limit(struct mem_cgroup *mem);
>
> +bool mem_cgroup_bad_page_check(struct page *page);
> +void mem_cgroup_print_bad_page(struct page *page);
Can you put those under CONFIG_DEBUG_VM and the dummies below under
!CONFIG_CGROUP_MEM_RES_CTLR || !CONFIG_DEBUG_VM?
The most likely configuration on distro kernels is memcg enabled and
VM debugging disabled. It would be good to save the unneeded function
calls in the allocator hotpath for the common case.
Also:
> @@ -336,6 +338,16 @@ u64 mem_cgroup_get_limit(struct mem_cgroup *mem)
> return 0;
> }
>
> +static inline bool
> +mem_cgroup_bad_page_check(struct page *page)
> +{
> + return false;
> +}
> +
> +static void
That needs an `inline' as well.
Thanks!
Hannes
--
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>
prev parent reply other threads:[~2010-12-25 23:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-24 0:31 Daisuke Nishimura
2010-12-24 8:37 ` Johannes Weiner
2010-12-27 3:35 ` Daisuke Nishimura
2010-12-24 9:09 ` Balbir Singh
2010-12-27 3:35 ` Daisuke Nishimura
2010-12-28 4:34 ` Balbir Singh
2010-12-25 23:06 ` Johannes Weiner [this message]
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=20101225230617.GH2048@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--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