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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 C34FDC48BE0 for ; Fri, 11 Jun 2021 09:17:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A709E60FEB for ; Fri, 11 Jun 2021 09:17:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231521AbhFKJTU (ORCPT ); Fri, 11 Jun 2021 05:19:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231229AbhFKJTT (ORCPT ); Fri, 11 Jun 2021 05:19:19 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 074F9C061574; Fri, 11 Jun 2021 02:17:21 -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=N690ECQPvsAoivaYr746nCr4lTorK6+/ltFMNHOQPHU=; b=po4QGRDeQ+l23bIv8X8YNuxV/T 3wrAaBtuS1EMBPRbsz/uO10WpvImy/Q0ncsUPqBkf/I57RcN1CMSKMRuX49NSBMMjVMBqkJTQTioG 1Yfip3uio41jhqDv1isC2Kml1B8llOpWkUdLksxvIKFK3zeNL1jZn+BThk9c8DYTF7v0bC5pjtT7O lioIes5+UA55PTQ19ddPGPOScND6esndgalIbMyNXRMWlnCspuBSQVc2bxO6PXUAcSUMA6OF2FZIG 80IKtGjUncW0FVotgtMJ64D6ATTvKeUnd4ZFfkQaHSGKEx6Wja49xw89v9twPRAJSR6flSB9KBk3p nnZeBEMw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lrdEQ-002bbE-PD; Fri, 11 Jun 2021 09:14:13 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 69CEF3001E3; Fri, 11 Jun 2021 11:13:34 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4E8A721AB0AC0; Fri, 11 Jun 2021 11:13:34 +0200 (CEST) Date: Fri, 11 Jun 2021 11:13:34 +0200 From: Peter Zijlstra To: Geert Uytterhoeven Cc: Thomas Gleixner , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Borislav Petkov , the arch/x86 maintainers , "H. Peter Anvin" , Jens Axboe , Alasdair Kergon , Mike Snitzer , "David S. Miller" , Jakub Kicinski , Felipe Balbi , Greg Kroah-Hartman , Alexander Viro , Tejun Heo , Zefan Li , Johannes Weiner , Jason Wessel , Daniel Thompson , Douglas Anderson , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , "Rafael J. Wysocki" , Pavel Machek , Will Deacon , Waiman Long , Boqun Feng , Oleg Nesterov , Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , John Stultz , Stephen Boyd , Andrew Morton , Paolo Bonzini , Stephen Rothwell , Linux Kernel Mailing List , Linux-Arch Subject: Re: [PATCH v2 2/7] sched: Introduce task_is_running() Message-ID: References: <20210611082810.970791107@infradead.org> <20210611082838.222401495@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 11, 2021 at 10:49:56AM +0200, Geert Uytterhoeven wrote: > Hoi Peter, > > Thanks for your patch! > > On Fri, Jun 11, 2021 at 10:36 AM Peter Zijlstra wrote: > > Replace a bunch of 'p->state == TASK_RUNNING' with a new helper: > > task_is_running(p). > > You're also sticking a READ_ONCE() in the helper, which wasn't done > by any of the old implementations? Care to mention why? Patch 7/7 should clarify. Arguably I should leave the READ_ONCE() off here and only add it there.