From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751839AbcIICsy (ORCPT ); Thu, 8 Sep 2016 22:48:54 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:51249 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbcIICsw (ORCPT ); Thu, 8 Sep 2016 22:48:52 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Fri, 9 Sep 2016 11:46:00 +0900 From: Byungchul Park To: Peter Zijlstra Cc: mingo@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/fair: Fix update_min_vruntime() to get proper min_vruntime Message-ID: <20160909024559.GC2279@X58A-UD3R> References: <1473138317-8789-1-git-send-email-byungchul.park@lge.com> <20160906084839.GG10153@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160906084839.GG10153@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 06, 2016 at 10:48:39AM +0200, Peter Zijlstra wrote: > On Tue, Sep 06, 2016 at 02:05:17PM +0900, Byungchul Park wrote: > > From 295895be8befbab040d6054bb8186c03daabcedd Mon Sep 17 00:00:00 2001 > > From: Byungchul Park > > Date: Tue, 6 Sep 2016 12:22:26 +0900 > > Subject: [PATCH] sched/fair: Fix update_min_vruntime() to get proper > > min_vruntime > > > > Commit 97a7142 'sched/fair: Make update_min_vruntime() more readable' > > introduces a bug that cfs_rq gets a wrong min_vruntime if > > !cfs_rq->rb_leftmost && cfs_rq->curr. This fixes it and makes it more > > readable and simple. > > Urgh, I actually stared at that patch for quite a time and somehow > convinced myself it was good. I actually considered that scenario I > think. > > /me thinks more.. > > Argh, I'm an idiot, you're right. By using min_vruntime() on > cfs_rq->curr we take the leftmost and fail to advance min_vruntime in > that case. > > I'll ask Ingo to take the patch out. Ok. But I think the combined one is more readable. Don't you think so. It's ok even if you don't. Thank you, Byungchul