Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C43A7C64EC7 for ; Wed, 1 Mar 2023 01:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbjCABHd (ORCPT ); Tue, 28 Feb 2023 20:07:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjCABHb (ORCPT ); Tue, 28 Feb 2023 20:07:31 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D86902ED76 for ; Tue, 28 Feb 2023 17:07:30 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id d30so47636237eda.4 for ; Tue, 28 Feb 2023 17:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1677632849; 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=GA/g+K3G8Gm+uzhNLjPprz2bSCPjjGvaQ1drgLyoaRU=; b=fdIxUEH4d/wjWWPjRtPs6wIlWomZnPOlNx28xq//Fshqp32lkdwSTb4JgmwaMLuMf3 hP7y3+Z8QxMW9i/e98/hxeVrq2XyP0mQX04tmQNaR2e+LmhAGpgY8hm7+kXwZFDSoyUO q9943JQowyb/DcTe/lafIMcVEKxImy49FhyAQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677632849; 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=GA/g+K3G8Gm+uzhNLjPprz2bSCPjjGvaQ1drgLyoaRU=; b=3oA2jLZ/eaHqhZcf83lv1wAk+AR50OQTjqfJ9DTHW87p7Gokz1Br+dejApzus9dP9E +fvliE1xFFN8lNANQgwwwlH27l/nsC3vLzu4Y1uFkqivIWwYqMXsaBpVRDLjLem9okm9 8OY7x8+uolgA0cFFSANApApWKgLal++SWWnL1Y02na6V4MKMFw9Oe9+oi0fE7680vCr7 qnDqtLeuo3lZYe9yY75QNckPKrWA11683we8YCDN1FZv8Oc1mtDJu4P7+gMtnxBuZq6+ 0HnxcYtBg8Q3zlru+AXoKlqC29Mhr7pSs4+aePSwMG5uZRh4fjgG4mPSU/CL6kIa1nSd 8HPw== X-Gm-Message-State: AO0yUKVpK60SzNQAjIul2OROTJ+01ztsahMEqK/kN50uR+OFb5Vf4mm4 LZVOpWgkbJFrRWYRuibEhOKGwuG/difYYOyi5ME= X-Google-Smtp-Source: AK7set+/Fg1tLHlBHt46wMIUk9ar5VF5mAzQgMeCMnRFxuXDUTxzKr0bBNY4VRDwpFOr9cwunxeCeQ== X-Received: by 2002:aa7:cc0e:0:b0:4ab:4d3c:7e99 with SMTP id q14-20020aa7cc0e000000b004ab4d3c7e99mr4672243edt.2.1677632848577; Tue, 28 Feb 2023 17:07:28 -0800 (PST) Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com. [209.85.208.51]) by smtp.gmail.com with ESMTPSA id h6-20020a170906854600b008d4df095034sm5166174ejy.195.2023.02.28.17.07.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Feb 2023 17:07:28 -0800 (PST) Received: by mail-ed1-f51.google.com with SMTP id eg37so47436986edb.12 for ; Tue, 28 Feb 2023 17:07:28 -0800 (PST) X-Received: by 2002:a17:906:c08c:b0:8f1:4cc5:f14c with SMTP id f12-20020a170906c08c00b008f14cc5f14cmr2345984ejz.0.1677632847945; Tue, 28 Feb 2023 17:07:27 -0800 (PST) MIME-Version: 1.0 References: <20230228132118.978145284@linutronix.de> <20230228132910.991359171@linutronix.de> In-Reply-To: From: Linus Torvalds Date: Tue, 28 Feb 2023 17:07:11 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 2/3] atomics: Provide rcuref - scalable reference counting To: Thomas Gleixner Cc: LKML , x86@kernel.org, Wangyang Guo , Arjan Van De Ven , Will Deacon , Peter Zijlstra , Boqun Feng , Mark Rutland , Marc Zyngier , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 28, 2023 at 4:42=E2=80=AFPM Linus Torvalds wrote: > > And yes, that may mean that it should have some architecture-specific > code (with fallback defaults for the generic case). Another reason for architecture-specific code is that anybody who doesn't have atomics and just relies on an LL/SC model is actually better of *not* having any of this complexity. In fact, the Intel RAO instruction set would likely do that on x86 too. With that alleged future "CMPccXADD", there likely is no longer any advantage to this model of rcuref. Now, I don't know when - if ever - said RAO instruction set extension comes, but I'd hope that the new scalable reference counting would be ready for it. Linus