Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933293AbdC3Hq2 (ORCPT ); Thu, 30 Mar 2017 03:46:28 -0400 Received: from foss.arm.com ([217.140.101.70]:42778 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932555AbdC3Hq0 (ORCPT ); Thu, 30 Mar 2017 03:46:26 -0400 Subject: Re: [RFC PATCH 2/5] sched/events: Introduce cfs_rq load tracking trace event To: 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> <60375c17-3a2e-bbd3-f7a4-6e206f13c8a5@arm.com> <20170330070421.yhm7gfan4ibsc457@hirez.programming.kicks-ass.net> Cc: Steven Rostedt , Ingo Molnar , LKML , Matt Fleming , Vincent Guittot , Morten Rasmussen , Juri Lelli , Patrick Bellasi From: Dietmar Eggemann Message-ID: <187ab388-d6d2-8875-bfc0-dfd1d00a47d6@arm.com> Date: Thu, 30 Mar 2017 09:46:22 +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: <20170330070421.yhm7gfan4ibsc457@hirez.programming.kicks-ass.net> 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: 865 Lines: 31 On 03/30/2017 09:04 AM, Peter Zijlstra wrote: > On Wed, Mar 29, 2017 at 11:03:45PM +0200, Dietmar Eggemann wrote: [...] >> Why not reduce the parameter list of these 3 incarnations to 'now, cpu, >> object'? >> >> static int >> __update_load_avg_blocked_se(u64 now, int cpu, struct sched_entity *se) >> >> static int >> __update_load_avg_se(u64 now, int cpu, struct sched_entity *se) >> >> static int >> __update_load_avg_cfs_rq(u64 now, int cpu, struct cfs_rq *cfs_rq) >> >> [...] > > doesn't quite work with se, but yes good idea. Ah, OK, you don't like to use 'cfs_rq_of(se)->curr == se' in __update_load_avg_se(). The reason is that it's already fetched in update_load_avg()? > And this way we don't need the nonnull attribute either, because it > should be clear from having dereferenced it that it cannot be null. Yes, this would be clearer now. [...]