From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
To: rml@tech9.net (Robert Love)
Cc: acahalan@cs.uml.edu (Albert D. Cahalan),
colpatch@us.ibm.com (Matthew Dobson),
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] proc-based cpu affinity user interface
Date: Mon, 10 Dec 2001 04:37:39 -0500 (EST) [thread overview]
Message-ID: <200112100937.fBA9bdh109019@saturn.cs.uml.edu> (raw)
In-Reply-To: <1007973633.874.38.camel@phantasy> from "Robert Love" at Dec 10, 2001 03:40:32 AM
Robert Love writes:
> On Mon, 2001-12-10 at 03:33, Albert D. Cahalan wrote:
>> It looks like you are limiting the number of CPUs to sizeof(long).
>> Must you? Using "%lx" would be better in any case. Considering that
>> you may outgrow the format, maybe this info doesn't belong in the
>> /proc/*/stat files at all. For "ps" usage, a simple flag to indicate
>> if the process is locked to a CPU would be OK. There are 3 cases
>> of interest:
>
> We already limit it... we use cpus_allowed and cpus_runnable which are
> unsigned long.
Those can be changed without screwing up user code. You need to
be very careful about what you put in /proc, because user apps
will come to rely on whatever you choose.
Look at what happened with signals in /proc/*/stat. They were
originally reported as "%lu", just like you did. Then the kernel
was extended to support more than 32 signals on 32-bit hardware.
The format was briefly changed to be 16 hex chars, but this
broke lots of stuff. So now /proc/*/stat just reports the low
numbered signals as it did before, and /proc/*/status has the
rest of the signals.
So let's predict:
Around 2.5.42, IBM will have 60-way x86 or 80-way ppc64.
Then the kernel will be hacked to report a hex string of
arbitrary length, and user apps will die left and right.
Somebody will then hack things back to decimal, reporting
only the low sizeof(long)*8 processors in /proc/*/stat.
Any additional processors may be found as a hex string in
/proc/*/status, with the /proc/*/stat data useless on a
system with very many processors.
next prev parent reply other threads:[~2001-12-10 9:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-27 20:23 Matthew Dobson
2001-12-10 8:33 ` Albert D. Cahalan
2001-12-10 8:40 ` Robert Love
2001-12-10 9:37 ` Albert D. Cahalan [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-11-27 3:31 Robert Love
2001-11-27 3:52 ` Davide Libenzi
2001-11-27 4:14 ` Robert Love
2001-11-27 4:39 ` Davide Libenzi
2001-11-27 4:48 ` Davide Libenzi
2001-11-27 14:17 ` Ingo Molnar
2001-11-27 16:49 ` Davide Libenzi
2001-11-27 18:46 ` Ingo Molnar
2001-11-27 4:37 ` Anton Blanchard
2001-11-27 5:42 ` Tim Hockin
2001-11-27 5:08 ` Robert Love
2001-11-27 6:25 ` Andreas Dilger
2001-11-27 6:40 ` Robert Love
2001-11-27 11:52 ` Ingo Molnar
2001-11-27 10:10 ` Alan Cox
2001-11-27 14:21 ` Ingo Molnar
2001-11-27 20:44 ` Robert Love
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=200112100937.fBA9bdh109019@saturn.cs.uml.edu \
--to=acahalan@cs.uml.edu \
--cc=colpatch@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.net \
/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®