Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1378881rdh; Fri, 27 Oct 2023 12:20:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHx1cizIrKuXCSqoxMWipIJTInG4VoINOL4OOf2CVwHBVMSuF5nBgHX1PVzobcn8zJPyQ9b X-Received: by 2002:a25:6912:0:b0:d9a:485f:5852 with SMTP id e18-20020a256912000000b00d9a485f5852mr3826413ybc.13.1698434454686; Fri, 27 Oct 2023 12:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698434454; cv=none; d=google.com; s=arc-20160816; b=wBgpU3Zi1DrRq9Q695hlBgBOZc5mCGkNjJJEcNHRooLhzCS5hMssuiYR7K9f+zN2x6 KPLL9Fsem3bhEwNF1LLbi1zkJMWtS8vic3baokpdRYf/twHxnTqzba8AToDrqaWYrbfN avASQCvwAp9SksCuCq3Jj3jlVm6ocbVK89mkEWdufl1q3wftGcWmTCgR13/4wzKEfax5 KB5kjKGpusw7tiGaQzvbWm9s+kkoW2JltZbUkvf08Pb/UgenmjPUyeRDM+B5mwZM6ZP6 7Ips7BAvw8xx/U67Yx0fhH5VQ3xszmtHVSZ+1PZ1wjpLCfDOha0Wd3JYDWlgcHrhrWrG +T4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fJJP+jvnbdOicjB5+lM50yNyHr0lxM58vJLUjNNi0LY=; fh=+kmuhPEw6BkVZMjp0Yofay8q4ZvXUsyM4+z0O6B9zUU=; b=My50zUyN1K9qtDougvudBWA2Au/uQb0AY25Plc7c+nicSveOQdcgHBeSIIF9HfavHX kUx5JoRN78Z3GMBU5UM5qCSvlytDbjbcbOGKN/Bfd7ZMI/6BYZv5DhiDRK0iMP1cBAej B24dxEzE410nACaLDCWlnPsd9TXgyJnUSuATR9gypulLQ0elknIF4d9NCKczvUM7+Dbx 72wHEM++gmlf23MW6l7szsmF6ltrHZ9EeL0TiKnGfwImq0DtQKtHa6tZETre1zkQKhDe bmz2BXa0/4aHwBrgjrBSfPDiiMGZYioG3F6zbdi+tyISsgct7nNKnlb3SvXki784KGuG TVjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Tu5c51T0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o65-20020a257344000000b00d9cb5b26d71si3568842ybc.634.2023.10.27.12.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 12:20:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Tu5c51T0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DED228260C2F; Fri, 27 Oct 2023 12:20:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232288AbjJ0TUp (ORCPT + 99 others); Fri, 27 Oct 2023 15:20:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231484AbjJ0TUp (ORCPT ); Fri, 27 Oct 2023 15:20:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A2E186; Fri, 27 Oct 2023 12:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fJJP+jvnbdOicjB5+lM50yNyHr0lxM58vJLUjNNi0LY=; b=Tu5c51T0HmiNseo1Iox3QQdnI2 fpEeTvxbeV0AhehMpFbTnqVYn4wZvh48XdA0wYfBqL6kNv2DnXCODm0t+Z+mqkQIyOZKme8yRKY4O hRIpXk8FORVwInmS3l51gvNWFvHtHnjE5hFjmCXTrTbo+rg6svl3dXHoIgyFpBz3i4Pwfkn1rErhV L0kx/0JfnCmJ8UEyC1aiNp9wQgkrr3s6k5BcB28PJ9am9q6q9Ajo9GRIKWFUiJVKnHL8kIHmpW+83 MOOqLnwkzg3MXxRB7xEloRd0Vio7HKsU8Er51BzsWoChOoIQK2ti3NNqMyRiTvrvzV2FktqzfLt0V L6gjU8bQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qwSNe-0056gj-Mz; Fri, 27 Oct 2023 19:20:26 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 5D09D300392; Fri, 27 Oct 2023 21:20:26 +0200 (CEST) Date: Fri, 27 Oct 2023 21:20:26 +0200 From: Peter Zijlstra To: Frederic Weisbecker Cc: LKML , Boqun Feng , Joel Fernandes , Josh Triplett , Mathieu Desnoyers , Neeraj Upadhyay , "Paul E . McKenney" , Steven Rostedt , Uladzislau Rezki , rcu , Zqiang , "Liam R . Howlett" Subject: Re: [PATCH 2/4] rcu/tasks: Handle new PF_IDLE semantics Message-ID: <20231027192026.GG26550@noisy.programming.kicks-ass.net> References: <20231027144050.110601-1-frederic@kernel.org> <20231027144050.110601-3-frederic@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231027144050.110601-3-frederic@kernel.org> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 27 Oct 2023 12:20:52 -0700 (PDT) On Fri, Oct 27, 2023 at 04:40:48PM +0200, Frederic Weisbecker wrote: > + /* Has the task been seen voluntarily sleeping? */ > + if (!READ_ONCE(t->on_rq)) > + return false; > - if (t != current && READ_ONCE(t->on_rq) && !is_idle_task(t)) { AFAICT this ->on_rq usage is outside of scheduler locks and that READ_ONCE isn't going to help much. Obviously a pre-existing issue, and I suppose all it cares about is seeing a 0 or not, irrespective of the races, but urgh..