Re: [PATCH] do not count pages in holes with sparsemem

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

 



Hi Atsushi,

Sorry for the delay...

Atsushi Nemoto wrote:
> On Tue, 11 Jul 2006 10:33:31 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote:
>>> We can, but we can get more precise value using page_is_ram().  The
>>> pfn_valid() returns true for _all_ pages on present section, and
>>> currently the section size is 256MB.
>> so your total pages of RAM in show_mem() is incorrect...
>>
>>                if (!pfn_valid(pfn))
>>                         continue;
>>                 page = pfn_to_page(pfn);
>>                 total++;
>>
>>
>> I don't know SPARSEMEM a lot but is it allowed to have holes inside
>> a section ? Shouldn't we tune the section size to avoid holes inside
>> section ?
> 
> If holes exist in a section, show_mem() will count these pages as
> "reserved".  You can count real pages by "total - reserved".
> 

I don't think that's correct to mark them as "reserved". Basicaly
"reserved" means that it belongs to the kernel (code or data), these
holes are not and we will end up to have wrong value as you pointed
out.

Having quick look at sparsemem code, I don't think that it expects
to have holes inside a section, do it ? If so you probably have to
fix up your section size...

> Talking about nr_kernel_pages (calculated by zones_size[] and
> zones_holes[]) and num_physpages, these values are used to determine
> sizes of some kernel data structures, it would be better to set more
> precise value for them.
> 
> While large holes in a section wastes some memory, make the section
> size customizable might be a good idea.  Anyone?  ;-)
> 

hey, you are working in this area, aren't you ? ;)

		Franck


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux