From: Andrew Morton <akpm@osdl.org>
To: Paul Jackson <pj@sgi.com>
Cc: rajesh.shah@intel.com, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/1] export cpu_online_map
Date: Wed, 26 Oct 2005 21:08:03 -0700 [thread overview]
Message-ID: <20051026210803.07efba69.akpm@osdl.org> (raw)
In-Reply-To: <20051026205038.26a1c333.pj@sgi.com>
Paul Jackson <pj@sgi.com> wrote:
>
> Andrew asked:
> > - Why isn't set_cpus_allowed() just a no-op on UP? Or some trivial thing
> > which tests for cpu #0?
>
> I don't know.
>
> By scanning random copies of kernels left on my drive, I can see that
> it changed from a trivial "return 0" to the more interesting check using
> cpu_online_map in one of your "linus.patch" patches in the release
> 2.6.11-rc1-mm2.
>
> But I don't know how to get to the history at this point to see what
> happened.
>
> It looks like Linus started the git history at 2.6.12-rc2.
>
> Could someone clue me in on how to find Linux history BG (before-git)?
>
> Since bk no longer works for me, I have no idea how to access any
> history prior to about 2.6.12-rc2. Ugh.
There's still bkbits.net:
http://linux.bkbits.net:8080/linux-2.6/diffs/include/linux/sched.h@1.271.1.6?nav=index.html|src/|src/include|src/include/linux|hist/include/linux/sched.h
From: Rusty Russell <rusty@rustcorp.com.au>
Return EINVAL for invalid sched_setaffinity on UP. I was a little
surprised that sys_sched_setaffinity for CPU 1 didn't fail on my UP box.
With CONFIG_SMP it would have.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/include/linux/sched.h | 3 +++
1 files changed, 3 insertions(+)
diff -puN include/linux/sched.h~sys_sched_setaffinity-on-up-should-fail-for-non-zero include/linux/sched.h
--- 25/include/linux/sched.h~sys_sched_setaffinity-on-up-should-fail-for-non-zero 2005-01-04 18:48:15.000000000 -0800
+++ 25-akpm/include/linux/sched.h 2005-01-04 20:24:20.010381184 -0800
@@ -13,6 +13,7 @@
#include <linux/rbtree.h>
#include <linux/thread_info.h>
#include <linux/cpumask.h>
+#include <linux/errno.h>
#include <asm/system.h>
#include <asm/semaphore.h>
@@ -732,6 +733,8 @@ extern int set_cpus_allowed(task_t *p, c
#else
static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask)
{
+ if (!cpus_intersects(new_mask, cpu_online_map))
+ return -EINVAL;
return 0;
}
#endif
_
Seems silly to use cpu_online_map to test for `1'?
next prev parent reply other threads:[~2005-10-27 4:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-26 4:20 akpm
2005-10-27 3:50 ` Paul Jackson
2005-10-27 4:08 ` Andrew Morton [this message]
2005-10-27 8:55 ` Paul Jackson
2005-10-27 9:35 ` Andrew Morton
2005-10-27 13:38 ` Paul Jackson
2005-10-27 18:26 ` Andrew Morton
2005-10-27 19:08 ` Paul Jackson
2005-10-27 13:49 ` Paul Jackson
2005-10-27 10:48 ` Diego Calleja
2005-10-27 14:06 ` Paul Jackson
2005-10-28 2:49 ` Herbert Xu
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=20051026210803.07efba69.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pj@sgi.com \
--cc=rajesh.shah@intel.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