Re: [PATCH v4] perf/x86/amd/power: Add AMD accumulated power reporting mechanism
From: Borislav Petkov
Date: Thu Jan 28 2016 - 07:42:21 EST
On Thu, Jan 28, 2016 at 06:01:43PM +0800, Huang Rui wrote:
> For example: Carrizo has four CPU cores and two compute units (CUs).
> CPU0 and CPU1 belongs to CU0, CPU2 and CPU3 belongs to CU1.
>
> At normal initialization, cpu_mask should be "0,2". That means OS
> choose CPU0 in CU0 and CPU2 in CU1 to measure the CU0 and CU1's power
> consumption. If we make the CPU2 offline at runtime, OS need try to
> find another CPU in same compute unit (Here is CU1, only CPU3 can be
> picked). Then OS will move on to the CPU3 to measure CU1's power
> consumption instead of CPU2.
So basically you want to simply say:
"Find another CPU on the same compute unit and set it in the mask of
CPUs on which we do the measurements."
Which reminds me: that cpu_mask thing is insufficiently named - it
should be called measuring_cpus_mask or so.
Btw, the kbuild robot errors come from the fact that there are changes
to cpufeature.h which I didn't mention when applying your patches. So
I've pushed the whole pile here:
http://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/log/?h=tip-perf
Please use that branch instead.
Thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.