Re: [patch] remove hugetlb syscalls

David Mosberger-Tang
2002-11-14T18:46:22Z

>>>>> On 14 Nov 2002 18:31:15 +0000, Alan Cox <alan@lxorguk.ukuu.org.uk> said:

Alan> On Thu, 2002-11-14 at 17:51, David Mosberger-Tang wrote:
>> One potential downside of this is that programmers might expect
>> mremap(), mprotect() etc. to work on the returned memory at the
>> granularity of base-pages. I'm not sure though whether that was
>> part of the reason Linus wanted separate syscalls.

Alan> The extra syscalls dont change anything. mremap/mprotect still
Alan> fails in the same way after you use them

But that's excactly the point. The hugepage interface returns a
different kind of virtual memory. There are tons of programs out
there using mmap(). If such a program gets fed a path to the
hugepagefs, it might end up with huge pages without knowing anything
about huge pages. For the most part, that might work fine, but it
could lead to subtle failures.

--david