From patchwork Wed Jun 2 13:12:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 453049 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 B6F4DC4708F for ; Wed, 2 Jun 2021 13:31:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A44DF60BD3 for ; Wed, 2 Jun 2021 13:31:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230271AbhFBNdb (ORCPT ); Wed, 2 Jun 2021 09:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbhFBNdG (ORCPT ); Wed, 2 Jun 2021 09:33:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D10CC061761; Wed, 2 Jun 2021 06:31:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Subject:Cc:To:From:Date:Message-ID: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=+0GJIyUeezLFp/ym4/vP+fC11EDSc+9M3QstIcNFnoM=; b=HwUP711Hi7fk/GRlHwhhfYuQB5 K5vYCOeQPuOhkpRqo74FjxBE7Qmwx8Wj6GWtoLKoGosJHAwdRgo9jNLQy1TmIkJWwpfsGoVcLemhp yE/DBMFhvtilIfo4dv1JJaSo/mfYt/uX/LfisWcd+3wnlJLAvfkdTdiO1+HtsYKFPZ/tV6bjzqFeK 4bo4vY52aoMqPrC7we688zYhvu7+dOw4A1kcJpeVTuCoCOtBGxbR88VN+otXu+yI9l3xV+f66r/TA vzFWO4ght7JIQB07yN0JwJ0Lzx83FvV5EUgJ9xU0ODmz2KYDDLO3n44qTW1zqH17jqyBTMXum4Ngk tEM+eMIg==; 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 1loQxe-00B8nb-51; Wed, 02 Jun 2021 13:31:08 +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)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B184A300299; Wed, 2 Jun 2021 15:31:04 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 90C662C08A5B8; Wed, 2 Jun 2021 15:31:04 +0200 (CEST) Message-ID: <20210602131225.336600299@infradead.org> User-Agent: quilt/0.66 Date: Wed, 02 Jun 2021 15:12:25 +0200 From: Peter Zijlstra To: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira Cc: Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Jens Axboe , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, "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 , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, linux-perf-users@vger.kernel.org, linux-pm@vger.kernel.org, rcu@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org Subject: [PATCH 0/6] sched: Cleanup task_struct::state Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi! The task_struct::state variable is a bit odd in a number of ways: - it's declared 'volatile' (against current practises); - it's 'unsigned long' which is a weird size; - it's type is inconsistent when used for function arguments. These patches clean that up by making it consistently 'unsigned int', and replace (almost) all accesses with READ_ONCE()/WRITE_ONCE(). In order to not miss any, the variable is renamed, ensuring a missed conversion results in a compile error. The first few patches fix a number of pre-existing errors and introduce a few helpers to make the final conversion less painful. Acked-by: Will Deacon Acked-by: Will Deacon Reviewed-by: Davidlohr Bueso Acked-by: Davidlohr Bueso