Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21153994rwd; Thu, 29 Jun 2023 11:43:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlFnh3KY0PlGAdi9g/Zco7mn9DNRNF9muF1+7v28QZ0PvitdUbGT4LQDeJh8WN6/OAV7cqf7 X-Received: by 2002:a05:6a00:134c:b0:668:7fb2:d9a5 with SMTP id k12-20020a056a00134c00b006687fb2d9a5mr822225pfu.17.1688064225453; Thu, 29 Jun 2023 11:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688064225; cv=none; d=google.com; s=arc-20160816; b=IADU0LFLLM9WfbgYfwHe1SvKmIljuswMsHWeBenQCOYVz/CgOfmHn1yNJrsy4Qy045 xv2SW1Fp0+AT7aHna+/De8+wZv7mn8EM2xxABLiPoDej1SwttCbtWwsUuEhSi/DHpGKI MEryfm8G0WYsy/PBSrf8C1yAjB5NENN50J3DvQIEXSyi2o6fXt8UxO1/VPfPCLsWVkZS TBLWGdkjz+XaZt6Uv2gHaC8nfjrtZJhXPDGCKiMHFQfEWCqqgCANr7CUgS/uM59fBJG+ epNFbyIj3bPdYX0BSiRWrPXLzdMa9g/34FamyPF+ByV7GFkXFhaiD6RCz6ch+CJCZHqe JoGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=jWtdIF0hy6uWNbQrKc8aZnAEg3xjhsV7uqqdb8Gu6T8=; fh=An0MVVPXmcTJNFrRZLpT7ZfNQmt2AI9hBye10HEz75U=; b=J0jVFnQJTM6Djgx23L6/+wp+w5P0rUwwFCbar4YWs7AU9rhPACTYHCVGSGftdyl/nf WMPn3J2qGRPNlUgpZaPzF90qPQVfnT0bkekYTd+W3ILdDm0eEbPWHm8qsOfS7NbDEeke Egc0QkbM+UA9auL2Q+H5Ed0/IjTDJZP37sGS7jZSzPMECLjSWr2XTg7diHPyKfQdj+fP zM7krqUC2hgIR7iDw6sbkvT4E9E+MQEoeYujtDB503adB/hI2q07uPrsjLqA1CgfhfoA ZQqbu7APpUBgFDTyhFazyDNEJouGkgzQgqTjKHfgvtENF0wuNPPcozaO9L1azG/zTruO /+Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aQFdffpI; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x19-20020a056a00189300b00681930af5a0si2661775pfh.23.2023.06.29.11.43.31; Thu, 29 Jun 2023 11:43:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@kernel.org header.s=k20201202 header.b=aQFdffpI; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232170AbjF2Sn0 (ORCPT + 99 others); Thu, 29 Jun 2023 14:43:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232560AbjF2SnY (ORCPT ); Thu, 29 Jun 2023 14:43:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 509A42693 for ; Thu, 29 Jun 2023 11:43:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 76DB3615E7 for ; Thu, 29 Jun 2023 18:43:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76951C433C8; Thu, 29 Jun 2023 18:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688064197; bh=vtiAWFYHkHtGebTnExQNuYeQk9SYGLwLglMdhcaK9ZM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=aQFdffpIsoCrOg5znro2aPU30UMcRoTrYLD4loS3+uKHQEkbO+MqpjQICbHmmEFqv 2njYhoev6GoHLV/+2f2i9g2KS2VfPBeCQw45PWtvJzfjb3UVE+/GSp+bVdLWVg95LL 6zeHNuvgtCAbE3hF9z5B9rmOBGtnja5wIQBBGJ8Kdc1czI/GhE9WF8/x/LAPtdyx3E E8SFpZrQU1qAbwFNlSZtADWKSwbErKxCfrJ/GRGO7uxPGzIaWlxdRqe3Ft3kgLKZvN CRAOlhG6HM5JFSwV13HEN7qDNjihhjD3cPa9OrHAU5jC8k5vJ93OqRjQHjFlWF894K alXlnpfcAWNBw== Subject: [PATCH RFC 8/8] SUNRPC: Don't disable BH's when taking sp_lock From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Chuck Lever , lorenzo@kernel.org, neilb@suse.de, jlayton@redhat.com, david@fromorbit.com Date: Thu, 29 Jun 2023 14:43:16 -0400 Message-ID: <168806419648.1034990.7540913098847778540.stgit@morisot.1015granger.net> In-Reply-To: <168806401782.1034990.9686296943273298604.stgit@morisot.1015granger.net> References: <168806401782.1034990.9686296943273298604.stgit@morisot.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-nfs@vger.kernel.org From: Chuck Lever Consumers of sp_lock now all run in process context. Signed-off-by: Chuck Lever --- net/sunrpc/svc_xprt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index e22f1432aabb..6a56cd202148 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -472,9 +472,9 @@ void svc_xprt_enqueue(struct svc_xprt *xprt) pool = svc_pool_for_cpu(xprt->xpt_server); percpu_counter_inc(&pool->sp_sockets_queued); - spin_lock_bh(&pool->sp_lock); + spin_lock(&pool->sp_lock); list_add_tail(&xprt->xpt_ready, &pool->sp_sockets); - spin_unlock_bh(&pool->sp_lock); + spin_unlock(&pool->sp_lock); rqstp = svc_pool_wake_idle_thread(xprt->xpt_server, pool); if (!rqstp) { @@ -496,14 +496,14 @@ static struct svc_xprt *svc_xprt_dequeue(struct svc_pool *pool) if (list_empty(&pool->sp_sockets)) goto out; - spin_lock_bh(&pool->sp_lock); + spin_lock(&pool->sp_lock); if (likely(!list_empty(&pool->sp_sockets))) { xprt = list_first_entry(&pool->sp_sockets, struct svc_xprt, xpt_ready); list_del_init(&xprt->xpt_ready); svc_xprt_get(xprt); } - spin_unlock_bh(&pool->sp_lock); + spin_unlock(&pool->sp_lock); out: return xprt; } @@ -1129,15 +1129,15 @@ static struct svc_xprt *svc_dequeue_net(struct svc_serv *serv, struct net *net) for (i = 0; i < serv->sv_nrpools; i++) { pool = &serv->sv_pools[i]; - spin_lock_bh(&pool->sp_lock); + spin_lock(&pool->sp_lock); list_for_each_entry_safe(xprt, tmp, &pool->sp_sockets, xpt_ready) { if (xprt->xpt_net != net) continue; list_del_init(&xprt->xpt_ready); - spin_unlock_bh(&pool->sp_lock); + spin_unlock(&pool->sp_lock); return xprt; } - spin_unlock_bh(&pool->sp_lock); + spin_unlock(&pool->sp_lock); } return NULL; }