Re: [PATCH] mm/buddy: more comments for skip_free_areas_node()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]