Hide Forgot
Description of problem: hugetlbfs does not deal with minus value echoing to /proc/sys/vm/nr_hugepages gracefully. Version-Release number of selected component (if applicable): 2.6.32-99.el6.x86_64 How reproducible: always. Steps to Reproduce: 1. echo -1 > /proc/sys/vm/nr_hugepages 2. cat /proc/meminfo 3. Actual results: [root@dell-per510-01 mnt]# cat /proc/meminfo MemTotal: 16323332 kB MemFree: 15323236 kB Buffers: 119928 kB Cached: 352784 kB SwapCached: 0 kB Active: 269992 kB Inactive: 237640 kB Active(anon): 35124 kB Inactive(anon): 28 kB Active(file): 234868 kB Inactive(file): 237612 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 18563064 kB SwapFree: 18563064 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 34940 kB Mapped: 13812 kB Shmem: 232 kB Slab: 411172 kB SReclaimable: 86516 kB SUnreclaim: 324656 kB KernelStack: 2648 kB PageTables: 4952 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 26721656 kB Committed_AS: 138716 kB VmallocTotal: 34359738367 kB VmallocUsed: 310000 kB VmallocChunk: 34359423152 kB HardwareCorrupted: 0 kB AnonHugePages: 8192 kB HugePages_Total: 3 HugePages_Free: 3 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 6756 kB DirectMap2M: 16760832 kB Expected results: HugePages_Total: preferred to be 0 or keep unchanged. Additional info: If echo other minus value, the HugePages_Total: and HugePages_Free: will changed randomly, eg, [root@dell-per510-01 mnt]# echo -100 > /proc/sys/vm/nr_hugepages [root@dell-per510-01 mnt]# cat /proc/meminfo MemTotal: 16323332 kB MemFree: 15319140 kB Buffers: 119936 kB Cached: 352788 kB SwapCached: 0 kB Active: 270012 kB Inactive: 237648 kB Active(anon): 35144 kB Inactive(anon): 28 kB Active(file): 234868 kB Inactive(file): 237620 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 18563064 kB SwapFree: 18563064 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 34940 kB Mapped: 13812 kB Shmem: 232 kB Slab: 411176 kB SReclaimable: 86520 kB SUnreclaim: 324656 kB KernelStack: 2648 kB PageTables: 4952 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 26719608 kB Committed_AS: 138716 kB VmallocTotal: 34359738367 kB VmallocUsed: 310000 kB VmallocChunk: 34359423152 kB HardwareCorrupted: 0 kB AnonHugePages: 8192 kB HugePages_Total: 5 HugePages_Free: 5 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 6756 kB DirectMap2M: 16760832 kB
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative.
patch has been sent to upstream and will be in Linus' tree very soon: https://lkml.org/lkml/2011/2/22/427 (credits to Peter Holasek)
patch posted for review. move the BZ state to POST.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Patch(es) available on kernel-2.6.32-150.el6
Reproduced in 2.6.32-130.el6.x86_64 and verified in 2.6.32-155.el6.x86_64.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2011-1530.html