From: Gavin Shan <shangw@linux.vnet.ibm.com>
To: David Rientjes <rientjes@google.com>
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
linux-mm@kvack.org, akpm@linux-foundation.org
Subject: Re: [PATCH] mm/buddy: more comments for skip_free_areas_node()
Date: Tue, 10 Jul 2012 08:51:40 +0800 [thread overview]
Message-ID: <20120710005140.GA5557@shangw> (raw)
In-Reply-To: <alpine.DEB.2.00.1207091417430.23926@chino.kir.corp.google.com>
On Mon, Jul 09, 2012 at 02:21:07PM -0700, David Rientjes wrote:
>On Fri, 6 Jul 2012, Gavin Shan wrote:
>
>> >> The initial idea comes from Cong Wang. We're running out of memory
>> >> while calling function skip_free_areas_node(). So it would be unsafe
>> >> to allocate more memory from either stack or heap. The patche adds
>> >> more comments to address that.
>> >
>> >I think these comments should add to show_free_areas(),
>> >not skip_free_areas_node().
>> >
>>
>> aha, exactly. Thanks a lot, Cong.
>>
>
>There are two issues you're trying to describe here that I told you about:
>
> - allocating memory on the stack when called in a potentially very deep
> call chain, and
>
> - dynamically allocating memory in oom conditions.
>
>There are thousands of functions that could be called potentially very
>deep in a call chain, there's nothing special about this one besides the
>fact that you tried to optimize it by allocating a nodemask on the stack
>in a previous patch.
>
>show_mem(), which calls show_free_areas(), is also not called only in oom
>conditions so the comment wouldn't apply at all.
>
>In other words, there's nothing special about this particular function
>with regard to these traits.
>
Thanks for your review, David. So please drop it :-)
Thanks,
Gavin
--
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>
prev parent reply other threads:[~2012-07-10 0:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 3:24 [PATCH] mm/buddy: more comments for skip_free_areas_node() Gavin Shan
2012-07-06 5:42 ` Cong Wang
2012-07-06 5:46 ` Gavin Shan
2012-07-09 21:21 ` David Rientjes
2012-07-10 0:51 ` Gavin Shan [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=20120710005140.GA5557@shangw \
--to=shangw@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=xiyou.wangcong@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).