Re: shmget with SHM_HUGETLB flag: Operation not permitted

From: William Lee Irwin III
Date: Thu Feb 26 2004 - 21:12:56 EST


William Lee Irwin III wrote:
>>Check /proc/sys/vm/nr_hugepages and /proc/sys/kernel/shmmax also.

On Fri, Feb 27, 2004 at 02:33:08AM +0100, Jochen Roemling wrote:
> cat /proc/sys/vm/nr_hugepages
> 64

256MB limit there.


On Fri, Feb 27, 2004 at 02:33:08AM +0100, Jochen Roemling wrote:
> cat /proc/sys/kernel/shmmax
> 33554432

32MB limit there.


On Fri, Feb 27, 2004 at 02:33:08AM +0100, Jochen Roemling wrote:
> cat /proc/meminfo | grep Huge
> HugePages_Total: 64
> HugePages_Free: 62
> Hugepagesize: 4096 kB
> but again: root can, users cannot, so sizes won't matter, would they?

It's capable(CAP_IPC_LOCK) || in_group_p(0), not current->uid == 0.
It will barf if you ask for more than either one of those limits. It
will also barf if you ask for an amount not a multiple of the hugepage
size. Please show the test program's code and strace the test program
to determine what response it's getting.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/