Re: [Bug 56881] New: MAP_HUGETLB mmap fails for certain sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Sat, 20 Apr 2013 03:00:30 +0000 (UTC) bugzilla-daemon@xxxxxxxxxxxxxxxxxxx wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=56881
> 
>            Summary: MAP_HUGETLB mmap fails for certain sizes
>            Product: Memory Management
>            Version: 2.5
>     Kernel Version: 3.5.0-27

Thanks.

It's a post-3.4 regression, testcase included.  Does someone want to
take a look, please?

>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: high
>           Priority: P1
>          Component: Other
>         AssignedTo: akpm@xxxxxxxxxxxxxxxxxxxx
>         ReportedBy: iceman_dvd@xxxxxxxxx
>         Regression: No
> 
> 
> This is on an Ubuntu 12.10 desktop, but the same issue has been found on 12.04
> with 3.5.0 kernel.
> See the sample program. An allocation with MAP_HUGETLB consistently fails with
> certain sizes, while it succeeds with others.
> The allocation sizes are well below the number of free huge pages.
> 
> $ uname -a Linux davide-lnx2 3.5.0-27-generic #46-Ubuntu SMP Mon Mar 25
> 19:58:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> 
> 
> # echo 100 > /proc/sys/vm/nr_hugepages
> 
> # cat /proc/meminfo
> ...
> AnonHugePages:         0 kB
> HugePages_Total:     100
> HugePages_Free:      100
> HugePages_Rsvd:        0
> HugePages_Surp:        0
> Hugepagesize:       2048 kB
> 
> 
> $ ./mmappu $((5 * 2 * 1024 * 1024 - 4096))
> size=10481664    0x9ff000
> hugepage mmap: Invalid argument
> 
> 
> $ ./mmappu $((5 * 2 * 1024 * 1024 - 4095))
> size=10481665    0x9ff001
> OK!
> 
> 
> It seems the trigger point is a normal page size.
> The same binary works flawlessly in previous kernels.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]