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

From: Chen, Kenneth W <>
Date: 2004-03-31 06:04:18
>>>>> Andy Whitcroft wrote on Tuesday, March 30, 2004 4:58 AM
> >
> > Just to follow up myself, I meant overcommit accounting is not done
> > for mmap hugetlb page.  (typical Monday morning symptom :))
> Essentially, hugetlb pages can only be part of a shared mapping in
> the current implementation.  As a result all commitments are made
> and checked at segment create time.  The commitment cannot change.
> Hope that's what you meant.

Not quite, I can simply mmap on a hugetlbfs backed file to get hugetlb
pages.  File expansion is transparent.  It gets even trickier with file
that has holes in it.

I can do:
	fd = open("/mnt/htlb/myhtlbfile", O_CREAT|O_RDWR, 0755);
	mmap(..., fd, offset);

Accounting didn't happen in this case, (grep Huge /proc/meminfo):

HugePages_Total:    10
HugePages_Free:      9
Hugepagesize:    262144 kB
HugeCommitted_AS:     0 kB

Now if I remove the file "myhtlbfile", accounting is done for inode
removal and hugetlb_committed_space underflows.

HugePages_Total:    10
HugePages_Free:     10
Hugepagesize:    262144 kB
HugeCommitted_AS: 18446744073709289472 kB

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue Mar 30 15:17:13 2004

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