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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 C391EC433F5 for ; Tue, 14 Sep 2021 15:48:12 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C15161130 for ; Tue, 14 Sep 2021 15:48:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1C15161130 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4H876L5Yc3z3002 for ; Wed, 15 Sep 2021 01:48:10 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=R7AKqlIg; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=2a00:1450:4864:20::135; helo=mail-lf1-x135.google.com; envelope-from=torvalds@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=R7AKqlIg; dkim-atps=neutral Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) (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) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4H875W62Fvz2yHH for ; Wed, 15 Sep 2021 01:47:25 +1000 (AEST) Received: by mail-lf1-x135.google.com with SMTP id y28so5561420lfb.0 for ; Tue, 14 Sep 2021 08:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AuGH7A1j3mwghnSNlt7ii3pSP3zqhI3ZLfhyE1/i7mY=; b=R7AKqlIgzHsNi6Tq6c2IwOarByE0iXqz4YlcYfOLGqwYPfSWeFNr9LdrOHY0sHRCu8 naDWlgwpYmTs3LAeSJhTpybHunXV2G0Zr6u1AYtP8z+sHgAVUF85Ux4F5km4EfIbfx7r jZuWndb2Alk2aESrYA3wH6fpzGqN1esmqt/VE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AuGH7A1j3mwghnSNlt7ii3pSP3zqhI3ZLfhyE1/i7mY=; b=6ww2tytm1d9xPRrQIld5AmaMyEmYbtqI8jjG89jsJr7wm94PF5Xe264cQKf2hog8U1 6xD9kTBMYEYjaLJ0cC4W7FCBJiqUYgKuT01T9FUSMZh9kJKawpQzSUZOSbsps+4QyXCA KQo0W89AH6U3zZN2cfk3lcJuzR3gO35Ty9b06ZH9uz1QYPJ+kXS+CmBApmVRj55B9pry J93VuwYiaee5atNaIQPclao+YefzuJF0rIlZphompdrkW+4r1cKugFNE2MWCzAVfH6Np EqSHZheipBwM4KMRMgc8v6L8rXr6gDyKT2iTMUbsr0HKDxAqp+z3tIXgmLjarUSDQnkB mIvw== X-Gm-Message-State: AOAM533alKD4z5oCF1ODD1B4BijdUiC1TsQGt8+yCCB/wUg3Zvb8ZhJ/ ZLMRb4J3gLGfJBrkbtEuD5/dHebXlD8uwfJds/c= X-Google-Smtp-Source: ABdhPJxf4L+ZVvnn8LGDbBQZDw6pAGvEhMceobeDxNw26lYnuCt4EjXqyKODpBHwErkOqRSn6VxRBg== X-Received: by 2002:a05:6512:10c6:: with SMTP id k6mr13278881lfg.327.1631634441390; Tue, 14 Sep 2021 08:47:21 -0700 (PDT) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id c20sm1147142lfb.29.2021.09.14.08.47.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:47:21 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id s3so24752270ljp.11 for ; Tue, 14 Sep 2021 08:47:20 -0700 (PDT) X-Received: by 2002:a2e:8185:: with SMTP id e5mr15545178ljg.31.1631634430421; Tue, 14 Sep 2021 08:47:10 -0700 (PDT) MIME-Version: 1.0 References: <20210914121036.3975026-1-ardb@kernel.org> <20210914121036.3975026-6-ardb@kernel.org> In-Reply-To: <20210914121036.3975026-6-ardb@kernel.org> From: Linus Torvalds Date: Tue, 14 Sep 2021 08:46:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 5/8] sched: move CPU field back into thread_info if THREAD_INFO_IN_TASK=y To: Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , Paul Mackerras , linux-riscv , Will Deacon , linux-s390 , Arnd Bergmann , Russell King , Christian Borntraeger , Ingo Molnar , Catalin Marinas , Albert Ou , Kees Cook , Vasily Gorbik , Heiko Carstens , Keith Packard , Borislav Petkov , Andy Lutomirski , Paul Walmsley , Thomas Gleixner , Linux ARM , Linux Kernel Mailing List , Palmer Dabbelt , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Sep 14, 2021 at 5:11 AM Ard Biesheuvel wrote: > > static inline unsigned int task_cpu(const struct task_struct *p) > { > #ifdef CONFIG_THREAD_INFO_IN_TASK > - return READ_ONCE(p->cpu); > + return READ_ONCE(p->thread_info.cpu); > #else > return READ_ONCE(task_thread_info(p)->cpu); > #endif Those two lines look different, but aren't. Please just remove the CONFIG_THREAD_INFO_IN_TASK conditional, and use return READ_ONCE(task_thread_info(p)->cpu); unconditionally, which now does the right thing regardless. Linus