Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1010736lqz; Sun, 31 Mar 2024 09:17:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX1h103d4KMMU4ehnAMZvXP3prSx0UbE8KpOWpNZURVmkPEyga4DBV2ivoVOkhr/P+2MOSpKZZy8eLu4GPs1qpOij++8eNtOHYwBxWBqw== X-Google-Smtp-Source: AGHT+IFPGzN9Q3mq3oFb3bb5l3Uvv7C3VIX655t1SDB5qyWmZQu93my+DjRsdy9cT6gg7iut2LX0 X-Received: by 2002:a05:6e02:18ca:b0:366:bed3:a218 with SMTP id s10-20020a056e0218ca00b00366bed3a218mr11017898ilu.32.1711901836154; Sun, 31 Mar 2024 09:17:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711901836; cv=pass; d=google.com; s=arc-20160816; b=sqptOQnObtRYsugOLQKDrSWfFEihEWAvqsQOOAWctsDfZLd+0D6SQEXMAkf3X0PCdg ZMFSOjQdaAJAR/0jqdFQpg3uBdGULFOm2+XuM9IXDmPQALA9Mcx4VcIblX5ZX6QTyx8K P+hChyUDHM2q07Be8bSwuJHDrWxBcDk/ydC8gd2MGnY+qd/56gFXCgQzGSj9+e1eG5L9 UonWj/aB8L8rKKknjE74Rg/gZOqXOo2N81NhcKDuwd5JeQynmHEFL6RcwcIevmbLLt/F wVZAP9izs0KWx9e5YrQt4JrkZIKp+7vkB4Rovg84KNRGLtISrkeJx1bPsPO+udUO0v8H iYTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=WsP/+lzMZQ2zP7XRmT3cZD7Gha/b4oecQDkkHYBNemw=; fh=at2fqWXQxDCpBrmcE4rCdA3yjX2nk9rJUTUud4aGD1Y=; b=OaLaDCG0yPjM5rFBsxT/pLJy8TEVubpt3xIVMvukN/MNuO7qK65Qc3vnIWjND7H2ce 64Mty+0uOluAAW1nwhNJDU823QAU46b4xiL29RoNJo9v708fiEwE9cSPy1/3+7609M26 UUXfCLgVTQTInv4NnKcxBfzpRTlwxo7fPTrvqen9AcxI/COZwhtLKr65HVSpjCyRR+Jl Iw/ZhsVuGbF/0wJEJerVqn3eg/VWfWL7cIqLbA7SRefeu8ablr0yKOs4RVu0lFe5HDYv wmOaj65u7KROLQruUv07IJjF4e/229Ze4eQl++srwwWg59jpek1gXDmyCxPKYv5PcRNQ HzXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kNblNQC2; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-126135-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id o16-20020a637e50000000b005d47866f376si7670107pgn.854.2024.03.31.09.17.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 09:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126135-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kNblNQC2; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-126135-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 89D00B20EA8 for ; Sun, 31 Mar 2024 16:17:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18346145B02; Sun, 31 Mar 2024 16:17:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kNblNQC2" Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B4C4145339; Sun, 31 Mar 2024 16:16:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711901819; cv=none; b=P6iXIuSodjSrrGZRpUuPAt41Dq2I1omq2j/kMXl3FJEzjwTPzNuecghECGYHKWZuDUB5/dJzA1XHVs0ATPi6nMh57u2c3KGMBHgevPiiNYejc1pdqKX7NjGrR5RjlSq64xJzNkNGGHe+wkYNJrkP5shxfppWRbeKsEbIQnqgzxU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711901819; c=relaxed/simple; bh=WsP/+lzMZQ2zP7XRmT3cZD7Gha/b4oecQDkkHYBNemw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=m70Bw7gxZYq45YFGkQjdyS+WPqi3Yk7NweR/M52PhZX4USLL9nuRxwmeZw630IbOaVlteUF9HH1kBwkz7/HmT5c5ERZXyeRi6CsjsJ5oZbSiIXFCKULuqV94JX4ebyG2kfvj/JpurufjkDRKW3f9/hQLgfQWl8PDGKWVjHVcVOI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kNblNQC2; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2a07b092c4fso2502126a91.0; Sun, 31 Mar 2024 09:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711901814; x=1712506614; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WsP/+lzMZQ2zP7XRmT3cZD7Gha/b4oecQDkkHYBNemw=; b=kNblNQC2FYag6sQZc2aX37t+OzAYceglx/u5HxjkYUW5PbrfLcugVX2ljNrLGEYrZV Ta/8tVDhpXF3cTkwZtCj5PI0+mjXIjAHftk25efDqQsvGj3QNxDyveDvYNhtlZcCXkzQ uXwYRgzB2WO9T52xNvOK79+8gBCdOt+f0JlPla5eBiW3b3oHdB74O9dIwoXwrgsQj+PP Vkkcep1wAjK9PO/rxQ6S1ph6fgAT1kRix8rL+A4J81f2Y/EL6c/oxV42Zc2AeMEBA6Nz bKfv/g+3mkuPDwS112wspO8/sQFDb3cc0vy3+yi7YicdafQu0adj3M1nG+CxY3GcboXA xaPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711901814; x=1712506614; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WsP/+lzMZQ2zP7XRmT3cZD7Gha/b4oecQDkkHYBNemw=; b=NKn1F9igG6/qgRqww0gfeonbAxx9mX7l4SQfVq8v/j6wZM5TKDUml2TxNMGHKaOF/A jrvFJxueuFtUmn/ZlztZjcCZ1CAvDCNIxfgjfBC8eJ64ScHZU8tUEbolsapl9AQZ4+cN Klcw3Z6Ncz7OXHvc4pIM/cn8xjmR8LlnB/ZumCDHDxQWSGnueNdyhAhN+13oZ01F8oo7 ZN7ZPoCCTt9BXs5mBaNPP+vDQNUxwNm2wEcPw3ASu9JcBL/q7K5duMbaYXQ/PbVi1fmT iulMlq6fiRjuCFEPakrO/oZMMElnzcDzfKrbVx3qb/fxOTHQEzVlVynh+nlnr58SG2xZ /rMQ== X-Forwarded-Encrypted: i=1; AJvYcCU1uu8bqBZipFAu6M2Lf4Hui2D06TvuQL27hZHAc8HYqbGGNL5n4/eNLHKz6enHJC2ZGjmrGUUBl2yHlen99clnc83G X-Gm-Message-State: AOJu0YycL+iZ6JZCDHvOWpk/+QsIRQpR9xWCd4iltylM7ytuKXeXM0a5 qix+xFeDUSBLMObbJZW2CnKi+CqXXGn2ANAbpTYUgtROwHN/IskO00uh4ElW8IH1WwvFtS69Psf pwRAmQsGHUr2D419QfZTMsbeh6Pg= X-Received: by 2002:a17:903:987:b0:1e2:4093:5b28 with SMTP id mb7-20020a170903098700b001e240935b28mr5975393plb.3.1711901814191; Sun, 31 Mar 2024 09:16:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240328075318.83039-3-jiangshanlai@gmail.com> <769AEAAB-7DEA-4D94-8979-F01EDFD6EE46@joelfernandes.org> In-Reply-To: <769AEAAB-7DEA-4D94-8979-F01EDFD6EE46@joelfernandes.org> From: Lai Jiangshan Date: Mon, 1 Apr 2024 00:16:42 +0800 Message-ID: Subject: Re: [PATCH 02/10] rcu: Move rcu_preempt_depth_set() to rcupdate.h To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, rcu@vger.kernel.org, x86@kernel.org, Lai Jiangshan , "Paul E. McKenney" , Peter Zijlstra , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Zqiang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Mar 31, 2024 at 7:10=E2=80=AFPM Joel Fernandes wrote: > > > > > On Mar 28, 2024, at 1:20=E2=80=AFPM, Lai Jiangshan wrote: > > > > =EF=BB=BFFrom: Lai Jiangshan > > > > Prepare for arch-specific-defined rcu_preempt_depth_set(). > > > > No functionality change intended, but it has to be defined as a macro > > as rcupdate.h is a very low level header included from areas that don't > > even know about the task struct "current". > > Sorry I did not follow changelog. If some rcupdate.h includers do not kno= w > about task_struct, how does adding a macro that uses current help? > Hello This is how macro works and it expands blindly based on tokens on the usage-sites. And rcu_preempt_depth() & rcu_preempt_depth_set() are not universally used wrappers, the user can simply also include linux/sched.h to make they work. Thanks Lai