Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5448918pxv; Wed, 28 Jul 2021 10:59:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxSty4oomZUJFSJtBVOueyPkGGeIoo5EuDugfA6gN5wIZaDOZiane2DTzjtr/CY1var6fR X-Received: by 2002:a92:c912:: with SMTP id t18mr72389ilp.152.1627495168141; Wed, 28 Jul 2021 10:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627495168; cv=none; d=google.com; s=arc-20160816; b=ZZtrAqjq1iJDxYRahCnlkEom3ek0d9f4VONUS8j6uMbOLg4vP7mgpKnKHFNwBg9AZT 4+Wsh1eqOWFbE+eno615CP51jaD3r1jDA+9Wq7LZsZ5kw+s4uqk8Lze/1Dl7sRU9JsAS ttJR2R2kOV/kDsNUQogUcqNGOZ2IvWL6zS+UQQiGKq5qoDsRhp4K4/caiPzfGDPpzeeO J2fkkgj2MJ12bKj567h5e1/68N/akRwvkFimMJWfAOrDLMIj9QmA3OgeRxFafWt0we7x 0m6+xvqnn9KC8PXLZTcY0gR3SYp7PQOXFV2rh5hvbqSNwVQ8/D6sfupJikATLTnawXOQ PWBw== 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=st4BTmD3GjnmfHHn6gBxGtmKTmgLmjzYeVnW05cJn0A=; b=jI4kkINz5X3rT+ymMEd1ZD4uxKVKOigZaICL4z2tuPOefsjhZGzzvpVk8WQevT4AVg GmVBL6PZM6YZHIubnR7zjZu9tgjC8yGAiqNQB2CuIfw5e3yme56GIgDNGie/5Mgljqkv HDufaEImDMiysrtSYwrKCbw4FgKsy8MgUsJlTnnsPW35C7Ljdh/5Xx6WT4zR7pSrbjMp wLkG0HuhDCdH4hXbV9eB0kHoonUl5xynoUpwXoxYD2ZX9zNKBWBXtQI+Rb1kMwNqOxPP TMQaOEqu4+TjArq63iRDEt8GqUv/YjlGXkmAtUH5juvNlWM5pZpi8ptToMF4jdP6ZlVk xnSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ckWa5YRo; 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 q1si457430ile.21.2021.07.28.10.59.15; Wed, 28 Jul 2021 10:59:28 -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=ckWa5YRo; 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 S230283AbhG1R6a (ORCPT + 99 others); Wed, 28 Jul 2021 13:58:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbhG1R63 (ORCPT ); Wed, 28 Jul 2021 13:58:29 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4388CC061757 for ; Wed, 28 Jul 2021 10:58:27 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id h9so4085275ljq.8 for ; Wed, 28 Jul 2021 10:58:27 -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=st4BTmD3GjnmfHHn6gBxGtmKTmgLmjzYeVnW05cJn0A=; b=ckWa5YRohsLqQWO833u/brAzgJGjnutI0P6k82Ud0JVlkVyx7vXtjeSjndZo0mo9mY aUBFUVbZIGxF8sMqdngYvzcbCq4CVB2g472PBpiQFre1Kadno8zglUzss61LiyuhHL4n DC0o633dF8JUNRXshWFolyaCmL/kwVHPjrAXo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=st4BTmD3GjnmfHHn6gBxGtmKTmgLmjzYeVnW05cJn0A=; b=ZzCWOe46bAZF3KgA8YGt6ylh8stltK7jU/o9MjmrziayNWRM5Ki2Whd65qziOx9/E9 B7Su8OtJUFwHpK1r5xSQ6HnvFuB8hU2SKcP9g+OqRF5sK80SDOqth1lWMPOX/xsavCla yT/5P0ySZDRm8daxfnO+MWao7ECsfcziV2K1Mng2I4Mo5YWy0nozVVWW77aY2gclaa2f DVQVuxyQecYE2hyHuOhDftYR/0fD1TBVylhswEDQJKGAXz99UlKpCRZJfA/8gelADuiD 8ABLmWn+yEIJ+wM0Uy5FTlNTtc20p+gLYKF35hrrAfg3NBSNUB4RIZzS62l6gDUi70mt neLQ== X-Gm-Message-State: AOAM533gvbWGlxuSAJuuQ0nXq2m+r7mQhkLT/AM0jIuQ4QxbAfcT6FRU gQ/SV3y/DR9SiA03c/BrxXnEVo6ksiAZKqwXbts= X-Received: by 2002:a05:651c:22d:: with SMTP id z13mr606036ljn.14.1627495105428; Wed, 28 Jul 2021 10:58:25 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id g7sm61795lfb.152.2021.07.28.10.58.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jul 2021 10:58:24 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id a26so5502072lfr.11 for ; Wed, 28 Jul 2021 10:58:24 -0700 (PDT) X-Received: by 2002:a05:6512:2388:: with SMTP id c8mr533031lfv.201.1627495104323; Wed, 28 Jul 2021 10:58:24 -0700 (PDT) MIME-Version: 1.0 References: <20210721202042.GA1472052@paulmck-ThinkPad-P17-Gen-1> <20210721202127.2129660-4-paulmck@kernel.org> <20210728173715.GA9416@paulmck-ThinkPad-P17-Gen-1> In-Reply-To: <20210728173715.GA9416@paulmck-ThinkPad-P17-Gen-1> From: Linus Torvalds Date: Wed, 28 Jul 2021 10:58:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 rcu 04/18] rcu: Weaken ->dynticks accesses and updates To: "Paul E. McKenney" Cc: rcu@vger.kernel.org, Linux Kernel Mailing List , Kernel Team , Ingo Molnar , Lai Jiangshan , Andrew Morton , Mathieu Desnoyers , Josh Triplett , Thomas Gleixner , Peter Zijlstra , Steven Rostedt , David Howells , Eric Dumazet , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Oleg Nesterov , Joel Fernandes Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 10:37 AM Paul E. McKenney wrote: > > +/* > + * Increment the current CPU's rcu_data structure's ->dynticks field > + * with ordering. Return the new value. > + */ > +static noinstr unsigned long rcu_dynticks_inc(int incby) > +{ > + return arch_atomic_add_return(incby, this_cpu_ptr(&rcu_data.dynticks)); > +} Maybe inline? But more I reacted to how we sadly don't have percpu atomics. They'd be fairly easy to add on x86, but I guess it's not a huge deal. And hey, if this is pretty much the only place that would use them, I guess that's not much of an issue. Linus