From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935008AbcKJQ0t (ORCPT ); Thu, 10 Nov 2016 11:26:49 -0500 Received: from merlin.infradead.org ([205.233.59.134]:54082 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934617AbcKJQ0r (ORCPT ); Thu, 10 Nov 2016 11:26:47 -0500 Date: Thu, 10 Nov 2016 17:26:32 +0100 From: Peter Zijlstra To: Mark Rutland Cc: kan.liang@intel.com, mingo@redhat.com, linux-kernel@vger.kernel.org, acme@kernel.org, tglx@linutronix.de, alexander.shishkin@linux.intel.com, vince@deater.net, eranian@google.com, andi@firstfloor.org Subject: Re: [PATCH] perf/core: introduce context per CPU event list Message-ID: <20161110162632.GY3142@twins.programming.kicks-ass.net> References: <1478718286-12824-1-git-send-email-kan.liang@intel.com> <20161110083355.GO3568@worktop.programming.kicks-ass.net> <20161110110516.GA4418@leverpostej> <20161110113704.GU3142@twins.programming.kicks-ass.net> <20161110120423.GC4418@leverpostej> <20161110121253.GX3142@twins.programming.kicks-ass.net> <20161110122618.GD4418@leverpostej> <20161110125804.GT3117@twins.programming.kicks-ass.net> <20161110141037.GE4418@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161110141037.GE4418@leverpostej> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 10, 2016 at 02:10:37PM +0000, Mark Rutland wrote: > Sure, that sounds fine for scheduling (including big.LITTLE). > > I might still be misunderstanding something, but I don't think that > helps Kan's case: since INACTIVE events which will fail their filters > (including the CPU check) will still be in the tree, they will still > have to be iterated over. > > That is, unless we also sort the tree by event->cpu, or if in those > cases we only care about ACTIVE events and can use an active list. A few emails back up I wrote: >> If we stick all events in an RB-tree sorted on: {pmu,cpu,runtime} we Looking at the code there's also cgroup muck, not entirely sure where in the sort order that should go if at all. But having pmu and cpu in there would cure the big-little and per-task-per-cpu event issues.