From: ebiederm@xmission.com (Eric W. Biederman)
To: Ulrich Drepper <drepper@gmail.com>
Cc: "linux-os (Dick Johnson)" <linux-os@analogic.com>,
Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: pid_t range question
Date: Tue, 07 Feb 2006 19:39:11 -0700 [thread overview]
Message-ID: <m1pslybmls.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <a36005b50602071619w379980a2se9d78131a8e2b7bd@mail.gmail.com> (Ulrich Drepper's message of "Tue, 7 Feb 2006 16:19:56 -0800")
Ulrich Drepper <drepper@gmail.com> writes:
> On 2/7/06, Eric W. Biederman <ebiederm@xmission.com> wrote:
>> I know for certain that proc assumes it can fit pid in
>> the upper bits of an ino_t taking the low 16bits for itself
>> so that may the entire reason for the limit.
>
> Is this still the case? For the 100,000 threads tests Ingo and I were
> running Ingo certainly came up with some patches to make /proc behave
> better. This was before we had subdirs for thread groups.
It isn't too hard to change but it is still the case. Truth is proc
really doesn't use inodes internally it is just a reporting thing.
So /proc will work but user space might get terribly confused.
> Anyway, I think we should put a reasonable top on the number of bits
> for the PIDs. One reason is that the current (and fastest) design for
> more complex mutexes needs to encode more information than the PID in
> an 'int'. See the latest robust mutex patches for an example. If the
> limit could be, say, 28 bits that would still enable using more
> processes and threads then anybody wants so far. Who know, when we
> hit this limit, maybe we have separate namespaces. If not, we can
> still fix the existing limits but this would come at a cost which is
> why I think it's not worth doing now.
>From threads.h:
> /*
> * This controls the default maximum pid allocated to a process
> */
> #define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
>
> /*
> * A maximum of 4 million PIDs should be enough for a while:
> */
> #define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
> (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
>
So I think as long as this is a kernel implementation things should work ok.
I hate to have user space make assumptions about how many bits are in a pid
though.
Eric
next prev parent reply other threads:[~2006-02-08 2:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-07 16:23 linux-os (Dick Johnson)
2006-02-07 22:16 ` Eric W. Biederman
2006-02-08 0:19 ` Ulrich Drepper
2006-02-08 2:39 ` Eric W. Biederman [this message]
2006-02-09 16:58 ` Jan Engelhardt
2006-02-09 18:11 ` Eric W. Biederman
2006-02-09 20:13 ` Jesper Juhl
2006-02-10 13:21 ` Jan Engelhardt
2006-02-15 20:40 ` David Lang
2006-02-15 21:00 ` Eric W. Biederman
2006-02-17 16:38 ` Jan Engelhardt
2006-02-17 21:20 ` David Lang
2006-02-17 21:39 ` Eric W. Biederman
2006-02-21 11:22 ` Herbert Poetzl
[not found] <5DDTr-6Lw-43@gated-at.bofh.it>
[not found] ` <5DJlY-6J8-29@gated-at.bofh.it>
[not found] ` <5EnCK-7Qt-9@gated-at.bofh.it>
[not found] ` <5Eoz4-PV-21@gated-at.bofh.it>
[not found] ` <5Eqr8-3To-13@gated-at.bofh.it>
2006-02-10 1:19 ` Bodo Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1pslybmls.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=drepper@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome