Re: [PATCH] cpumask 5/10 rewrite cpumask.h - single bitmap based implementation

Rusty Russell
2004-06-06T02:08:14Z

On Sat, 2004-06-05 at 04:12, William Lee Irwin III wrote:
> /* William Lee Irwin III:
> >> I'm thoroughly disgusted.
>
> On Fri, Jun 04, 2004 at 10:47:56AM -0700, Paul Jackson wrote:
> > Yup ... LOL. One sick piece of code.

We've been here before. I argued the userspace interface was broken to
require this looping, Linus said it was fine, Ingo said "userspace will
assume < 1024 cpus" and if we get more than that we'll need a new
interface, and that's what glibc does today with its cpu_set_t.

Shades of select-style pain, but it's not likely to change in the near
future.

Note also that saying "Schedule me on CPU 1 and 999" 'succeeds' at the
moment.

Yes, NR_CPUS needs to get to userspace somehow sanely if we want to fix
this in general.

Rusty.
--
Anyone who quotes me in their signature is an idiot -- Rusty Russell