Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3283092rdb; Thu, 16 Nov 2023 05:42:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPZJoaXG2SyKZrYhHS02LlMqq5dGda22ijLEYdQdhfUA9vXFtbEJFP/uwdhVl1FqnX4y1i X-Received: by 2002:a05:6e02:1bcd:b0:35a:a2d8:e204 with SMTP id x13-20020a056e021bcd00b0035aa2d8e204mr18098945ilv.32.1700142128092; Thu, 16 Nov 2023 05:42:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700142128; cv=none; d=google.com; s=arc-20160816; b=eo0GBuVKkvh81yQYi+3zTa2sx9CRyJVFZWCsgybba/gbkwJJvCs/gkT2LkPsAGKqWS x4M5prhn4V1n8Gp/zGWAEBeLzM8B/kO5vDDjISrPCyuD5Kh6cJSEyuvxWou0BF9PIaO2 rrKBIi+IqLevaTT/ErTX9PGRLDUuNSJjFVwgMPPKxe4X9+2iIQF6bIFR6LSaAk/vJOEi S/u/pixsJ786Z1hMjyud4Lj5bl5NtJoyr1FVYlEEQIpExdCOzOfYVBrTp0lkp4DLpTHp mk7HzSV0Zb2+NSxOBzGuJyIuyaXQ7PhGsTwVXS8XPqilBL8gagLw3xAS3MnRN/iB6q9M IhVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=IxptJPCrY+QSm5n5VLsWoPBouQFJKh6ohstDe/UHPEk=; fh=rTkb05KnUKNdCQbXmvD8YjWSS8HeswaSxV+3+MQ/Me0=; b=cUNhb3cAzEfrWNFAucfyQmryKMyUrWnKEUayhpFXe6dBAoX55KTG2RnEFGO4FRFdG9 Ke51TBdBVtkb+RiePfOG+UYDleIyhdx391cWt4kF3RlyH+08+Ngg9Cak2/H5mIBf1Pax WF7R1QinCmPjKS6wAgYnhvjh19uvhccZXwYkZ1mNNXTC72PuiXAMfzSuc8ku0GW8puL+ ha95nZt1e5C+oVaMM4aReLa0/E5aspcgR3RY9FcxCMLxHOL618vt0qRPh1mmx8Q8caSe YRnKlIHBQu74s6+N1gLi9uK9ICNR8lez910zZBK1reTy+kYZyZe+34C0sMycMu3AGWoo evQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OW4yNKHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id s190-20020a632cc7000000b005bda050625fsi12125572pgs.455.2023.11.16.05.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 05:42:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OW4yNKHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 74B208083DCA; Thu, 16 Nov 2023 05:42:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231168AbjKPNl6 (ORCPT + 99 others); Thu, 16 Nov 2023 08:41:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbjKPNl5 (ORCPT ); Thu, 16 Nov 2023 08:41:57 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6888A0 for ; Thu, 16 Nov 2023 05:41:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700142113; 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: in-reply-to:in-reply-to:references:references; bh=IxptJPCrY+QSm5n5VLsWoPBouQFJKh6ohstDe/UHPEk=; b=OW4yNKHA7etCwlWD6+FoM9U6iDT5s3/JyxfX8jPmSCT5/6GBXHOYjthEXM8D14bmLr9JZF DNNHT/b7wrr+/ZBB3TwiaaCLs8vMMsNu5mGDa4QJIwHa0P49fuDTugzyJczcv407d/rPQR yZo1pmr3wt87lL8IiplrPq3tBm3nhm8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-DSrWWSYgNWKVgZrx_9hZYA-1; Thu, 16 Nov 2023 08:41:50 -0500 X-MC-Unique: DSrWWSYgNWKVgZrx_9hZYA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9AF651C06518; Thu, 16 Nov 2023 13:41:49 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9904910EA1; Thu, 16 Nov 2023 13:41:47 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20231116131849.GA27763@redhat.com> References: <20231116131849.GA27763@redhat.com> <20231027095842.GA30868@redhat.com> To: Oleg Nesterov Cc: dhowells@redhat.com, Marc Dionne , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Al Viro , Chuck Lever , linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rxrpc_find_service_conn_rcu: use read_seqbegin() rather than read_seqbegin_or_lock() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <104931.1700142106.1@warthog.procyon.org.uk> Date: Thu, 16 Nov 2023 13:41:46 +0000 Message-ID: <104932.1700142106@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Thu, 16 Nov 2023 05:42:05 -0800 (PST) Oleg Nesterov wrote: > So do you agree that > > - the usage of read_seqbegin_or_lock/need_seqretry in > this code makes no sense because read_seqlock_excl() > is not possible Not exactly. I think it should take a lock on the second pass. > - this patch doesn't change the current behaviour but > simplifies the code and makes it more clear That is true. David