Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp338198rdg; Tue, 10 Oct 2023 11:41:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvgPT7aJ2yITMXXFSoW4heOCB+1ogjseL3czEEwKPTiLxpiRNvJMzOaslImxi7/qOX1xa3 X-Received: by 2002:a17:902:ed06:b0:1c9:ba89:5cb6 with SMTP id b6-20020a170902ed0600b001c9ba895cb6mr1792602pld.63.1696963310877; Tue, 10 Oct 2023 11:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696963310; cv=none; d=google.com; s=arc-20160816; b=VrH7WyPpdjMRfBbxRx2vjHYFamb0PY2TmzVHNgBqN35RCX6gufoRW0kVWfDtXW+tDp IkX1zlsammANGCtzzTCHImXnaubzLNHjYhlOi4zuMYrNWieXrtfpVbN6kqsBEsYSSKgJ cxINI5vjADBO8nM5hqlzS2Ffdlgiht83BCqxiReZjwafuuAquWYqpGNlQzfDwdJA535S lPkgWlty+/AsCjRfTxrlcXHzO506mA4NFzCbsrk/83GGv/lAV0RLFpijtRh+wvFJNgAM cS9DL6ivQ78UlG161cFmGmQUAaWfzIdRVbyb+8gldZaVBx5u+D5NScoPzjbzNPnwNfYK dlZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VrDykPNOztjeY31ZVQWWVQc0urUqz95uIAKgkC/bOGw=; fh=tF7riTkuBa8O3vMSvJNFl/jVCIdpn/sknKnZT2xFBLQ=; b=K5UPBj2PdTIe6Ej3K1dttB91OCrV3jo7YqEsTRHMrTvYo4fWeL57emzBsFW3Ak6tJq ChQOwcRgw1TycjIgOSj/HRRqb04b/GngdN/nkNV7xv0gmnteAKIB18+jkzMkj8X8pS5z XkQbGMF81DWom755g/3nHz5toWcGTlhkC1lFVQTMJMvFGqEbFG5LX/clTm7MSyjQBhK9 hjP9HayJkVWKWd9zEYDO4qs1M7jCZ6Sy5YYm6//xuqPKsgBud+biMVWcqvFf11jf8J/g 8071r1+ivJ6xby3Vl18dTA3YaaAsNvG8mH02HZ/UwcD5M/HcLDhoZWC5CDDiU6YlvPRv wbJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Xc7OFsVu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id jy3-20020a17090342c300b001bdcd2e1706si12008152plb.196.2023.10.10.11.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 11:41:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Xc7OFsVu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1B0D3802AF34; Tue, 10 Oct 2023 11:41:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234081AbjJJSlq (ORCPT + 99 others); Tue, 10 Oct 2023 14:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234123AbjJJSlp (ORCPT ); Tue, 10 Oct 2023 14:41:45 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 092A7AC for ; Tue, 10 Oct 2023 11:41:42 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-53627feca49so9986268a12.1 for ; Tue, 10 Oct 2023 11:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696963300; x=1697568100; 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=VrDykPNOztjeY31ZVQWWVQc0urUqz95uIAKgkC/bOGw=; b=Xc7OFsVuUNszyKaK9wtr1cV08zFDz/2ZgSdlY6I554X/ZZg/J6JWCKHcsTwCWikNwt h3blVrhuMjWz9QzyTpuHu+fF4a81XxPpz0lVUF4pob0kEQ40Jm/78vg0dP9guGufCfkU ltgLuhqkMlEcTxHUXx8lgIw03CfHZGwf9ExLzy/irwqxLJDGOs3xXifLuHkb8TN9W2H5 aXcyogJ3Lo7Dw4ovDB0qokceJX5PxrRRVi3QelEk0gn5bm48aZwX7jUjhofs/Jifybpu Dqmznxd+F3g1+mG+prkVwHR5MufjennhyQagf16SU0oHfeJ5tDmmHiUXAQzdlDg5uNBE qoyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696963300; x=1697568100; 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=VrDykPNOztjeY31ZVQWWVQc0urUqz95uIAKgkC/bOGw=; b=kuLagZ6X1weAwMZta+J4WDo1qBqb57YeCje912tou6jRnwQGVGwt7Hk/LlfKfnGukP seQjswO8TfgMf+765BC5A5HtRFuK8wd3cmYD9MYZq/06/74Z4G8+8DRm9E/CK7ViC5N6 v3ygvkZRSgQWPLQkGm3oFjym+t0hC8waJaQwGyD9h3ZIO4JsFmWnu5T+mCxM640h9mF0 ecHYkkSOGRlMXbzw9tnQUHA7rSKNp+C0KmWh2aVAWnkCORfoosbBSxAlWTTRlOV//XOn dWn7FMy9kTRngrhH/VJnqwFFyHrfPl6Sc1s2rqWLW2FMhXyZUaGVI4KcTpWe2uYICLMZ 9vnw== X-Gm-Message-State: AOJu0YzYnBKJF6ehaPwo9xDNgSlrOBeREVv8E+fQg8/JMHlng0jRz/Bp sNAxzrw/hZIdX983gnDBg1Nh2uxpm+7KbCMVeFM= X-Received: by 2002:a05:6402:217:b0:533:4c15:c337 with SMTP id t23-20020a056402021700b005334c15c337mr16681534edv.16.1696963300188; Tue, 10 Oct 2023 11:41:40 -0700 (PDT) MIME-Version: 1.0 References: <20231010164234.140750-1-ubizjak@gmail.com> In-Reply-To: From: Uros Bizjak Date: Tue, 10 Oct 2023 20:41:29 +0200 Message-ID: Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr() To: Linus Torvalds Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Nadav Amit , Andy Lutomirski , Brian Gerst , Denys Vlasenko , "H . Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 11:41:50 -0700 (PDT) On Tue, Oct 10, 2023 at 8:38=E2=80=AFPM Linus Torvalds wrote: > > On Tue, 10 Oct 2023 at 11:22, Uros Bizjak wrote: > > > > Please note that besides propagation of the addition into address, the > > patch also exposes memory load to the compiler, with the anticipation > > that the compiler CSEs the load from this_cpu_off from eventual > > multiple addresses. For this to work, we have to get rid of the asms. > > I actually checked that the inline asm gets combined, the same way the > this_cpu_read_stable cases do (which we use for 'current'). Yes, but does it CSE the load from multiple addresses? Uros.