Messages in this thread | | | Date | Fri, 4 Jun 2004 11:27:30 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] cpumask 5/10 rewrite cpumask.h - single bitmap based implementation |
| |
William Lee Irwin III <wli@holomorphy.com> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |