Re: pmcstat: should it fail when a cpu is disabled?

From: Joseph Koshy <joseph.koshy_at_gmail.com>
Date: Tue, 7 Oct 2008 09:32:27 +0530
> Recently I've run into a small issue where pmcstat will fail if a cpu
> is disabled unless you specifically tell pmcstat to not attach to that
> processor.  This is annoying for me because we have some machines with
> hyper-threaded cpus but we disable hyperthreading on them.  When we
> try to run pmcstat on those machines, pmcstat will try to attach to
> the disabled hyperthreaded cpu and fail.  I can work around it by
> figuring out what the active cpus are and specifying only those cpus
> to the -c options, but that's annoying.  I was thinking that if the -c
> '*' option is specified(either explicitly or implicitly by not
> specifying any -c option) that pmcstat should only attach to active
> cpus and ignore disabled cpus.  I have a patch that will do this but I
> wanted to gauge opinions on whether this behaviour is wanted or not
> before submitting it.  Any strong opinions one way or the other?

In -current and 7.X, pmcstat(8) checks sysctl "machdep.hlt_cpus" and
should not by default attempt to allocate PMCs on halted CPUs.   Which
version of FreeBSD are you running?

Koshy
Received on Tue Oct 07 2008 - 02:30:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:36 UTC