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 0F40FC433F5 for ; Tue, 14 Sep 2021 15:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4C4E61163 for ; Tue, 14 Sep 2021 15:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234464AbhINPy2 (ORCPT ); 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-Google-Smtp-Source: ABdhPJz4numYn8404Gh0XMzL89W2SMa038OCtJwHaeR9GPBtNPCcVN61XNMTGv/+kqC/VP9KirZG6Q== 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 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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 60C55C433EF for ; Tue, 14 Sep 2021 15:47:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1DCBA61151 for ; Tue, 14 Sep 2021 15:47:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1DCBA61151 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XSRtosSKquUwPX77O7Gfomo96WUXeWju6uCXGcUTNpI=; b=jstv8a5+rKoAXK J3lb1CM/ZIbbclqzlGL4j8gukrFNQiaHevHDZ53vXlGJpibKgUnzCFPAnqOMzH6iwHQu4LUJdnWD+ +KHsu+WCBhx76QOy4hQjln151op6IItW78nPAtIx1wIlpNMm+vbsBC8P7nIWVHUgjGVhRmlxMbsdF t7VZ4Usou+ZUaIF5Ly1oBuPwGnK2j3/0yaF7LPFwdrme4hygt+jDdmsQ7qytKphtNK8iiVdSNfJ8W dQ3wzA0yfGnsH+Tazq5tWlxZBX05fE1Vfrh7Dr8AJ35S8fSUSB0wk/zRdec2WgIElM0NNEwA3RIFD 4V0qGRVbT928Upy4pS1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQAed-006H2M-0s; Tue, 14 Sep 2021 15:47:27 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQAea-006H17-9R for linux-riscv@lists.infradead.org; Tue, 14 Sep 2021 15:47:25 +0000 Received: by mail-ej1-x62d.google.com with SMTP id kt8so29947933ejb.13 for ; Tue, 14 Sep 2021 08:47:23 -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=wlIgu69OLXaBoVFrJwMblHiviRLJ2C9DTqwQjiW8ZwKAM5xIYNmAgOLe39phH+WGqz +kBKOxGY9rhrc/J5CKJ8VBKSE3NwQh/FIfkPFGN6Yvz5MCXzI92T9XJZdFK+tZJtEYzR X+3ZLmO96aYs3MkXDONFofvhs2kCHALN5wIoa4aYIgkw2hpHDAVgFs2HRdSLoFv1XY6I 1brzsTRa9AqN9gsIoysW0w6PvcAsjwfrKrzrT1xtFLdkMz34r2iPlspl+07PVKKFdocK 12yHvtgV+goxU5NqzBg6cRefx3WXV8B3sPmyzybHtUxFLDA1XTgu8N3SNRsE8e36Lhni oMhw== X-Gm-Message-State: AOAM532+H6VweaMC2jlbsGy+9d+K27UUlvcuU1kfb0ycVyUUbANR2Mga XW56pp5xkKQNBk272WYT0oJQEvqO30eVjFlrDTc= X-Google-Smtp-Source: ABdhPJyXphMH/EfyRJe2IlMzpBMI68OOPCmRpq+AAt4ApYVhTLS3fLa9A/QRTQOiHpglOWKZCOwDbQ== X-Received: by 2002:a17:906:5586:: with SMTP id y6mr19195797ejp.189.1631634442541; Tue, 14 Sep 2021 08:47:22 -0700 (PDT) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com. [209.85.208.41]) by smtp.gmail.com with ESMTPSA id bw12sm4297889ejb.9.2021.09.14.08.47.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:47:22 -0700 (PDT) Received: by mail-ed1-f41.google.com with SMTP id v24so14447306eda.3 for ; Tue, 14 Sep 2021 08:47:21 -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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210914_084724_362220_780D33AD X-CRM114-Status: GOOD ( 11.63 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 EAEC7C433FE for ; Tue, 14 Sep 2021 15:49:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AFA8661216 for ; Tue, 14 Sep 2021 15:49:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AFA8661216 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PMqO92XTD/gd9hgJ8fVYBzcZsXVFNkU80HjRwh3yhK0=; b=wcVOfgZQMGzMcC uZkhX/d/T4Vr4ra+kIjGaj88cAxLguuspPYOx3g4zWi/MAHC6Ue3Zu4MZXpq44dFG0YgO1KT5ABVN dUvjM/b+I+hL4f55JzgL5K2/GdfxaWqtAXPMTgC9MDne/EhfkaWlgAWfqleW6zlan49EbgbN3Wert cwmMOaQviPJyjgCnU6smHsDG7NZt2dZM4fWQmH0AECOaIw1hK7BpnNDbGfJNsC+Nb/AGon7H8ugg9 76snetrheIcJJuBzGNY627L8wzy8H9BDOz57E1UEw8xXHWpSYQHhfVtuU60wKH423YayvGV09XN3k MXx4QXHC9Cg8jkRO6O5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQAef-006H2o-SC; Tue, 14 Sep 2021 15:47:30 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQAea-006H18-Dx for linux-arm-kernel@lists.infradead.org; Tue, 14 Sep 2021 15:47:26 +0000 Received: by mail-ed1-x52b.google.com with SMTP id v5so20654314edc.2 for ; Tue, 14 Sep 2021 08:47:24 -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=0hcZjz0R+aU1lmwEBkse9auqhtslLO25vkHy/8CHcSEs8d48IAdyrZnMgNHc9uqoWB TBpvffq+25KJ72C2c7CLqGewu6b9S8dJGEps+K94yQZrvyi5XyoGWRUWl2sSy6TLoPZp 5olRDKY8h4eUPBnh8yYRXKyDQDbV5nU39q44R7uc9mh+yuhaEo2q12KWTkMl39885IQu ALBBnU+G3czWZVItYu6LZe+DFafEBXYLMUXJRLhHsEtsaHd1BVTAk2KRLXPguNIvkt9r 9YJ7akvZSI7AgoPrIiFYUUrxywefylONp2nnhTtVE7v8ltt3PYdTnppwF4pNBJcQfezb ELWA== X-Gm-Message-State: AOAM530dG6rw+9tMg/RLHB3bhgVdaD+pyVqqVRJYNvKJBdWtKx3F7PJ7 NAcsHzXNdzsXmGMG4uAV/nwhHbRfigJu7NMaEP8= X-Google-Smtp-Source: ABdhPJzubS2dVkghrGM+uEabuSploLHXplDiBeNYcTnG151z3WO5xMYrREPIzUHnchaSYoi4IrTalA== X-Received: by 2002:a05:6402:14c3:: with SMTP id f3mr20365123edx.312.1631634442638; Tue, 14 Sep 2021 08:47:22 -0700 (PDT) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com. [209.85.221.46]) by smtp.gmail.com with ESMTPSA id lb12sm5070520ejc.28.2021.09.14.08.47.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:47:22 -0700 (PDT) Received: by mail-wr1-f46.google.com with SMTP id d21so13300049wra.12 for ; Tue, 14 Sep 2021 08:47:21 -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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210914_084724_501234_F9B9B1C5 X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel