lkml.org 
[lkml]   [2004]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: shmget with SHM_HUGETLB flag: Operation not permitted
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.075 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site