From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752598AbdLFRKa (ORCPT ); Wed, 6 Dec 2017 12:10:30 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:39499 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752142AbdLFRK2 (ORCPT ); Wed, 6 Dec 2017 12:10:28 -0500 X-Google-Smtp-Source: AGs4zMZXChkopQEUZ3NS20Ql+Q0PgX4GWtTRoZjMyzCZpzAQa0dv8AWsKayZ645Ic0eSj3ap1uNPjA== Date: Wed, 6 Dec 2017 18:10:24 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: Vincent Guittot , linux-kernel@vger.kernel.org, Yuyang Du , Mike Galbraith , Chris Mason , Linus Torvalds , Dietmar Eggemann , Josef Bacik , Ben Segall , Paul Turner , Tejun Heo , Morten Rasmussen Subject: Re: [PATCH v4] sched: Update runnable propagation rule Message-ID: <20171206171024.ylaqhmpoxdns4sqh@gmail.com> References: <1510841397-29119-1-git-send-email-vincent.guittot@linaro.org> <1510842112-21028-1-git-send-email-vincent.guittot@linaro.org> <20171206114028.5onepuyxedd67ccg@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171206114028.5onepuyxedd67ccg@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra wrote: > On Thu, Nov 16, 2017 at 03:21:52PM +0100, Vincent Guittot wrote: > > Unlike running, the runnable part can't be directly propagated through > > the hierarchy when we migrate a task. The main reason is that runnable > > time can be shared with other sched_entities that stay on the rq and > > this runnable time will also remain on prev cfs_rq and must not be > > removed. > > > > Instead, we can estimate what should be the new runnable of the prev > > cfs_rq and check that this estimation stay in a possible range. The > > prop_runnable_sum is a good estimation when adding runnable_sum but > > fails most often when we remove it. Instead, we could use the formula > > below instead: > > > > gcfs_rq's runnable_sum = gcfs_rq->avg.load_sum / gcfs_rq->load.weight > > > > which assumes that tasks are equally runnable which is not true but > > easy to compute. > > > > Beside these estimates, we have several simple rules that help us to filter > > out wrong ones: > > > > - ge->avg.runnable_sum <= than LOAD_AVG_MAX > > - ge->avg.runnable_sum >= ge->avg.running_sum (ge->avg.util_sum << LOAD_AVG_MAX) > > - ge->avg.runnable_sum can't increase when we detach a task > > > > Cc: Yuyang Du > > Cc: Ingo Molnar > > Cc: Mike Galbraith > > Cc: Chris Mason > > Cc: Linus Torvalds > > Cc: Dietmar Eggemann > > Cc: Josef Bacik > > Cc: Ben Segall > > Cc: Paul Turner > > Cc: Tejun Heo > > Cc: Morten Rasmussen > > Signed-off-by: Vincent Guittot > > Signed-off-by: Peter Zijlstra (Intel) > > Link: http://lkml.kernel.org/r/20171019150442.GA25025@linaro.org > > Acked-by: Peter Zijlstra (Intel) > > Ingo, can you stuff this in sched/urgent ? Yeah, I've queued up in tip:sched/urgent. Thanks, Ingo