From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EBF6EC52D7B for ; Tue, 13 Aug 2024 19:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yLCM8/C9gTPKJe0A6J9d70v78GMU1T9JDD/hkFZE3ks=; b=LZOMaP1TSuuFW3L9e842OGbdQM GpkDCaMLUdI3ab66O5tfke8rXT7ofCkL5nGDP2MZSUjYB3PtaIcpe0IHfy942pTh627OtOas1+U6U TR5GwQ/yoWItTifD5HOmkI7JlaW/a7MkWeo5gMOihjmL1yFUjHNvBE79dMJ1bhReUNmiJX7ZGTV0h EZd6i/5DOdp9272QOrZ0MQ/fAb5hGG+sc5dm3uQ2/2g0T2Kc0Lk3qP8rvWR83xPya64Cq2t4q3wPA LFAIIeG7xVr0kCLIdkxlFshuTknY/2sqRaiQ18TuwazrXCdzAFvH8DfOTtlTnAcUKmtAc12EyW2NV xtyLBXAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdxfm-00000004oUS-3hcG; Tue, 13 Aug 2024 19:59:14 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdxf9-00000004oOK-3i2c for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 19:58:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723579114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yLCM8/C9gTPKJe0A6J9d70v78GMU1T9JDD/hkFZE3ks=; b=GokDpdMek4nygm0l/3EYn47Kf12NOIArSSvNDAdIm0xmd02TqjnNgINfUduRshtsFS3DKf V3SEk5/ZqbEhlTTdyUBgaSrEES2ar5xfR5DXtWKjbzIYM1feoV3piDJT3n+odYgz9cKML9 yt36CkF7PZ3uxXCtMG2A+Qp7uRi9xJk= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-574-OsHI6CCuNPyyjZErEFIVZw-1; Tue, 13 Aug 2024 15:58:32 -0400 X-MC-Unique: OsHI6CCuNPyyjZErEFIVZw-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0D4A41956080; Tue, 13 Aug 2024 19:58:31 +0000 (UTC) Received: from [10.2.16.208] (unknown [10.2.16.208]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9D93819560AA; Tue, 13 Aug 2024 19:58:28 +0000 (UTC) Message-ID: <5d54a189-3c2b-440a-9626-4e00e95a7f77@redhat.com> Date: Tue, 13 Aug 2024 15:58:27 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC] Avoid memory barrier in read_seqcount() through load acquire To: Linus Torvalds Cc: cl@gentwo.org, Catalin Marinas , Will Deacon , Peter Zijlstra , Ingo Molnar , Boqun Feng , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240813-seq_optimize-v1-1-84d57182e6a7@gentwo.org> <183ee6fa-1d42-4a01-8446-4f20942680d2@redhat.com> Content-Language: en-US From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_125836_025105_2B79A347 X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 8/13/24 15:48, Linus Torvalds wrote: > On Tue, 13 Aug 2024 at 12:01, Waiman Long wrote: >> Do we need a new ARCH flag? > I'm confused by that question. > > That's clearly exactly what that ARCH_HAS_ACQUIRE_RELEASE is. > > Obviously all architectures "have" it - in the sense that we always > have access to a "smp_load_acquire()/smp_store_release()". Sorry for the confusion. What you said above is actually the reason that I ask this question. In the same way, smp_rmb()/wmb() is available for all arches. I am actually asking if it should be a flag that indicates the arch's preference to use acquire/release over rmb/wmb. Cheers, Longman > > But if the architecture doesn't support it natively, the old rmb/wmb > model may be preferred. > > Although maybe we're at the point where we don't even care about that. > > Linus >