]> git.proxmox.com Git - mirror_spl-debian.git/commit
Fix max_ncpus definition.
authorRicardo M. Correia <ricardo.correia@oracle.com>
Tue, 20 Jul 2010 22:44:28 +0000 (15:44 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 20 Jul 2010 22:49:25 +0000 (15:49 -0700)
commit15b52c083ee886d9cb102655b4313ae7c027784a
treeeeb464794e10b7be9584b82416844a1408aa544c
parent81672c012249f1ba81a27a1ff8f9b19b4a8048a8
Fix max_ncpus definition.

It was being defined as the constant 64 and at first I changed it to be
NR_CPUS instead.

However, NR_CPUS can be a large value on recent kernels (4096), and this
may cause too large kmem allocations to happen.

Therefore, now we use num_possible_cpus(), which should return a (typically)
small value which represents the maximum number of CPUs than can be brought
online in the running hardware (this value is determined at boot time by
arch-specific kernel code).

Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
include/sys/sysmacros.h