Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756559AbcJYSFO (ORCPT ); Tue, 25 Oct 2016 14:05:14 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38098 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159AbcJYSFL (ORCPT ); Tue, 25 Oct 2016 14:05:11 -0400 Date: Tue, 25 Oct 2016 20:04:58 +0200 From: Luca Abeni To: Steven Rostedt Cc: Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Juri Lelli , Claudio Scordino Subject: Re: [RFC v3 1/6] Track the active utilisation Message-ID: <20161025200458.1a2070d7@utopia> In-Reply-To: <20161025095811.50a5856a@gandalf.local.home> References: <1477317998-7487-1-git-send-email-luca.abeni@unitn.it> <1477317998-7487-2-git-send-email-luca.abeni@unitn.it> <20161025112916.67eb245c@utopia> <20161025095811.50a5856a@gandalf.local.home> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1242 Lines: 44 On Tue, 25 Oct 2016 09:58:11 -0400 Steven Rostedt wrote: > On Tue, 25 Oct 2016 11:29:16 +0200 > luca abeni wrote: > > > Hi Daniel, > > > > On Tue, 25 Oct 2016 11:09:52 +0200 > > Daniel Bristot de Oliveira wrote: > > [...] > > > > +static void add_running_bw(struct sched_dl_entity *dl_se, > > > > struct dl_rq *dl_rq) +{ > > > > + u64 se_bw = dl_se->dl_bw; > > > > + > > > > + dl_rq->running_bw += se_bw; > > > > +} > > > > > > why not... > > > > > > static *inline* > > > void add_running_bw(struct sched_dl_entity *dl_se, struct dl_rq > > > *dl_rq) { > > > dl_rq->running_bw += dl_se->dl_bw; > > > } > > > > > > am I missing something? > > > > I do not know... Maybe I am the one missing something :) > > I assumed that the compiler is smart enough to inline the function > > (and to avoid creating a local variable on the stack), but if there > > is agreement I can change the function in this way. > > > > > > I agree with Daniel, especially since I don't usually trust the > compiler. And the added variable is more of a distraction as it > doesn't seem to have any real purpose. Ok, then; I'll fix this in the next round of patches. Thanks, Luca