Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754071AbdC2Uik (ORCPT ); Wed, 29 Mar 2017 16:38:40 -0400 Received: from foss.arm.com ([217.140.101.70]:39014 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752944AbdC2Uhv (ORCPT ); Wed, 29 Mar 2017 16:37:51 -0400 Subject: Re: [RFC PATCH 2/5] sched/events: Introduce cfs_rq load tracking trace event To: Steven Rostedt , Peter Zijlstra References: <20170328063541.12912-1-dietmar.eggemann@arm.com> <20170328063541.12912-3-dietmar.eggemann@arm.com> <20170328104600.18d36cb0@gandalf.local.home> <20170328164459.tkiqbtb7yaplygng@hirez.programming.kicks-ass.net> <20170328133626.5632da53@gandalf.local.home> <20170328133744.0d93fe83@gandalf.local.home> Cc: Ingo Molnar , LKML , Matt Fleming , Vincent Guittot , Morten Rasmussen , Juri Lelli , Patrick Bellasi From: Dietmar Eggemann Message-ID: <5e01a586-88d1-3bdf-68b7-10333f8a2dfe@arm.com> Date: Wed, 29 Mar 2017 22:37:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170328133744.0d93fe83@gandalf.local.home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 885 Lines: 28 On 03/28/2017 07:37 PM, Steven Rostedt wrote: > On Tue, 28 Mar 2017 13:36:26 -0400 > Steven Rostedt wrote: > >> But why play games, and rely on the design of the code? A >> TRACE_EVENT_CONDTION() is more robust and documents that this >> tracepoint should not be called when cfs_rq is NULL. > > In other words, what are you trying to save for not using the > TRACE_EVENT_CONDITION()? IMHO, if we could avoid this if(cfs_rq) trace_sched_load_cfs_rq(cfs_rq); else trace_sched_load_se(container_of(sa, struct sched_entity, avg)); in __update_load_avg(), then we can use 'unconditional' TRACE_EVENTs in all call-sites: __update_load_avg{_cfs_rq}(), propagate_entity_load_avg(), attach_entity_load_avg(), detach_entity_load_avg() for cfs_rq and __update_load_avg_blocked_se(), __update_load_avg_se(), propagate_entity_load_avg() for se. [...]