lkml.org 
[lkml]   [2004]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: /proc/sys/kernel/pid_max issues

* Arjan van de Ven <arjanv@redhat.com> wrote:

> On Sun, Sep 12, 2004 at 10:30:00PM +1000, Anton Blanchard wrote:
> >
> > Hmm can you point the 16bit counter out? I can create 1 million NPTL
> > threads on ppc64 easily, so why not?
>
> /*
> * the semaphore definition
> */
> struct rw_semaphore {
> /* XXX this should be able to be an atomic_t -- paulus */
> signed int count;
> #define RWSEM_UNLOCKED_VALUE 0x00000000
> #define RWSEM_ACTIVE_BIAS 0x00000001
> #define RWSEM_ACTIVE_MASK 0x0000ffff
>
> that counter is split in 2 16 bit entities....

the generic semaphore code can handle up to ~2^31 waiters. I once tried
it on x86, it seems to work fine.

Ingo
-
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:06    [W:0.031 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site