[PATCH] hwpmc(4) changes to use 'mp_maxid' instead of 'mp_ncpus'.

Brooks Davis brooks at freebsd.org
Mon Mar 17 14:42:53 UTC 2008


On Mon, Mar 17, 2008 at 09:47:25AM -0400, John Baldwin wrote:
> On Saturday 15 March 2008 01:43:00 am Joseph Koshy wrote:
> > >  FreeBSD has been trying to not be quite as i386-centric as it used to
> > > be.  If you look at other code in the kernel that handles per-cpu data
> > > such as UMA you will see that it uses mp_maxid and CPU_ABSENT().  There
> > > are other places in the kernel that are broken though (such as ndis(4)).
> >
> > HWPMC is very x86 centric, for obvious reasons.
> 
> Considering other CPU archictectures support various performance counters it 
> really shouldn't be designed to be x86-centric even if it is currently only 
> implemented for x86 CPUs.

We should take some care to make sure we don't over generalize.  From
what I've heard the people who wrote the performance counter framework
for x86 in linux where very, very unhappy when told to rework everything
to support at framework that went with ia64's exponentionaly more
complex instrumentation.  If we can make small changes to support more
conventional non-x86 platforms, that's probably a good idea.  If nothing
else, these counters could be even more useful on CPU-poor embedded
devices.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20080317/0e2364b3/attachment.pgp


More information about the freebsd-arch mailing list