Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbdHGRj5 (ORCPT ); Mon, 7 Aug 2017 13:39:57 -0400 Received: from mga01.intel.com ([192.55.52.88]:26833 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbdHGRj4 (ORCPT ); Mon, 7 Aug 2017 13:39:56 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,339,1498546800"; d="scan'208";a="136743127" Date: Mon, 7 Aug 2017 10:39:55 -0700 From: Andi Kleen To: Peter Zijlstra Cc: Alexey Budankov , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Kan Liang , Dmitri Prokhorov , Valery Cherepennikov , Mark Rutland , Stephane Eranian , David Carrillo-Cisneros , linux-kernel Subject: Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups Message-ID: <20170807173955.GH3946@tassilo.jf.intel.com> References: <20170803130002.oatczvnaalplrsep@hirez.programming.kicks-ass.net> <86cbe0b0-a1ec-4d5f-addc-87bccf2e97d7@linux.intel.com> <20170804143628.34c2xqxl2e6k2arj@hirez.programming.kicks-ass.net> <9d2e25c9-209c-f28a-d601-d3f1a71f032f@linux.intel.com> <20170807083913.vfqmwsdzxsczh4yr@hirez.programming.kicks-ass.net> <20170807091326.5e3iec54ninmeyex@hirez.programming.kicks-ass.net> <9ce8c683-791b-add1-33c4-e65233e2398c@linux.intel.com> <20170807155527.alarhawa64xqhp62@hirez.programming.kicks-ass.net> <6272c0e7-7254-9035-d0bc-3abf5485d309@linux.intel.com> <20170807165711.lqv2yjobqskruvpx@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170807165711.lqv2yjobqskruvpx@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1515 Lines: 33 On Mon, Aug 07, 2017 at 06:57:11PM +0200, Peter Zijlstra wrote: > On Mon, Aug 07, 2017 at 07:27:30PM +0300, Alexey Budankov wrote: > > On 07.08.2017 18:55, Peter Zijlstra wrote: > > > > In the extreme, if you construct your program such that you'll never get > > > hit by the tick (this used to be a popular measure to hide yourself from > > > time accounting) > > > > Well, some weird thing for me. Never run longer than one tick? > > I could imaging some I/O bound code that would fast serve some short > > messages, all the other time waiting for incoming requests. > > Not sure if CPU events monitoring is helpful in this case. > > Like I said, in extreme. Typically its less weird. > > Another example is scheduling a very constrained counter/group along > with a bunch of simple events such that the group will only succeed to > schedule when its the first. In this case it will get only 1/nr_events > time with RR, as opposed to the other/simple events that will get > nr_counters/nr_events time. > > By making it runtime based, the constrained thing will more often be > head of list and acquire equal total runtime to the other events. I'm not sure Alexey's patch kit will be able to solve every possible problem with the event scheduler. Trying to fix everything at the same time is usually difficult. It would seem better to mainly focus on the scaling problem for now (which is essentially a show stopper bug for one platform) and then tackle other problems later once that is solved. -Andi