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

From: Chen, Kenneth W <kenneth.w.chen_at_intel.com>
Date: 2004-03-31 18:51:45
>>>> Andy Whitcroft wrote on Tuesday, March 30, 2004 5:49 PM
>>> 	fd = open("/mnt/htlb/myhtlbfile", O_CREAT|O_RDWR, 0755);
>>> 	mmap(..., fd, offset);
>>>
>>> Accounting didn't happen in this case, (grep Huge /proc/meminfo):
>
> O.k.  Try this one.  Should fix that case.  There is some uglyness in
> there which needs review, but my testing says this works.

Under common case, worked perfectly!  But there are always corner cases.

I can think of two ugliness:
1. very sparse hugetlb file.  I can mmap one hugetlb page, at offset
   512 GB.  This would account 512GB + 1 hugetlb page as committed_AS.
   But I only asked for one page mapping.  One can say it's a feature,
   but I think it's a bug.

2. There is no error checking (to undo the committed_AS accounting) after
   hugetlb_prefault(). hugetlb_prefault doesn't always succeed in allocat-
   ing all the pages user asked for due to disk quota limit.  It can have
   partial allocation which would put the committed_AS in a wedged state.

- Ken


-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Mar 31 03:58:17 2004

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