From: Paul Larson <plars@austin.ibm.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Hubertus Franke <frankeh@us.ibm.com>,
Rik van Riel <riel@conectiva.com.br>,
Andries Brouwer <aebr@win.tue.nl>,
Andrew Morton <akpm@zip.com.au>,
andrea@suse.de, Dave Jones <davej@suse.de>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Linux-2.5 fix/improve get_pid()
Date: 09 Aug 2002 14:34:17 -0500 [thread overview]
Message-ID: <1028921658.19434.365.camel@plars.austin.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0208081500550.9114-100000@home.transmeta.com>
I suspect that it would actually require more than just this. I tried
this with the same test I've been using and had several failed attepmts
at low numbers by getting wierd unexpected signals (like 28), and then
one that ran for a much longer time and produced an oops with random
garbage to the console (trying to extract this now).
-Paul Larson
On Thu, 2002-08-08 at 17:02, Linus Torvalds wrote:
> ----
> --- 1.2/include/linux/threads.h Tue Feb 5 07:23:04 2002
> +++ edited/include/linux/threads.h Thu Aug 8 14:58:28 2002
> @@ -19,6 +19,7 @@
> /*
> * This controls the maximum pid allocated to a process
> */
> -#define PID_MAX 0x8000
> +#define PID_MASK 0x3fffffff
> +#define PID_MAX (PID_MASK+1)
>
> #endif
> ===== kernel/fork.c 1.57 vs edited =====
> --- 1.57/kernel/fork.c Tue Jul 30 15:49:20 2002
> +++ edited/kernel/fork.c Thu Aug 8 15:00:16 2002
> @@ -142,7 +142,7 @@
> return 0;
>
> spin_lock(&lastpid_lock);
> - if((++last_pid) & 0xffff8000) {
> + if((++last_pid) & ~PID_MASK) {
> last_pid = 300; /* Skip daemons etc. */
> goto inside;
> }
> @@ -157,7 +157,7 @@
> p->tgid == last_pid ||
> p->session == last_pid) {
> if(++last_pid >= next_safe) {
> - if(last_pid & 0xffff8000)
> + if(last_pid & ~PID_MASK)
> last_pid = 300;
> next_safe = PID_MAX;
> }
>
>
next prev parent reply other threads:[~2002-08-09 19:37 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-08 21:43 Hubertus Franke
2002-08-08 22:02 ` Linus Torvalds
2002-08-08 22:26 ` Linus Torvalds
2002-08-08 23:09 ` Albert D. Cahalan
2002-08-09 3:26 ` Chris Adams
2002-08-09 7:04 ` Albert D. Cahalan
2002-08-09 8:48 ` Helge Hafting
2002-08-09 10:32 ` Alan Cox
2002-08-09 9:35 ` Andrew Morton
2002-08-09 10:37 ` Andries Brouwer
2002-08-09 13:00 ` Chris Adams
2002-08-09 14:39 ` Albert D. Cahalan
2002-08-09 13:59 ` Rik van Riel
2002-08-09 14:57 ` Albert D. Cahalan
2002-08-08 22:34 ` Paul Larson
2002-08-08 22:44 ` Rik van Riel
2002-08-08 22:37 ` Rik van Riel
2002-08-09 1:49 ` Andries Brouwer
2002-08-09 19:34 ` Paul Larson [this message]
2002-08-09 20:13 ` Paul Larson
2002-08-09 20:40 ` Andries Brouwer
2002-08-09 21:23 ` Linus Torvalds
2002-08-09 21:42 ` Linus Torvalds
2002-08-09 21:46 ` Paul Larson
2002-08-09 22:04 ` Linus Torvalds
2002-08-10 17:23 ` Jamie Lokier
2002-08-10 18:33 ` Linus Torvalds
2002-08-10 18:48 ` Jamie Lokier
2002-08-11 20:41 ` Alan Cox
2002-08-11 19:58 ` Jamie Lokier
2002-08-11 21:23 ` Alan Cox
2002-08-11 20:10 ` Jamie Lokier
2002-08-12 8:56 ` Padraig Brady
2002-08-12 10:37 ` Alan Cox
2002-08-12 9:21 ` Padraig Brady
2002-08-12 14:40 ` Paul Larson
-- strict thread matches above, loose matches on Subject: below --
2002-08-12 16:15 Jim Houston
2002-08-09 0:53 Hubertus Franke
2002-08-08 21:50 Hubertus Franke
2002-08-08 18:56 Hubertus Franke
2002-08-08 19:15 ` Rik van Riel
2002-08-08 19:18 ` Paul Larson
2002-08-07 22:03 Paul Larson
2002-08-07 23:06 ` Andrew Morton
2002-08-08 0:24 ` Andries Brouwer
2002-08-08 19:42 ` William Lee Irwin III
2002-08-08 20:47 ` Andries Brouwer
2002-08-08 20:24 ` Linus Torvalds
2002-08-08 21:30 ` H. Peter Anvin
2002-08-08 21:45 ` William Lee Irwin III
2002-08-09 4:42 ` William Lee Irwin III
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=1028921658.19434.365.camel@plars.austin.ibm.com \
--to=plars@austin.ibm.com \
--cc=aebr@win.tue.nl \
--cc=akpm@zip.com.au \
--cc=andrea@suse.de \
--cc=davej@suse.de \
--cc=frankeh@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®