Re: [RFC] calc_memmap_size() isn't accurate and one suggestion to improve

2017-04-08 Thread Wei Yang
On Mon, Apr 03, 2017 at 11:18:19AM +0200, Michal Hocko wrote: >On Tue 28-03-17 09:11:37, Wei Yang wrote: >> Hi, masters, >> >> # What I found >> >> I found the function calc_memmap_size() may not be that accurate to get the >> pages for memmap. >> >> The reason is: >> >> > memmap is allocated o

Re: [RFC] calc_memmap_size() isn't accurate and one suggestion to improve

2017-04-03 Thread Michal Hocko
On Tue 28-03-17 09:11:37, Wei Yang wrote: > Hi, masters, > > # What I found > > I found the function calc_memmap_size() may not be that accurate to get the > pages for memmap. > > The reason is: > > > memmap is allocated on a node base, > > while the calculation is on a zone base > > This appl

[RFC] calc_memmap_size() isn't accurate and one suggestion to improve

2017-03-27 Thread Wei Yang
Hi, masters, # What I found I found the function calc_memmap_size() may not be that accurate to get the pages for memmap. The reason is: > memmap is allocated on a node base, > while the calculation is on a zone base This applies both to SPARSEMEM and FLATMEM. For example, on my laptop with 6