Re: [PATCH] [0/6] HUGETLB memory commitment

From: Andrew Morton <>
Date: 2004-03-26 08:04:33
Andy Whitcroft <> wrote:
> HUGETLB Overcommit Handling
> ---------------------------
> When building mappings the kernel tracks committed but not yet
> allocated pages against available memory and swap preventing memory
> allocation problems later.  The introduction of hugetlb pages has
> has significant ramifications for this accounting as the pages used
> to back them are already removed from the available memory pool.

Sorry, but I just don't see why we need all this complexity and generality.

If there was any likelihood that there would be additional memory domains
in the 2.6 future then OK.  But I don't think there will be.  We simply
need some little old patch which fixes this bug.

Such as adding a `vma' arg to vm_enough_memory() and vm_unacct_memory() and

	if (is_vm_hugetlb_page(vma))


-	allowed = totalram_pages * sysctl_overcommit_ratio / 100;
+	allowed = (totalram_pages - htlbpagemem << HPAGE_SHIFT) *
+			sysctl_overcommit_ratio / 100;

in cap_vm_enough_memory().

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Thu Mar 25 16:03:19 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:24 EST