* Roland Mainz <[EMAIL PROTECTED]> [2007-02-20 17:15]: > [EMAIL PROTECTED] wrote: > > > > >Is there an API which can be used to limit the number of threads/LWPs > > >per process/process group (e.g. similar to "ulimit" (e.g. not > > >per-project)) ? Some platforms define |RLIMIT_PTHREAD| for this purpose > > >but I can't find something similar for Solaris (it would be usefull to > > >get ksh93's ulimit "-T" option implemented) ... ;-( > > > > It's a resource control in Solaris. > > Ok... would you be interested to sponsor a patch to get the following > RLIMIT_* flags implemented (e.g. some platforms support these controls > for setrlimit(2)/getrlimit(2)): > -- snip -- > RLIMIT_LOCKS > RLIMIT_MEMLOCK > RLIMIT_PTHREAD > -- snip -- > These are currently the only ones listed as "not supported" by ksh93's > "ulimit" builtin: > -- snip -- > $ (LD_LIBRARY_PATH=$ROOT/usr/lib/64:$ROOT/usr/lib $ROOT/usr/bin/ksh93 -o > gmacs) > $ ulimit -a > address space limit (kbytes) (-M) unlimited > core file size (blocks) (-c) unlimited > cpu time (seconds) (-t) unlimited > data size (kbytes) (-d) unlimited > file size (blocks) (-f) unlimited > locks (-L) not supported > locked address space (kbytes) (-l) not supported > nofile (-n) 256 > nproc (-u) 6005 > pipe buffer size (bytes) (-p) 5120 > resident set size (kbytes) (-m) unlimited > socket buffer size (bytes) (-b) 5120 > stack size (kbytes) (-s) 8480 > threads (-T) not supported > process size (kbytes) (-v) unlimited > -- snip --
I would really rather not see the setrlimit(2) emulation in the resource control framework extended. Perhaps an OpenSolaris-specific function in ksh93 to call setrctl(2) directly would be more appropriate. (Plus we don't have process-level controls for some of these resources today.) - Stephen -- Stephen Hahn, PhD Solaris Kernel Development, Sun Microsystems [EMAIL PROTECTED] http://blogs.sun.com/sch/ _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
