Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3341369rdb; Thu, 16 Nov 2023 07:08:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGj2vqZ/M5M4GD3JlYM0fk5VLQha/9Zcb1UV6SrMSu0COt1TTNiSOKjLDZyiu0pT4QMO2wi X-Received: by 2002:a05:6a20:4281:b0:187:4118:140 with SMTP id o1-20020a056a20428100b0018741180140mr2415049pzj.24.1700147311322; Thu, 16 Nov 2023 07:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700147311; cv=none; d=google.com; s=arc-20160816; b=FQalHso9DcXRoDaNoS8AQOv9zkxemI4+BB4NNXRzumRSg5+VxW4z9N62gfZE4m2ndf PDPuReipsWgzB0fxPrONYptZAu3b22cqS5Nl4QUUqPwUhmkpz+BId6OftBZwcdl9IZnD 3JBq1/qwaZUoSiEn8cSG0Sw28Z2EN12xBVwYE1M9aAr7MgPH8ZQWa6pm+780vjcSK6QA QQ0g57e+Jqaw9GYbB1re8lO67+Fgxce8Shd6h0Ap+ozwu/1ISIXkpLHgaGyuD9HohRAQ KHNIuDEdgDCaRWNvOQq2c8uTpVO8TguDKwyGG0AbY6Z8oPluCHaUwH2RL7K3fHq+scRa XIGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=K5wxMBvbthLauuE7a3pZ8/SsXV3V5MFqmp1hCTliRys=; fh=D90zwDrWJJyU24uVp8gp+Akedeaevan3w+fCxixPiFs=; b=FFvKEMmWf6KYiUN1S9vhOt6y7Hvryem5cmi4JMFECpPPqVxyPA862WMe5vuWYUkdLy IvH/IlFF3THtQQ9Q6DEKA3FiNHSXvfY/q3Xf+RmEnZzzF5SI0mNmYn8AiLxqTSpQVQay pNjTb28srDTik0/WoCSb0MHOfigPIlOAzhDS9NVBd5NL0YbMheEMU/BZOKwhioGjMDAH Ad3xGFj6wqJvqci6YHsGpEAwuR9TBoKEtyxfwHBHJyYG8BzmQHIpqu8rWXluS1nVS3pc FbZvTBnWQbB1Vng9i00j8mIGEImspocVe+AEw1q2o0sugsc2hMVV1K+jX51VFQ4OGFru rIPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ZvH+GTJ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f7-20020a63e307000000b005ac9ae1aaa6si12736003pgh.334.2023.11.16.07.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 07:08:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ZvH+GTJ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 946C1802AFD1; Thu, 16 Nov 2023 07:08:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345385AbjKPPIH (ORCPT + 99 others); Thu, 16 Nov 2023 10:08:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345330AbjKPPIF (ORCPT ); Thu, 16 Nov 2023 10:08:05 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6018EA9 for ; Thu, 16 Nov 2023 07:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700147280; 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=K5wxMBvbthLauuE7a3pZ8/SsXV3V5MFqmp1hCTliRys=; b=ZvH+GTJ/3Y+UcEJ8msVw5iMxTrbZRuSmkLAqN0Pf5u8hngBoXgD9Bv1TS4ZSIZwOMRBkgt CpmYidXCWkHqRFIUPweI9yUEIEg2HIqgK93gvIFl4cvDviAic5scLuVbKl+biR454Yf8me YwMxw+U2EEzt+aqpXctGbJSMGD4Tbt4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-626-zChOR5FXNHK8oL95YJQJSg-1; Thu, 16 Nov 2023 10:07:58 -0500 X-MC-Unique: zChOR5FXNHK8oL95YJQJSg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 43A278007B3; Thu, 16 Nov 2023 15:07:57 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.226.23]) by smtp.corp.redhat.com (Postfix) with SMTP id AF40540C6EBB; Thu, 16 Nov 2023 15:07:54 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 16 Nov 2023 16:06:53 +0100 (CET) Date: Thu, 16 Nov 2023 16:06:50 +0100 From: Oleg Nesterov To: David Howells Cc: 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() Message-ID: <20231116150650.GF18748@redhat.com> References: <20231116141951.GE18748@redhat.com> <20231116131849.GA27763@redhat.com> <20231027095842.GA30868@redhat.com> <104932.1700142106@warthog.procyon.org.uk> <112162.1700146930@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <112162.1700146930@warthog.procyon.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 07:08:16 -0800 (PST) On 11/16, David Howells wrote: > > Oleg Nesterov wrote: > > > > > - 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. > > > > OK, then how about the patch below? > > That seems to work. OK, I'll send V2 tomorrow. Should I change fs/afs the same way? Oleg.