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

From: William Lee Irwin III
Date: Fri Jun 04 2004 - 06:35:33 EST


On Fri, Jun 04, 2004 at 04:27:44AM -0700, William Lee Irwin III wrote:
> If you care to export an architecture-neutral and/or 32/64 -bit
> compatible binary representation of a bitmap, please provide the
> implementation in lib/bitmap.c; I'm relatively agnostic on the ASCII
> vs. whatever issue. Others may not be...
> The cpu count for cpumask_t should be visible to userspace as the
> dreaded sysconf(_SC_NPROCESSORS_CONF)... don't ask how this is
> implemented, you don't want to know.
> Thanks.
> -- wli

Hmm. Okay, I'd better confess. It parses /proc/cpuinfo... except there's
no information there about the NR_CPUS used for cpumask_t, but rather
only num_cpus_online().

akpm, apps are in trouble. Some interface is needed to export NR_CPUS
so the kernel doesn't clobber their memory if they guess too low. Andi,
how does libnuma cope with this?


-- wli
-
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/