From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752433AbdEIJhj (ORCPT ); Tue, 9 May 2017 05:37:39 -0400 Received: from mail.santannapisa.it ([193.205.80.98]:40332 "EHLO mail.santannapisa.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbdEIJhh (ORCPT ); Tue, 9 May 2017 05:37:37 -0400 Date: Tue, 9 May 2017 11:37:30 +0200 From: Luca Abeni To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli , Claudio Scordino , Steven Rostedt , Tommaso Cucinotta , Daniel Bristot de Oliveira , Joel Fernandes , Mathieu Poirier Subject: Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization Message-ID: <20170509113730.4a940865@luca> In-Reply-To: <20170508080613.rlmzfkajipol6hnm@hirez.programming.kicks-ass.net> References: <1490327582-4376-1-git-send-email-luca.abeni@santannapisa.it> <1490327582-4376-9-git-send-email-luca.abeni@santannapisa.it> <20170327142633.nubm5saddpitylot@hirez.programming.kicks-ass.net> <20170508094108.384407f0@luca> <20170508080613.rlmzfkajipol6hnm@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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 On Mon, 8 May 2017 10:06:13 +0200 Peter Zijlstra wrote: [...] > > > #define BW_SHIFT 20 > > > #define BW_UNIT (1 << BW_SHIFT) > > > > > > static inline > > > u64 grub_reclaim(u64 delta, struct rq *rq, struct sched_dl_entity > > > *dl_se) { > > > u64 u_inact = rq->dl.this_bw - rq->dl.running_bw; /* Utot - > > > Uact */ u64 u_act; > > [...] > > > > I think introducing the BW_SHIFT and BW_UNIT defines can be more > > useful in a previous patch (patch 4, where I introduce the > > "grub_reclaim()" function, and use ">> 20" for the first time. > > Sure.. > > > Moreover, the "20" magic number is already used in core.c... Should > > I introduce the defines in sched/sched.h, and change the existing > > core.c code too? > > Yes please. > > > Is it ok to embed this change in patch 4 (sched/deadline: > > implement GRUB accounting), or should it go in a separate patch? > > Whatever you feel is nicest. Currently the thing is fully contained in > the one to_ratio() function (afaict), so the first patch where you > make it escape would be fine. Ok, thanks. I included this change in patch 4 (the first one using the "20") and I put the two defines in sched.h, immediately before the prototype of to_ratio(). I am finishing with the requested changes, and after some days of testing I'll post a new patchset. Thanks, Luca