Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3438629imu; Sun, 11 Nov 2018 15:06:35 -0800 (PST) X-Google-Smtp-Source: AJdET5dTI3TsS/QRjbfdzNUGi82HwK7H0GJ7jLhboDCDAym3+nZc0C1+JmWGpqQEIDCg97GnKeTK X-Received: by 2002:a63:413:: with SMTP id 19mr15256421pge.7.1541977595425; Sun, 11 Nov 2018 15:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977595; cv=none; d=google.com; s=arc-20160816; b=k2/AnnOmF0FQFidK4jcTqVaBOfIL/TqNbrEs382Vv15DQP59JyJUFKxgx3oJJgWBk7 MVAA8A0B07VaAxbUlAtcrepTZwQ0ub7PIos9fOJTpdQgDiTGpsXqy5cd+yb7bffba8BX P32Fw/luCcU70At+T+6/OgPTThtXRj5v1oStJBWA04/GMYeA4bMveLhSVVeZSFUUMZH/ RvcwMCQyoZL+VqhbFNEZTgVsOXjtWltLTEcvJgG7lIbeqm8j6CKaKf193rVhD/OjNOu+ nFy/EkLGPUdOs8UY8Ca2Ncs+9BpmGWQ8buJBHyBw42+NtHS/BXuoy+zB8DCyClrZx6iB q5Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CG/r2qfuK/n028ZToW+6Uf8MiwqsiVlPUHxKV3Aory0=; b=HooWq/sF9+TWZAMnsbIvD80p0UcN3A88A4z0MP8wK0G/+U0E+XrzkfSA3jMVUjB62m rW4qQ2VaxHjRLfi8puARV+K2iMHmMAiejqGq0wgAbWn16sTTJUz9PqN6YTDsDYK/Q+3h ttfccMpPFpoB4oE3ioGwyp2PLhpWAbNpIXjYf02rr06cZpfGoio5tkGbzixCX8ug19Jv JOUSgXQmfiS3nrFtZvuZPN1Qb3yrmZldYxYfiirZE3QzP0fY/MqqEH82uJ3POXBuchuc GUHSo31/e0+GhRsrFYGRlI/kwlaxLNcx1C2/q2l3JZsBeJawEYJOgbEDRw1iqFwQOPM6 3BGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LpknnTnV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13-v6si14547676pgo.128.2018.11.11.15.06.20; Sun, 11 Nov 2018 15:06:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LpknnTnV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390760AbeKLIyv (ORCPT + 99 others); Mon, 12 Nov 2018 03:54:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:51836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390484AbeKLIWS (ORCPT ); Mon, 12 Nov 2018 03:22:18 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C75C1223D8; Sun, 11 Nov 2018 22:32:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975541; bh=ROK0ZB1evdQEzrj4L8vKTxF9myhq2z5goZLG2+CBi6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LpknnTnVx+CYtLIeDN+IBGNT9kHkbPbx4dk2yKdk4wawWjrm1s4F74XCZFhZgQ47t 77zj3Dct+bz+ePQkef95lBourAu54gcJAFjlgTGlwcRdYcbHyOJLz3cN2ln/3bgEMO DRKcNpV4vWZjPt0Po9XB2q5M3QTmfAK4xUmCqG9M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Song Muchun , Linus Torvalds , Mike Galbraith , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH 4.14 032/222] sched/fair: Fix the min_vruntime update logic in dequeue_entity() Date: Sun, 11 Nov 2018 14:22:09 -0800 Message-Id: <20181111221651.097022958@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Song Muchun [ Upstream commit 9845c49cc9bbb317a0bc9e9cf78d8e09d54c9af0 ] The comment and the code around the update_min_vruntime() call in dequeue_entity() are not in agreement. >From commit: b60205c7c558 ("sched/fair: Fix min_vruntime tracking") I think that we want to update min_vruntime when a task is sleeping/migrating. So, the check is inverted there - fix it. Signed-off-by: Song Muchun Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: b60205c7c558 ("sched/fair: Fix min_vruntime tracking") Link: http://lkml.kernel.org/r/20181014112612.2614-1-smuchun@gmail.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3825,7 +3825,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, st * put back on, and if we advance min_vruntime, we'll be placed back * further than we started -- ie. we'll be penalized. */ - if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) == DEQUEUE_SAVE) + if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) != DEQUEUE_SAVE) update_min_vruntime(cfs_rq); }