Thread (9 messages) 9 messages, 4 authors, 2016-08-29

Re: [PATCH V2 1/2] mm/page_alloc: Replace set_dma_reserve to set_memory_reserve

flat view

From: Srikar Dronamraju <hidden>
Date: 2016-08-05 16:39:24
Also in: linux-mm

* Mel Gorman [off-list ref] [2016-08-05 07:47:47]:
On Thu, Aug 04, 2016 at 10:42:08PM +0530, Srikar Dronamraju wrote:
quoted
Expand the scope of the existing dma_reserve to accommodate other memory
reserves too. Accordingly rename variable dma_reserve to
nr_memory_reserve.

set_memory_reserve also takes a new parameter that helps to identify if
the current value needs to be incremented.
I think the parameter is ugly and it should have been just
inc_memory_reserve but at least it works.
Yes while the parameter is definitely ugly, the only other use
case in arch/x86/kernel/e820.c seems to be written with an intention to
set to an absolute value.

It was "set_dma_reserve(nr_pages - nr_free_pages)". Both of them
nr_pages and nr_free_pages are calculated after walking through the mem
blocks. I didnt want to take a chance where someother code path also
starts to set reserve value and then the code in e820.c just increments
it.

However if you still feel strongly about using inc_memory_reserve than
set_memory_reserve, I will respin.


-- 
Thanks and Regards
Srikar Dronamraju
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help