From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD844C433DB for ; Wed, 17 Feb 2021 11:57:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A823064E04 for ; Wed, 17 Feb 2021 11:57:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232525AbhBQL5i (ORCPT ); Wed, 17 Feb 2021 06:57:38 -0500 Received: from foss.arm.com ([217.140.110.172]:57126 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232183AbhBQLvv (ORCPT ); Wed, 17 Feb 2021 06:51:51 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3C1BB31B; Wed, 17 Feb 2021 03:51:06 -0800 (PST) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 736BB3F694; Wed, 17 Feb 2021 03:51:04 -0800 (PST) From: Valentin Schneider To: Vincent Guittot Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , linux-kernel , Joel Fernandes , Frederic Weisbecker , Thomas Gleixner , Qais Yousef Subject: Re: [PATCH 6/7 v3] sched/fair: trigger the update of blocked load on newly idle cpu In-Reply-To: References: <20210212141744.24284-1-vincent.guittot@linaro.org> <20210212141744.24284-7-vincent.guittot@linaro.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Wed, 17 Feb 2021 11:51:02 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/02/21 16:02, Vincent Guittot wrote: > On Fri, 12 Feb 2021 at 20:19, Valentin Schneider > wrote: >> I don't think there is anything inherently wrong with it - the >> nohz_idle_balance() call resulting from the kick_ilb() IPI will just bail >> out due to the flags being cleared here. This wasn't immediately clear to >> me however. > > In fact, I forgot to replace the WARN_ON in nohz_csd_func() by a > simple return as reported by kernel test robot / oliver.sang@intel.com > Can't that actually be a problem? kick_ilb() says: * Access to rq::nohz_csd is serialized by NOHZ_KICK_MASK; he who sets * the first flag owns it; cleared by nohz_csd_func(). So if you have: kick_ilb() -> kicks CPU42 And then said CPU42 goes through, before nohz_csd_func(),: do_idle() -> nohz_run_idle_balance() you could have yet another CPU do: kick_ilb() -> kicks CPU42 which would break rq->nohz_csd serialization. >> >> > +} >> > +