Message ID | 168138594723.404.11738777497442624414.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp970645vqo; Thu, 13 Apr 2023 04:49:37 -0700 (PDT) X-Google-Smtp-Source: AKy350bMe76+hoRMtjrqh8xksDfFjTyEfBwIVL14tUse5rO3k0qwd/aC/FuCYnpv8ZEhp0E1WmSn X-Received: by 2002:aa7:dcd5:0:b0:505:42e:92d5 with SMTP id w21-20020aa7dcd5000000b00505042e92d5mr2052109edu.3.1681386577393; Thu, 13 Apr 2023 04:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681386577; cv=none; d=google.com; s=arc-20160816; b=eXVKh7gPBvZRTKcSlqlXwGExpKpnrJ/OfyXDrzJ0IrJVkow+tmT7661XAb5TS+AXqD UdD/4CE7qTWlVDLg3yziWCBn5nJcitUaCw48pmd2VIgSIyenm/s6ZQtDNYOZhZYZ5K3d Pzvz5PBVhu/63OanIf+COqzxc/RlHLnYT/3AOFg6L4MQmvlXc7choJzKOOR+8Em6vJ6j +i5fj33l6sQ7UI7YpDOWGbZXosI6DF4xy9q5xvZ+kXE1NsbCb2SVVDS+TOEWbXhocCiv ANEJXco/FZa6axYc88/gNs+l9SF6VzF2/eDlK58PUAVVc5iy0W1aKcIJzQbnSQSFEJBJ 3OPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=2I/H6ikXZS+0X6d3hXT76wrpWBLuX8bWchyD1Vp8Ch0=; b=nvEF45c4lyfErBk2Krtbg2SL+wS4KwcjVhiMPeHpsVCPxiSRWMiwVDCvEg+Gk4Uwtd 3GeJDqfYOxSdBH1ve+4OgcQrGCBZDXbz0lzWvO2scQAhYj1Qh7cw4xZenZsP8viWuKAY Dai7MtXRKTr0ikELca6Sq5S6QB0bhrNwIOyteB6lLeMUljfFGKGkVe7xZgJn+Imf1heE htHAH6WcPZCanYb3o7Fgwk2GoksX/TzF9drVB3dg0xUN9jI9U3+XB8g6+0TMJnR7OEWq VtiInxH8lhrPg2MJ7rOZj0qCuXqU4i0MRYyCrMcruFkw6e+ADZMx8IAu2CEYfuJsoGGg orcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="AIkH/eQI"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020a50fa8b000000b00504988bab93si1502348edr.301.2023.04.13.04.49.12; Thu, 13 Apr 2023 04:49:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="AIkH/eQI"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230341AbjDMLjf (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Thu, 13 Apr 2023 07:39:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230356AbjDMLjd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Apr 2023 07:39:33 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3030F2D44; Thu, 13 Apr 2023 04:39:09 -0700 (PDT) Date: Thu, 13 Apr 2023 11:39:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681385947; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2I/H6ikXZS+0X6d3hXT76wrpWBLuX8bWchyD1Vp8Ch0=; b=AIkH/eQICTWpOesNhSiyK4hR856+jA6Nur7zLyZrUuO24Ar6RK8MD4IR1XSmIZXIqQ5l// EmKFqNZYA9LxQcmSwHRO957izHNdfIA1Q5ZEUTuQcDLUEazdVztxu0G9qUSNysmq23owkz OfXuN91+VB8LDJ/KrL8rwaXQO8sCTDALxAXq99hifI99jeiFfOz13oMJWXZewGsvwhmGiS V8TNs7VX3xJMbkZsssSiEGExUdfLD+WuZqJ0WiJ0qRqYNBDa853+w10SfgieNCjUgDyCle s0mZfqjhD+nPBvd0OFdARa/JjUZFRUWxhIjtLbwmAxSVYgnP11okG6/N8xak/Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681385947; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2I/H6ikXZS+0X6d3hXT76wrpWBLuX8bWchyD1Vp8Ch0=; b=YFXCyzPwJsOETZBX+ECJ9kNa86xLkzlA3eQEd2CgIfSnfOp/AtUUMY2c8nvzjcNzn2dD8O x6IXKy++062+sEBg== From: "tip-bot2 for Vincent Guittot" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/fair: Fix imbalance overflow Cc: Tingjia Cao <tjcao980311@gmail.com>, Vincent Guittot <vincent.guittot@linaro.org>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <168138594723.404.11738777497442624414.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763061611555335599?= X-GMAIL-MSGID: =?utf-8?q?1763061611555335599?= |
Series |
[tip:,sched/urgent] sched/fair: Fix imbalance overflow
|
|
Commit Message
tip-bot2 for Thomas Gleixner
April 13, 2023, 11:39 a.m. UTC
The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 91dcf1e8068e9a8823e419a7a34ff4341275fb70 Gitweb: https://git.kernel.org/tip/91dcf1e8068e9a8823e419a7a34ff4341275fb70 Author: Vincent Guittot <vincent.guittot@linaro.org> AuthorDate: Tue, 11 Apr 2023 11:06:11 +02:00 Committer: Peter Zijlstra <peterz@infradead.org> CommitterDate: Wed, 12 Apr 2023 16:46:30 +02:00 sched/fair: Fix imbalance overflow When local group is fully busy but its average load is above system load, computing the imbalance will overflow and local group is not the best target for pulling this load. Fixes: 0b0695f2b34a ("sched/fair: Rework load_balance()") Reported-by: Tingjia Cao <tjcao980311@gmail.com> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Tingjia Cao <tjcao980311@gmail.com> Link: https://lore.kernel.org/lkml/CABcWv9_DAhVBOq2=W=2ypKE9dKM5s2DvoV8-U0+GDwwuKZ89jQ@mail.gmail.com/T/ --- kernel/sched/fair.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6986ea3..5f6587d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -10238,6 +10238,16 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s sds->avg_load = (sds->total_load * SCHED_CAPACITY_SCALE) / sds->total_capacity; + + /* + * If the local group is more loaded than the average system + * load, don't try to pull any tasks. + */ + if (local->avg_load >= sds->avg_load) { + env->imbalance = 0; + return; + } + } /*