Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2769445rdb; Fri, 8 Dec 2023 20:52:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6hPf148KjHxfIxHGfYhqPTPgdFEog/8KJ7dlmw9mSNT9AvA7579jZN2WcjDvbUjVHCZ+c X-Received: by 2002:a92:c90b:0:b0:35d:59a2:92a6 with SMTP id t11-20020a92c90b000000b0035d59a292a6mr1018968ilp.58.1702097524457; Fri, 08 Dec 2023 20:52:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702097524; cv=none; d=google.com; s=arc-20160816; b=eKb3YZ41xj5IaejISs2mjKxdzUtI+4QZUPH+nTlxGXS+BPleShkP32TzOCxoCvh8rv FT7WXpHfFo7Hhf/X652lpKEFTTHRnxsCDWX+sD2afmQeZnG8UBW8j05WpKD8zMf4TXev 8BE2A8PPw1vJkC5U66cycGf5eEHfQ4PFvu9ulaarluuoIPAlAYLbn7VQfBpiFL3PpX4C zL02D/DI1jZhJmJnIQLhDKzzltJK18ZIOUapc9s6OSAD1NRbnFbetvU4DgNUMAd1LuBS JzE6CGsNBdg+i7KjlhLPXpAo5VncZIUddnzndhZ9tVAkNYk/KGShSMfloOBWUI/SpoBA w4Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=6EmzyVYP6+X37yDb1cS/MNlyqAjzFZqrqBrfszAuAo0=; fh=cGLQYt+T9UulTXHSdOP1cYh174YvIWwLw0fAwNFttH0=; b=KLA+GLV3VcD4pi/sL6MBEkRw/OdrVp5ogp6IkZdlOJ9VbjVN4F3SAFwvAPdBQe6R5l CQrPHfJm+blxqFL9x7prnyOYeDtRBGrn2mdxT71tGJAIh0vm7Mijh2O5Bjb/OhkzoQcE KD3++2Btobv3BrI/lBXBM3gPotjN4xeGnRaHS4s7MbW0HQa1ODPq+wufs4DGxwuI2q6u 4hgesrIgwM2QkOmSFdNhyYEWAGH+C7wY/cLUO6Ct/nxKGz/gMO/GdG3w7u43PxVO0srn 9C3q5097OIOzPtf+7xZgr4X0O9X5NfiTnWC3pgRU8XD1Jd891uPtOscCgK654X2lGE+3 L74g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id k24-20020a63ba18000000b005b64e8336dfsi2551752pgf.604.2023.12.08.20.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 20:52:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DEA6F808A37F; Fri, 8 Dec 2023 20:52:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229839AbjLIEvb (ORCPT + 99 others); Fri, 8 Dec 2023 23:51:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbjLIEva (ORCPT ); Fri, 8 Dec 2023 23:51:30 -0500 Received: from out0-200.mail.aliyun.com (out0-200.mail.aliyun.com [140.205.0.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BA4510DA for ; Fri, 8 Dec 2023 20:51:35 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047203;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---.VgCM59c_1702097490; Received: from 30.39.230.13(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.VgCM59c_1702097490) by smtp.aliyun-inc.com; Sat, 09 Dec 2023 12:51:31 +0800 Message-ID: <598033f7-f937-4d32-a4ec-b3e0d094c637@antgroup.com> Date: Sat, 09 Dec 2023 12:51:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH -tip] sched/fair: gracefully handle EEVDF scheduling failures Content-Language: en-US To: Peter Zijlstra Cc: mingo@kernel.org, wuyun.abel@bytedance.com, Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org References: <20231208112100.18141-1-tiwei.btw@antgroup.com> <20231208143208.GF28727@noisy.programming.kicks-ass.net> From: "Tiwei Bie" In-Reply-To: <20231208143208.GF28727@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 08 Dec 2023 20:52:02 -0800 (PST) On 12/8/23 10:32 PM, Peter Zijlstra wrote: > On Fri, Dec 08, 2023 at 07:20:59PM +0800, Tiwei Bie wrote: >> The EEVDF scheduling might fail due to unforeseen issues. Previously, > > I might also fly if I jump up. But is there any actual reason to believe > something like that will happen? Thanks for the quick reply! Sorry, after re-reading the commit log, it looks confusing to me as well. I didn't mean something like that will happen. I just thought it might be worthwhile to have a sanity check on 'best'. Because, the 'best' is initialized to NULL and is conditionally updated. The added 'WARN_ONCE' on '!best' is more like a 'default' case to catch an unreachable case in a 'switch' block. There was a similar check in the past that was helpful. And there seems to be no harm in doing it. If this is reasonable, I'd like to submit a v2 patch. PS. I just noticed that the subject line should start with a uppercase letter according to the rules in the tip tree handbook [1]. The subject line should be something like: "sched/fair: Sanity check best in pick_eevdf()". [1] https://www.kernel.org/doc/html/next/process/maintainer-tip.html#patch-subject Regards, Tiwei