From: David Rientjes <rientjes@google.com>
To: Gavin Shan <shangw@linux.vnet.ibm.com>
Cc: 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: Mon, 9 Jul 2012 14:21:07 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1207091417430.23926@chino.kir.corp.google.com> (raw)
In-Reply-To: <20120706054639.GA32570@shangw>
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.
--
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:[~2012-07-09 21:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 3:24 Gavin Shan
2012-07-06 5:42 ` Cong Wang
2012-07-06 5:46 ` Gavin Shan
2012-07-09 21:21 ` David Rientjes [this message]
2012-07-10 0:51 ` Gavin Shan
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=alpine.DEB.2.00.1207091417430.23926@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=shangw@linux.vnet.ibm.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