Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp783210rwd; Thu, 25 May 2023 04:02:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7PkvzC8BtS5I0F8bOHXvyCjUk2j43AFGbypxranpX0Oa7xSJIcMs6S2H1MjRwCJ3IRvjK1 X-Received: by 2002:a05:6a00:812:b0:647:2ce5:57c4 with SMTP id m18-20020a056a00081200b006472ce557c4mr8441326pfk.5.1685012548939; Thu, 25 May 2023 04:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685012548; cv=none; d=google.com; s=arc-20160816; b=JMtNs4t/MudNOQp8KEQGBbeGWgwVK4YCR3EqGmQJbCDyrfrYdsq52ID6kcW0A/mvJL v7K7dKLhy2oB2nFv6F+VSzpdrXNlXMItFZ7wnZbU6DCFKViAOs4D5SS3/ZBzWTHyBkzj gH46UE2hQEi8BgVTXe6hYfbt9jDgUbyi+z5TtXTps9bMESeNRQ8oanWgRELSVLOXcFoP jSmfYLv3Ko8rlei557vkijYPtOtsT/0oSIy7iDQ9lHrXS85fe0JmdV7qAXf0ZSndLqZk e1yYMvYuZTxv/IkW0Id2ghJL4SRQtMbcxnzyWOvgWG0vqt1Lhq0RhhOJ2oNMKeJnJzPi Fbgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=DUFYLgNR0P3iMDujbNPJ6zcWMVF2ZDhcLM/UDfvQ7oE=; b=AaBY0gE62uQzANoScnRKnH42fmSOnq5iSVSIe7FJ+YQS1SieAURLqenslLMFJG7Xh4 zKxPJPB+20SM9JxokFPE2+VySw6ZdTVuzkvrP9iqqytTp6sLkdJUi8Z0qiWOS+qUszXs o2zzKDiRDzHH1IT2oU/z2wn3/jrrC64lFSN1aLmbcbMltaV88CY9J+PElzrA4K5YEvz/ pcrVBKEN5plojdXla5vt4svrVHRMZ5/pEgietFrb8G/kv40yJVAkvCt8MOz0u8Kvc1CL 2Siey73boN7/7gPab4iQVfM4e06zUCKi8fsHAaVh8uiatt3nU56lSuPC6c3mzt8t55Y5 c+sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=MOQIz0md; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=EflHhJQg; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f30-20020a63381e000000b005344b60f7ddsi914879pga.117.2023.05.25.04.01.55; Thu, 25 May 2023 04:02:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=MOQIz0md; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=EflHhJQg; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240712AbjEYKwk (ORCPT + 99 others); Thu, 25 May 2023 06:52:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238970AbjEYKwi (ORCPT ); Thu, 25 May 2023 06:52:38 -0400 Received: from wnew4-smtp.messagingengine.com (wnew4-smtp.messagingengine.com [64.147.123.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB2AB199; Thu, 25 May 2023 03:52:36 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.west.internal (Postfix) with ESMTP id 6FAD52B0681B; Thu, 25 May 2023 06:52:32 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 25 May 2023 06:52:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1685011952; x=1685019152; bh=DU FYLgNR0P3iMDujbNPJ6zcWMVF2ZDhcLM/UDfvQ7oE=; b=MOQIz0mdsCpzsJDpOT 8ymmHxd6/8U/1WrSlAu+26J9rPY+bl/QIyP7HlCrsPmJUlV8qXrewBBWaZM/zPbl Avlzez1zIuARarFB8Q+CSpanGgDvavP3UvS7jOZjuO8BEJC5Skq+WhgsPSE7BYso huvQr31ejgwQADplhhctQIrYZoiYvP65bWrP7Ep2/ENITKCKFjM+ORNVQInWBB/U e1xnq3JiYlOQMGLPzi2Gn4d5fn7nPmSS0o6PhQUi+JS4X88aY797/1dcU900mr0r b8dxJ/azB1vY1PWRzlUrX+dxP0NYO2gi5TQFJt7KPkijRDPkRNSWoC8W0yTowW0l f+Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1685011952; x=1685019152; bh=DUFYLgNR0P3iM DujbNPJ6zcWMVF2ZDhcLM/UDfvQ7oE=; b=EflHhJQg9wl2mG7bcZk8ETaFCFS2e +KCM2ZXWihEVKvLhonnr7dOUeqG2bh5qJx2FysmmLCMzUPG+HlbFcFxvGE9Yt6Rg c1Zq4zh4OEYt+Q71eWIJqiin1aNt49jXbiLQh9SJE62wFNAo911XNBoucik+Gzc8 cspfKUzRXOjWxDMSK7p38IylIxc/LuzE632/sGzGIEm6R1Y34aKYTzNNhuewVS6x mPkAw7cYASaqD4haDeYKF5F8Li1HLZYnk6WFDdHQJiPyYzjJou5z/uFu4KgXX886 wVCJOeYCov0f/WDjAlcaoDUMGPabIC66aH+QqtLdoHG3Q/7JEQQMjfKGQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejjedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id C3EA8B60086; Thu, 25 May 2023 06:52:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-441-ga3ab13cd6d-fm-20230517.001-ga3ab13cd Mime-Version: 1.0 Message-Id: <292934ce-73fa-4077-9051-2ad909828f4a@app.fastmail.com> In-Reply-To: <20230525102946.GE38236@hirez.programming.kicks-ass.net> References: <20230515075659.118447996@infradead.org> <20230515080554.453785148@infradead.org> <20230524093246.GP83892@hirez.programming.kicks-ass.net> <20230525102946.GE38236@hirez.programming.kicks-ass.net> Date: Thu, 25 May 2023 12:52:06 +0200 From: "Arnd Bergmann" To: "Peter Zijlstra" , "Linus Torvalds" Cc: "Jonathan Corbet" , "Will Deacon" , "Boqun Feng" , "Mark Rutland" , "Catalin Marinas" , dennis@kernel.org, "Tejun Heo" , "Christoph Lameter" , "Heiko Carstens" , gor@linux.ibm.com, "Alexander Gordeev" , borntraeger@linux.ibm.com, "Sven Schnelle" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , x86@kernel.org, "H. Peter Anvin" , "Joerg Roedel" , suravee.suthikulpanit@amd.com, "Robin Murphy" , "David Woodhouse" , "Baolu Lu" , "Herbert Xu" , "David S . Miller" , "Pekka Enberg" , "David Rientjes" , "Joonsoo Kim" , "Andrew Morton" , "Vlastimil Babka" , "Roman Gushchin" , "Hyeonggon Yoo" <42.hyeyoo@gmail.com>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, iommu@lists.linux.dev, Linux-Arch , linux-crypto@vger.kernel.org, "Stephen Rothwell" , "Michael Ellerman" Subject: Re: [PATCH v3 08/11] slub: Replace cmpxchg_double() Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-crypto@vger.kernel.org On Thu, May 25, 2023, at 12:29, Peter Zijlstra wrote: > On Wed, May 24, 2023 at 11:32:47AM +0200, Peter Zijlstra wrote: >> On Mon, May 15, 2023 at 09:57:07AM +0200, Peter Zijlstra wrote: > > This then also means I need to look at this_cpu_cmpxchg128 and > this_cpu_cmoxchg64 behaviour when we dont have the CPUID feature. > > Because current verions seem to assume the instruction is present. As far as I could tell when reviewing your series, this_cpu_cmpxchg64() is always available on all architectures. Depending on compile-time feature detection this would be either a native instruction that is guaranteed to work, or the irq-disabled version. On x86, this is handled at runtime with alternative_io(). this_cpu_cmpxchg128() clearly needed the system_has_cmpxchg128() check, same as system_has_cmpxchg_double() today. Arnd