Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp1182809rdb; Wed, 1 Nov 2023 13:53:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH58x9bprqd+9VH8UeQErnuUQAw+U4/JjfoKdaUGe8YwGIv0B4QT0lB/+COMb3svaGOXb2O X-Received: by 2002:a17:90b:4d83:b0:280:99ca:1611 with SMTP id oj3-20020a17090b4d8300b0028099ca1611mr5228629pjb.20.1698872039067; Wed, 01 Nov 2023 13:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698872039; cv=none; d=google.com; s=arc-20160816; b=vwpgwElY7bvj4st+xcl5gAa+phZy8uDUcGCf3U2ctzJTUqMWACOoOfU6TRZFLqebpK BrwJuPkvoYUO2EPZ+4ZBSIz5XGUAZ3c6rNz4cZtppbE5+6ndlPX9thZ3NS1fu4NhUmSa GBbnfZO+mymO7g8leNeeYHuOWguu9G8ceLea2jxWxnCCXk7fwlg59MXd6AHRmrtXzz97 p9OR96PtyhFTMKKcCJG23ONS9DnBN8y//vrCn7IaV8RdVmcQ292gB4wizAs/eTC9nJ7h alKUZ4xSpfT2M4PEHhr7XnNuzLweCWSK/iv6uvYaLQmyvseSE9G8ly5S07mJ0rwzvcC5 6fNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Jr2IJpvzSamsXOQ8lXfBIM0+s8U3QePROmwmeYAD9Dw=; fh=qRBz2xQ1ALmKKIihboMjLUFc3T7HajVDEgDj1H01Zbs=; b=QkmJ97aGIXxibupJT4S6iefOfDUZCiNcf0k66/m4hX+Pdt4cYoXPwZtHz45WVN6hOG BrGOyMuPe7Gs2fsayVbzdqpdm+3knt33W31XkbJX94L3uTlngUujtShH2hL58t/qWZQk wv2NE50KkINNjQIQqAzzfbPQ25yIL3uqs8fLVnIdY/6fJFYboiesrRMdZpR3XafSRAHF mHG2CfRT5LAt6A9kk2ou1c8e2icO9l2oLd9CUznz6b2P1fNYwd6pgdCFWdY+1oPmE46R ow/5q1L1Eq8DYaBnaBiHvlWGlxwTBUlLV6csuBwtjBquoizE3B4JshC/8DTqlVdP4feJ 8dZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=R83lvkNs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id fr5-20020a17090ae2c500b0026821262c7csi1552904pjb.116.2023.11.01.13.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 13:53:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=R83lvkNs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 144D280BFEC1; Wed, 1 Nov 2023 13:53:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234967AbjKAUxS (ORCPT + 99 others); Wed, 1 Nov 2023 16:53:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234379AbjKAUxR (ORCPT ); Wed, 1 Nov 2023 16:53:17 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D01A710C; Wed, 1 Nov 2023 13:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Jr2IJpvzSamsXOQ8lXfBIM0+s8U3QePROmwmeYAD9Dw=; b=R83lvkNsHjCS4TcowK1Z86ucXU Es2gZG7fPpHuheWWpyon0W6eTYz92No6azsuQYBlel6aV+jF5sEu5LNO6xd3YGmzwypI5+ivIZc1i ZrINsBcOqffaqFC2fm8WMegcuIhciB/vhhp/sRF/zQjBDTljM7zfoDMMm2lhfwMq5nCrGTNx3aBav YS07/glanU8rebq7o/MwiegxK+pGs5LYWtNhfIO81GKl7V2sjRQZCvkIMaV0eRr/J19/4uxFxylQ3 b0hl/+wBFJwAU3IXS0MbZ9UuoxOX0h44Qk5y9VL3nDbvpM1ShceZN6NNzkkxNrECzE7Rv9/O/3b3z zBDYF9PA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qyICc-009QIJ-0g; Wed, 01 Nov 2023 20:52:38 +0000 Date: Wed, 1 Nov 2023 20:52:38 +0000 From: Al Viro To: Oleg Nesterov Cc: David Howells , Marc Dionne , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , 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: <20231101205238.GI1957730@ZenIV> References: <20231027095842.GA30868@redhat.com> <1952182.1698853516@warthog.procyon.org.uk> <20231101202302.GB32034@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231101202302.GB32034@redhat.com> Sender: Al Viro X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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]); Wed, 01 Nov 2023 13:53:31 -0700 (PDT) On Wed, Nov 01, 2023 at 09:23:03PM +0100, Oleg Nesterov wrote: > Yes this is confusing. Again, even the documentation is wrong! That is why > I am trying to remove the misuse of read_seqbegin_or_lock(), then I am going > to change the semantics of need_seqretry() to enforce the locking on the 2nd > pass. What for? Sure, documentation needs to be fixed, but *not* in direction you suggested in that patch. Why would you want to force that "switch to locked on the second pass" policy on every possible caller?