From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965562AbcIVRKW (ORCPT ); Thu, 22 Sep 2016 13:10:22 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:36395 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965135AbcIVRKU (ORCPT ); Thu, 22 Sep 2016 13:10:20 -0400 From: bsegall@google.com To: Peter Zijlstra Cc: Vincent Guittot , Ingo Molnar , linux-kernel , Yuyang Du , Morten Rasmussen , Linaro Kernel Mailman List , Dietmar Eggemann , Paul Turner Subject: Re: [PATCH 7/7 v3] sched: fix wrong utilization accounting when switching to fair class References: <1473666472-13749-1-git-send-email-vincent.guittot@linaro.org> <1473666472-13749-8-git-send-email-vincent.guittot@linaro.org> <20160915131807.GS5008@twins.programming.kicks-ass.net> <20160916121626.GN5012@twins.programming.kicks-ass.net> <20160920115458.GX5016@twins.programming.kicks-ass.net> <20160922083351.GV5012@twins.programming.kicks-ass.net> Date: Thu, 22 Sep 2016 10:10:18 -0700 In-Reply-To: <20160922083351.GV5012@twins.programming.kicks-ass.net> (Peter Zijlstra's message of "Thu, 22 Sep 2016 10:33:51 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Zijlstra writes: > On Tue, Sep 20, 2016 at 09:59:08AM -0700, bsegall@google.com wrote: >> Peter Zijlstra writes: >> > Google has this patch-set replacing min_vruntime with an actual global >> > 0-lag, which greatly simplifies things. If only they'd post it sometime >> > :/ /me prods pjt and ben with a sharp stick :-) >> > >> >> No, we don't have any patches like that. I wish, we've screwed up >> vruntime a couple of times too. > > Hurm, I was sure you guys were doing something entirely different from > what mainline does. > > IIRC Andrew Hunter was 'working' on getting that posted. See also: > lkml.kernel.org/r/CADroS=6Ncpao6WWXBxboB6quqUP96EnjbsDUZqNgASd_PzDGaA@mail.gmail.com Oh, I was looking at the wrong branches. Sigh. Yeah, we just do an unlocked "se->vruntime -= old->min_vruntime - new->min_vruntime;" in migrate, and remove/add it in switched_from/switched_to_fair. This still isn't replacing min_vruntime with anything cool, perhaps you and Andrew were using opposite definitions of relative here - we have fair tasks always having a vruntime that is relative to min_vruntime, rather than temporarily having the 0-based one when doing non-SLEEP/WAKEUP.