Re: [PATCH] [BUGFIX] mm: hugepages can cause negative commitlimit

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

 



On Thu, 19 May 2011 17:11:01 -0500
Russ Anderson <rja@xxxxxxx> wrote:

> OK, I see your point.  The root problem is hugepages allocated at boot are
> subtracted from totalram_pages but hugepages allocated at run time are not.
> Correct me if I've mistate it or are other conditions.
> 
> By "allocated at run time" I mean "echo 1 > /proc/sys/vm/nr_hugepages".
> That allocation will not change totalram_pages but will change
> hugetlb_total_pages().
> 
> How best to fix this inconsistency?  Should totalram_pages include or exclude
> hugepages?  What are the implications?

The problem is that hugetlb_total_pages() is trying to account for two
different things, while totalram_pages accounts for only one of those
things, yes?

One fix would be to stop accounting for huge pages in totalram_pages
altogether.  That might break other things so careful checking would be
needed.

Or we stop accounting for the boot-time allocated huge pages in
hugetlb_total_pages().  Split the two things apart altogether and
account for boot-time allocated and runtime-allocated pages separately.  This
souds saner to me - it reflects what's actually happening in the kernel.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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]