Linux v2.5.54
Quoted 1 line
o remove hugetlb syscalls
So finally they did it ...
But mmap(NULL, ...) is not yet supported, this is really sad.
And arch/i386/Kconfig and Documentation/vm/hugetlbpage.txt still document the sys_alloc_hugepages()/sys_free_hugepages() syscalls.
A simple program that doesnt know at all how the memory is layed out by kernel/glibc can not easily get some 4Mo pages in a single syscall. sys_alloc_hugepage() was very convenient for that.
Another problem :
if you mount hugetlbfs in /huge, then create a file /huge/BIG of size 4Mo, then use :
dd if=/huge/BIG of=/dev/null
the dd process hangs on 'D' state : the read() syscall just hang forever.
Thanks
Quoted 6 lines · dada1 wrote:
Quoted 2 lines
o remove hugetlb syscalls
So finally they did it ...
But
mmap(NULL, ...)is not yet supported, this is really sad.
Bill, this appears to be a matter of implementing a suitable ->get_unmapped_area() within hugetlbfs?
Quoted 2 lines
And
arch/i386/KconfigandDocumentation/vm/hugetlbpage.txtstill document the sys_alloc_hugepages()/sys_free_hugepages() syscalls.
OK.
Quoted 3 lines
A simple program that doesnt know at all how the memory is layed out by kernel/glibc can not easily get some 4Mo pages in a single syscall.
sys_alloc_hugepage()was very convenient for that.
Well. One would expect userspace library functions to emerge. The glibc people take patches.
Quoted 9 lines
Another problem :
if you mount hugetlbfs in /huge, then create a file /huge/BIG of size 4Mo, then use :
dd if=/huge/BIG of=/dev/null
the dd process hangs on 'D' state : the
read()syscall just hang forever.
erk. Thanks.
fs/hugetlbfs/inode.c renamed from fs/hugetlbfs/inode.c~hugetlbfs_readpage-fix +1 -0
@@ -79,6 +79,7 @@ static int hugetlbfs_file_mmap(struct fi*/ static int hugetlbfs_readpage (struct file *file,struct page * page) { +unlock_page (page);return -EINVAL ; }
Quoted 2 lines · dada1 wrote:
Quoted 2 lines
So finally they did it ...
Butmmap(NULL, ...)is not yet supported, this is really sad.
Quoted 2 lines · Andrew Morton
Bill, this appears to be a matter of implementing a suitable ->get_unmapped_area() within hugetlbfs?
At the time of hugetlbfs' integration, it was desirable to be minimalistic and the additional logic for placement had no clear motivation, as both privilege and great self-awareness were assumed of the applications using hugetlbfs. Since then, it's become apparent that this placement logic is a requirement for userspace support.
Apologies in advance for great tardiness; however, I'll send in patches implementing in-kernel automatic hugetlb vma placement within 36 hours.
Quoted 2 lines · dada1 wrote:
Quoted 2 lines
And
arch/i386/KconfigandDocumentation/vm/hugetlbpage.txtstill document the sys_alloc_hugepages()/sys_free_hugepages() syscalls.
Documentation updates are also essential, they will also follow shortly, in tandem with the automatic vma placement.
Quoted 3 lines · dada1 wrote:
Quoted 3 lines
A simple program that doesnt know at all how the memory is layed out by kernel/glibc can not easily get some 4Mo pages in a single syscall.
sys_alloc_hugepage()was very convenient for that.
Quoted 2 lines · Andrew Morton
Well. One would expect userspace library functions to emerge. The glibc people take patches.
Ulrich Drepper has already accepted a glibc patch integrating the SHM_HUGETLB flag into glibc. dada1, I'm hopeful your distribution will provide you with an upgrade path to a glibc version implementing it soon, or that you'll otherwise be able to upgrade to a cvs glibc version.
Quoted 5 lines · dada1 wrote:
Quoted 5 lines
Another problem :
if you mount hugetlbfs in /huge, then create a file /huge/BIG of size 4Mo, then use :
dd if=/huge/BIG of=/dev/null
the dd process hangs on 'D' state : theread()syscall just hang forever.
fs/hugetlbfs/inode.c static int hugetlbfs_file_mmap(struct fi · line 84
Quoted 10 lines · Andrew Morton
erk. Thanks.
fs/hugetlbfs/inode.c renamed from fs/hugetlbfs/inode.c~hugetlbfs_readpage-fix +1
-0@@ -79,6 +79,7 @@ static int hugetlbfs_file_mmap(struct fi*/ static int hugetlbfs_readpage (struct file *file,struct page * page) { +unlock_page (page);return -EINVAL ; }
This fix is trivially correct; thanks for finding and addressing it. Linus, please apply.
Thanks for the testing, bugreports, and fixes!
Thanks,
Bill