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

From: Andrew Morton
Date: Fri Jun 04 2004 - 13:32:47 EST


William Lee Irwin III <wli@xxxxxxxxxxxxxx> wrote:
>
> _SC_NPROCESSOR_CONF is
> unimplementable. NR_CPUS serves as an upper bound on the number of cpus
> that may at some time be simultaneously present in the future.

NR_CPUS is arguably the correct thing when it comes to copying per-cpu info
to and from userspace.

Sometimes userspace wants to know NR_CPUS. Sometimes it wants to know the
index of the max possible CPU. Sometimes, perhaps the index of the max
online CPU. Sometimes the max index of the CPUs upon which this task is
eligible to run. Sometimes (lame) userspace may want to know, at compile
time, the maximum number of CPUs which a Linux kernel will ever support.

It's not completely trivial.

Which of the above is _SC_NPROCESSOR_CONF supposed to return?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/