Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933621AbcKJObK convert rfc822-to-8bit (ORCPT ); Thu, 10 Nov 2016 09:31:10 -0500 Received: from mga01.intel.com ([192.55.52.88]:32482 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933250AbcKJObJ (ORCPT ); Thu, 10 Nov 2016 09:31:09 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,619,1473145200"; d="scan'208";a="2372885" From: "Liang, Kan" To: Mark Rutland , Peter Zijlstra CC: "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 Thread-Topic: [PATCH] perf/core: introduce context per CPU event list Thread-Index: AQHSOrwpyfFydE4PZ0KoqikJpOIWrKDRXsSAgAAqSoCAAAjjgIAAB6CAgAACYICAAAPAAIAACOAAgAAURYCAAImL8A== Date: Thu, 10 Nov 2016 14:31:04 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07750C99877@SHSMSX103.ccr.corp.intel.com> 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> In-Reply-To: <20161110141037.GE4418@leverpostej> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjkyZjViYzEtMGUxYi00NmVkLTgwNjItNDg5MjcwZDk1ZTcyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkE3YzJPekEzTlMyczZUMW9XVm5hbzF5NGhMYkRCMVpFd2lcL2NXM3RlMlpZPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 776 Lines: 21 > > I don't think those need be tracked at all, they're immaterial for > > actual scheduling. Once we ioctl() them back to life we can insert > > them into the tree. > > 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. Yes, if we can sort the tree by event->cpu, we can minimize the iteration in the perf_iterate_ctx. That should help on reducing the overhead. Thanks, Kan