From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935650AbcA1MmR (ORCPT ); Thu, 28 Jan 2016 07:42:17 -0500 Received: from mail.skyhub.de ([78.46.96.112]:33306 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933201AbcA1MmP (ORCPT ); Thu, 28 Jan 2016 07:42:15 -0500 Date: Thu, 28 Jan 2016 13:42:09 +0100 From: Borislav Petkov To: Huang Rui Cc: Peter Zijlstra , Ingo Molnar , Andy Lutomirski , Thomas Gleixner , Robert Richter , Jacob Shin , John Stultz , =?utf-8?B?RnLDqWTDqXJpYw==?= Weisbecker , linux-kernel@vger.kernel.org, spg_linux_kernel@amd.com, x86@kernel.org, Guenter Roeck , Andreas Herrmann , Suravee Suthikulpanit , Aravind Gopalakrishnan , Fengguang Wu , Aaron Lu Subject: Re: [PATCH v4] perf/x86/amd/power: Add AMD accumulated power reporting mechanism Message-ID: <20160128124209.GC14274@pd.tnic> References: <1453963131-2013-1-git-send-email-ray.huang@amd.com> <20160128090314.GB14274@pd.tnic> <20160128100141.GA28282@hr-amur2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160128100141.GA28282@hr-amur2> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.