From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965232AbcBQScT (ORCPT ); Wed, 17 Feb 2016 13:32:19 -0500 Received: from www.linutronix.de ([62.245.132.108]:45389 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933149AbcBQScR (ORCPT ); Wed, 17 Feb 2016 13:32:17 -0500 Date: Wed, 17 Feb 2016 19:31:01 +0100 (CET) From: Thomas Gleixner To: Vikas Shivappa cc: LKML , Peter Zijlstra , x86@kernel.org, Stephane Eranian , Matt Fleming Subject: Re: [PATCH] x86/perf/intel/cqm: Get rid of the silly for_each_cpu lookups In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Feb 2016, Vikas Shivappa wrote: > > - cpumask_set_cpu(cpu, &cqm_cpumask); > > + /* First online cpu in package becomes the reader */ > > + reader = cpumask_any_and(topology_core_cpumask(cpu), &cqm_cpumask); > > + if (reader >= nr_cpu_ids) > > + cpumask_set_cpu(cpu, &cqm_cpumask); > > I was confused by the topology_core_cpumask naming as its really the mask of > all cpus in the same package. I sent a patch for cqm and rapl to fix this > looping when you had given the same feedback during CAt patches review , but > they have never made it so far due to CAT patch issues. Duh, totally forgot about them. > Would it be better to resend the rapl (looks like perf_uncore has same loop) > fixes separately ? Yes, please resend the rapl one. perf_uncore is a different trainwreck which I fixed already: lkml.kernel.org/r/20160217132903.767990400@linutronix.de Thanks, tglx