Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp795177pxb; Tue, 14 Sep 2021 08:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW7v2OCJJ+vse026kJgrtqmbmHtGabjiMUZhAikzJ0GEjH/4Jn0s8nWLszvZLDd0Co5MBK X-Received: by 2002:a05:6e02:1d8b:: with SMTP id h11mr7327316ila.94.1631634843342; Tue, 14 Sep 2021 08:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631634843; cv=none; d=google.com; s=arc-20160816; b=xomCz2aIt+1yWrnuxqI5++TkJSmAgY3QrZtfWduWa9QJPq2UIja3OGKQ5zia5tJYOJ tndkYP6TnPncF14UBgewcKiJYBCn4aJTfBC1PpE0C1oEV0jHTvN1D4+4u1jeCIwWBX+7 zScTdWA9vrD5SykBlotm/vZmo1zRarEE6/0KZl10x6SOyLuit0Vs2CwvqxoWWyMCaOJI BvRYfQBi++gqO/nJ7GnBIwi7kSUSyabNTneZFh/KE4boIMzr2eOhNYXTnQbBG0+dpWnp WGDK5Pca+XtDBiEuY1aw9JUCHuPkcr4N8u0Xlw2r3l9tbgp4aQWRAwo/NzA3QGswz0PE MmSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AuGH7A1j3mwghnSNlt7ii3pSP3zqhI3ZLfhyE1/i7mY=; b=birEbHgk4XDoYb8xAeP1DiJ5Wvg4n+eyQqsw0S4SMDMtsK+KFbbc4rtH/F5hg9mWce Hefxu07Hr+TRIiFb3heAuzyuKt03WvQh+mBreLyxW4kk8ZV8YviS8ELWR4+O7L858gNJ MCEcB3IuErN497Jt/LV13fo17XaFA64EQE/nUEmY0VukC+5INhWHYh7vRGVt6LAPcH3V mbbljx3j5a+9ppQ3D806iE8mdW8R+0q06ssTgiL+6KAt8YwSF33P6HooINeHZGb2oIYj lPzmj3lbvTk41xfKKyb/wqT9buaA62zyKeg+huQwcuZq1UB3zbmQr8n8XwDJNyBhBvCg P9hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=R7AKqlIg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d8si10803610ila.45.2021.09.14.08.53.51; Tue, 14 Sep 2021 08:54:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=R7AKqlIg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234864AbhINPy2 (ORCPT + 99 others); Tue, 14 Sep 2021 11:54:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231928AbhINPy1 (ORCPT ); Tue, 14 Sep 2021 11:54:27 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8809EC061574 for ; Tue, 14 Sep 2021 08:53:09 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id g14so24793582ljk.5 for ; Tue, 14 Sep 2021 08:53:09 -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=6/4EkKkp6GMj3YISK4uayf4OhvWxCsnRNoR0KJzB5UphvF3on9a0joEo3nYCLO05Ib Ovigjfr+K2+chYUxOsEg4eUqL4K48UEQw8yyM6ZWZnqj+oWIVjYVI0M4G1qNnFD/qmmu RySa1d3neLiWtcdxDQA+o3/U18Pg5fMlRFPeJYafxqvaYMvOMKXfWat+O043WgJEZcMu CK8qBfhllmKKQK3gEnIDnazS+hm/fMdqH95aQRZoZwv56fXlFtvRsvvsasJ0+hTgIaXu Fu3uJildRmsPCix0rgym3xNM6xIQTtc7dUz3INXtImk9e8udWXQe0yuJ31gTDN0X9sZB JjkQ== X-Gm-Message-State: AOAM532RoNqfRHxqGV8KiM4fRJtcopSiveWirr4+c3CCT7WErrBb+O5X UEJnOV2oSfbAbwDuA9vv3sDNCF1mR/0SiCaBRIA= X-Received: by 2002:a2e:a555:: with SMTP id e21mr16685248ljn.490.1631634787411; Tue, 14 Sep 2021 08:53:07 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id i4sm1052702lfo.13.2021.09.14.08.53.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:53:07 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id i28so24785284ljm.7 for ; Tue, 14 Sep 2021 08:53:06 -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 Cc: Linux Kernel Mailing List , Keith Packard , Russell King , Catalin Marinas , Will Deacon , Michael Ellerman , Benjamin Herrenschmidt , Christophe Leroy , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Kees Cook , Andy Lutomirski , Arnd Bergmann , Linux ARM , linuxppc-dev , linux-riscv , linux-s390 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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