Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1248710ybf; Thu, 27 Feb 2020 07:28:31 -0800 (PST) X-Google-Smtp-Source: APXvYqzaG8NlvAYO0tdUvH6anjEtCJEY3AObOd/8I/K5fNzpRRh9ftPmrsPNjVjP9/0xGpfpTWNQ X-Received: by 2002:a05:6830:10c6:: with SMTP id z6mr154627oto.203.1582817309543; Thu, 27 Feb 2020 07:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582817309; cv=none; d=google.com; s=arc-20160816; b=sQSVcKahpJnhvxbQ7jQxbXLPh9dCF42pXhuapKt/RTBRD7f3lghxnajkuc7LpWsBri eGm9UkpsXv0RJgR7invKqmAXVRWgEdNeY7tc4M3CYpVADC2eoUEUoh5K5weD1ga+H/Ve 72qDd/lNmuFwMp9d8J+vd8RBJR5zVaFKnS6gtd8hlHLzeNqddKGCmzWIDsyvSa4SFyBK vyE1f4CS6XtZOJo3MOmxyNfFMHs78heGwGbNdwvbHKoQ88rNivQfQFMwwwiDKz//ACw+ rQMze8xvyaqQ+ogfLZtCjx2o8s8ivvg6Y7a9uXMWZNAUzk8vDuFZxH2/d/7kWhJjOR+y XrQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=4Ag4pNcmHIuR/nu1GEHKog+Ls1RgGDHZcrQeS7DU94k=; b=GrVgzOWsia3Ax1H51EQN8OwQXNy9MM71oxpZFcaA0L1RIdO0O+hkiQ+uQTtqG9zC22 7W6kN6QSCHvzNj3NHD6zD9Mpf+Y0gQ33j1FjqghfCBw3EkN2MAsRhAsXLPcO6Dd0KyrV dXwG63IwgNGQp1bPLDotDZOhvoPZBjs5m35oSSTREWvkvkHuyiIS6LhAeWGwsPD7Z69W CA1i4HctA/Dh9cHa+uXmWbMxl9LIHq+9dB72XuivUNfC3+QTwOwJRQmoPcGgZENNKiOv 2kVMjjqDMenORjUd8Pw/CqfDZ4yNM94+1up6FJx7TdPWdzTKTWexheOGjyp3iar9ydYK weug== ARC-Authentication-Results: i=1; mx.google.com; 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 m24si1838517otk.239.2020.02.27.07.28.16; Thu, 27 Feb 2020 07:28:29 -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; 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 S1730934AbgB0P05 (ORCPT + 99 others); Thu, 27 Feb 2020 10:26:57 -0500 Received: from foss.arm.com ([217.140.110.172]:53662 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729451AbgB0P05 (ORCPT ); Thu, 27 Feb 2020 10:26:57 -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 DADC230E; Thu, 27 Feb 2020 07:26:56 -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 BDA153F7B4; Thu, 27 Feb 2020 07:26:55 -0800 (PST) References: <1582812549.7365.134.camel@lca.pw> <1582814862.7365.135.camel@lca.pw> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Qian Cai Cc: Mel Gorman , Ingo Molnar , Peter Zijlstra , Juri Lelli , Steven Rostedt , paulmck@kernel.org, linux-kernel@vger.kernel.org Subject: Re: suspicious RCU due to "Prefer using an idle CPU as a migration target instead of comparing tasks" In-reply-to: <1582814862.7365.135.camel@lca.pw> Date: Thu, 27 Feb 2020 15:26:41 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27 2020, Qian Cai wrote: > On Thu, 2020-02-27 at 09:09 -0500, Qian Cai wrote: >> The linux-next commit ff7db0bf24db ("sched/numa: Prefer using an idle CPU as a >> migration target instead of comparing tasks") introduced a boot warning, > > This? > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index a61d83ea2930..ca780cd1eae2 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -1607,7 +1607,9 @@ static void update_numa_stats(struct task_numa_env *env, > if (ns->idle_cpu == -1) > ns->idle_cpu = cpu; > > +rcu_read_lock(); > idle_core = numa_idle_core(idle_core, cpu); > +rcu_read_unlock(); > } > } > Hmph right, we have numa_idle_core()->test_idle_cores()->rcu_dereference(). Dunno if it's preferable to wrap the entirety of update_numa_stats() or if that fine-grained read-side section is ok.