hwpmc dealing with sparse cpu systems.

Joseph Koshy jkoshy at FreeBSD.org
Fri Oct 12 23:12:02 PDT 2007


> One of the engineers here seems to have found a bug in the
> hwpmc_mod.c module.  The problem we have is that cpuids can be
> greater than mp_ncpus due to sparseness.

> Does the fix here make sense?  (replace mp_ncpus with MAXCPU)

No, a simple global substitution would probably be incorrect because
it would allow userland to get hwpmc to attempt operations on
non-existent CPUs.

I will look into this.

Regards,
Koshy
<jkoshy at freebsd.org>


More information about the freebsd-smp mailing list