Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3061847rwb; Wed, 30 Nov 2022 14:58:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Og/6EKpoDfghfDQ4GO5kYEDu0QfFpgaNFUcA+A1eJDccnvlEovFVd0seeFYtj43WXWKYo X-Received: by 2002:aa7:8709:0:b0:572:2189:84ef with SMTP id b9-20020aa78709000000b00572218984efmr44415752pfo.28.1669849129934; Wed, 30 Nov 2022 14:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669849129; cv=none; d=google.com; s=arc-20160816; b=MGzYA2PczTlEBBlsb7TkqzkNHQ+dq8tn6/PP9MEnv8RDzv4G6EX1okWsZw+AIEMynD 77JOpK4ONJZZ2rYNB3kWhm+u1oFZOKn9js3gwW7OXH+A3Bpv3nReFTKZoVabRwAORGKj HfKtF6KKhwof3+SsOJG13YWn5NNno5gTw4H1gDHm7SPza9TNs1AbmLgxGNnib5WGpqg3 T7pdzi1HNk/AxZPdDd8RDD3FvjRIre0Ce7Bg0TJa8jgV06LNa141hBqTeHjfAd/TMMr4 59TOJWeJJLwmC/QAXx6bRP4nMZozjYnNOD3wM6bK/f+jllWskicqtX9icgwCtAkUxYSe Hp2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QZD29PB1DDnmxaZlq47fhYeHRcAqoUfi3bc/ZNgB9gU=; b=SV99myhthrvo2hT5bdtJhTS3eo0qSCEjsGsRS6QX4Cfor8COWmOh5MQFqGj7eppba6 QzXt/acFkSmbz9/FLhvP7FWzTmqPa3lWNeD82cqR+GpeaPh8jm/wruPuiF1Fk15Ryibj mjryT+61hpMty8WplDnqsMUSbNp5USXxm+sA+eVTfVqDGwxGtjc/u2OydBSKVQO1Nl4Z w7gVKbOEOWiQi/5OZHNqNAsxOJebnCwgrxO6JsUvKS1i6SvGq/YEj2ESPgRtT1lL/efx th3rcm5+NenjfbeRIOS+JskP/49wqXlxTrJnOSvUk4ypfA+p3g1ONI+IdeL7M+3FPiX+ EIJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=omJRN5aY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 73-20020a63034c000000b00478446557b9si2465177pgd.677.2022.11.30.14.58.38; Wed, 30 Nov 2022 14:58:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=omJRN5aY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbiK3WsB (ORCPT + 83 others); Wed, 30 Nov 2022 17:48:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbiK3Wr7 (ORCPT ); Wed, 30 Nov 2022 17:47:59 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C02A1AD92 for ; Wed, 30 Nov 2022 14:47:58 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id gu23so66463ejb.10 for ; Wed, 30 Nov 2022 14:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=QZD29PB1DDnmxaZlq47fhYeHRcAqoUfi3bc/ZNgB9gU=; b=omJRN5aYV43lsSLL/yIGbBrYHdeY5lcQwNAbaYZOIuJbZ1auvK/sIXPiVt/1MzRpUR X89Jvizn78r4Q0w0g2NpVVxk7uaR40j8uv6ukZFpiwji9kVcArT0yeAhGP1MpyI3j+Vc 07Uy/Qr7sKaft4E+L+OHOB2/t5OvAyLwaBmKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QZD29PB1DDnmxaZlq47fhYeHRcAqoUfi3bc/ZNgB9gU=; b=cpjlN+mG/oUSh2HawOsdnZMsvoyGgq0raf95ZjXb4htb+HwSs0BGZhnCihAdZ2eVPB cSE+mBZg6KcPTOL5PKjBGZSbTmkaZQqCJjLcoOqcWGYPzrfD40ozZ+ehEMtRjGwfN/VT iIpv2uunvIkaCPtnsaxqhPucUSeHnAGwjftx4bD+ie6S919N0EEABGvx9fgV1ZKTF/zI xDJ4TyO7XJ0xoEnf7Em1hK218tj5qp6nJ2ol6o+vVrAHC5uo/DSce9Fgq3riGUJTK8iw 7a0JD1J16Rn7zfZYA0xlqDIyrQrWs7KwMPnQdA3Ds31MT5TOnbdnqCbvJTgh1yFBquv+ 73Rg== X-Gm-Message-State: ANoB5plXcrSx8RtpUUYtNiADlkmCLi9nLaRSK9pSm9MjGVhKRe8WDFf1 W/Bap2vqIDevLoz7c//LUNo6bVtrepRa1UmvACFdDg== X-Received: by 2002:a17:906:fcd0:b0:7ad:b8c0:3057 with SMTP id qx16-20020a170906fcd000b007adb8c03057mr54317182ejb.440.1669848476743; Wed, 30 Nov 2022 14:47:56 -0800 (PST) MIME-Version: 1.0 References: <20221130181316.GA1012431@paulmck-ThinkPad-P17-Gen-1> <20221130181325.1012760-14-paulmck@kernel.org> <639433.1669835344@warthog.procyon.org.uk> In-Reply-To: <639433.1669835344@warthog.procyon.org.uk> From: Joel Fernandes Date: Wed, 30 Nov 2022 22:47:41 +0000 Message-ID: Subject: Re: [PATCH rcu 14/16] rxrpc: Use call_rcu_hurry() instead of call_rcu() To: David Howells Cc: "Paul E. McKenney" , rcu@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, Marc Dionne , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-afs@lists.infradead.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On Wed, Nov 30, 2022 at 7:09 PM David Howells wrote: > > Note that this conflicts with my patch: > > rxrpc: Don't hold a ref for connection workqueue > https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?h=rxrpc-next&id=450b00011290660127c2d76f5c5ed264126eb229 > > which should render it unnecessary. It's a little ahead of yours in the > net-next queue, if that means anything. Could you clarify why it is unnecessary? After your patch, you are still doing a wake up in your call_rcu() callback: - ASSERTCMP(refcount_read(&conn->ref), ==, 0); + if (atomic_dec_and_test(&rxnet->nr_conns)) + wake_up_var(&rxnet->nr_conns); +} Are you saying the code can now tolerate delays? What if the RCU callback is invoked after arbitrarily long delays making the sleeping process to wait? If you agree, you can convert the call_rcu() to call_rcu_hurry() in your patch itself. Would you be willing to do that? If not, that's totally OK and I can send a patch later once yours is in (after further testing). Thanks, - Joel