# Re: \[PATCH V2 1/2\] mm/page\_alloc: Replace set\_dma\_reserve to set\_memory\_reserve

- From: Srikar Dronamraju \<hidden\>
- Date: 2016-08-05 16:39:24 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2016/08/6481645
- Thread: https://ratatoskr.run/linux-mm/2016/08/6481621/t.md

```text
* Mel Gorman [ref] [2016-08-05 07:47:47]:

> On Thu, Aug 04, 2016 at 10:42:08PM +0530, Srikar Dronamraju wrote:
> > 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
```
