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 38AFEC52D7B for ; Tue, 13 Aug 2024 20:24:57 +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=cKzROu2rsXWjPByX6omphwInN7w+SBFfbeXY9ytsO0U=; b=D62rwoYsM42ibS2DyEIVH6U36x jTrKmjJrppcg3AW0jGQOqhrp+JjfmWoHXcV+0UQPpNVCflvvBwlj1S77Imn7zpzOjHNLf4sgwKfnj bJJ0lMZ1eVE/AOWFXD1eiBpHEQsyQSBHY8BYSR8j9h7sQi0C82f88xPe5v6hZlJqAyVQoiTqlvz5c W+ZaOhwBaOyIH948NIoRNNlvIs4H0aj8S1DvID83YIB8SYdWqrBlHpJdXBoQBcvcS4zsQuzwETv4j kdWKpubYK4MMJN0h62LgvMH57RbYYwi1h+KshE/oj6iB7/fwmr8LEVHxO+Xa4ItiX4fu1so3lAJ7A 9ZYQJF0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdy4S-00000004rzk-1DFw; Tue, 13 Aug 2024 20:24:44 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdy3o-00000004rsC-1m3W for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 20:24:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723580643; 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=cKzROu2rsXWjPByX6omphwInN7w+SBFfbeXY9ytsO0U=; b=CcAg8nMoy2FL0bDN+4VH2kRgdQx49J4AnNef+wyglEEHG2AuWLRzH1svDGnLYdSBEFZ8/Q iHqHHOfUxd5hffjYtO3PHj+MIqMeeAYSk89mItXDmN8ferq6ab7AlNbuUT4mcMSMX/IIkT awBMj4frdveNgeQeN8LgSL7GGI0YU8U= 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-211-8CRdScAAO8SUR37vuXI5pg-1; Tue, 13 Aug 2024 16:23:59 -0400 X-MC-Unique: 8CRdScAAO8SUR37vuXI5pg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 6FC011956080; Tue, 13 Aug 2024 20:23:57 +0000 (UTC) Received: from [10.2.16.208] (unknown [10.2.16.208]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4C07F19560AA; Tue, 13 Aug 2024 20:23:54 +0000 (UTC) Message-ID: Date: Tue, 13 Aug 2024 16:23:54 -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> <5d54a189-3c2b-440a-9626-4e00e95a7f77@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.12 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_132406_493657_BE361B4A X-CRM114-Status: GOOD ( 15.92 ) 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 16:01, Linus Torvalds wrote: > On Tue, 13 Aug 2024 at 12:58, Waiman Long wrote: >> 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. > I think that if an arch says it has native acquire/release, we should > basically assume that it's the better model. > > I mean, we could certainly use "PREFERS" instead of "HAS", but is > there any real reason to do that? > > Do we suddenly expect that people would make a CPU that has native > acquire/release, and it would somehow then prefer a full read barrier? ARCH_HAS_ACQUIRE_RELEASE is fine, but the help text for this Kconfig option should clarify this preference as both the ARCH_HAS_ACQUIRE_RELEASE and the !ARCH_HAS_ACQUIRE_RELEASE code are valid. Cheers, Longman