Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2045917rwd; Mon, 15 May 2023 06:39:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6q0rCmmrGAzjAxqUpae1yaIjFZ9xrYFLR7BKWVhdCN2GloBmdRxa4+DzRAZGtURetSNxlh X-Received: by 2002:a05:6a20:394b:b0:101:1b94:31c1 with SMTP id r11-20020a056a20394b00b001011b9431c1mr32908220pzg.42.1684157970181; Mon, 15 May 2023 06:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684157970; cv=none; d=google.com; s=arc-20160816; b=eH+StXnlHMsscXX0kS2Gy8M6uO8srZLBqLQXS7rZc0Ha2EZ5rdrCv7ThZyBRXkwEgb kiZitG3PHHrpniWADDDNTNgaOuiDgV1DvVKXgA+DWHQHl1enwMxdulqpiJVpfKEZIeBG KHmPsloWVw2VAg8DdhD+CHnduvb2mAUQMYvSi0lvkFwwJPzd627Em7kKfPrMKR0boZsC HD9JsO8ZH+Bhtd5G2MT5xehb2J8NMI+nzlUUfeJbbpBAznj7qlKijIs9rAD/LNVokAt5 VIqFRO+0hZ6KMltAL8D5BOWo1aFpNPhIYWEjr+CwmrUNih3xr2VCSEVll/ym8v5F+9r0 XTCQ== 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=ihLqxPncJLMBbFg/rHCjbTWjGFEbmQ9amZgYjjKIgno=; b=ovcgO+Tu+eJ9HB6skA36dKUihLjzzP66ry1+dHOS7canmj3LMjjLK/N6PbRO8xMNVU GjqXgB/xza636lyF6lv0HTCh8v4eUT/f6D0i52Q6GgFURfIlJ9GPBfMHznQFQZaXaHZl KNVTEF1hwKnlBoO2mxBx9472v1PzLtnJf08PbkQg9jj/pk0Qy2QpmSvbTIFE1iJ5Dt1Y e0Gvy1GOL6P7KKVOUqToeUiF15GL+1AZU88i1ErA3AaQgtPWvSplXXDBal0gk/mksGiL 6bvfbHdNcWR36NSEJvRRBAX1Z7nSuKlDV0HS0pH0tlkujHJHWEyV/qu74bSp5GdrESHd JhvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GOkOo8hL; 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 k2-20020a63ab42000000b0053079f84a1asi10244342pgp.759.2023.05.15.06.39.15; Mon, 15 May 2023 06:39:30 -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=GOkOo8hL; 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 S240863AbjEONdB (ORCPT + 99 others); Mon, 15 May 2023 09:33:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241913AbjEONc6 (ORCPT ); Mon, 15 May 2023 09:32:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1065119AE for ; Mon, 15 May 2023 06:32:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9FFB4617FB for ; Mon, 15 May 2023 13:32:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCA35C433EF; Mon, 15 May 2023 13:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684157575; bh=Z15hsD/8FFDGUqV7uZIf9TkSoakYKb4C/ksvcrcRi7c=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=GOkOo8hL87xQ+A0NH/WZLTj0ZEpJ81K3UHlzrY4T0FCrBrK8bn0Mlw/u9S7WY/VE+ QJMF7RhsQxzRT7ftNYOy8/mCYGf8Q3q+jGaTD91V9xoLzjof+EuHH5GtidOpHP5QXV zhYHJVrkbHwWOQblhxd1P9Xph6bS/pYZxfZpyi+ZRyWckrskkLCLQXv2sv7YCO7NTc RnqmyaUjczXDg8fJ/Hfn5nlvMGFsrwAYJVmqwsDnpM8pobvCFQ63MMYhqq3Gh0pq3m 9EPQCzsun0NM8SuKnyCp/AbOahEb+RjIW3pVH2MmS56Yr19NN5ZGNVVJg8fWRIonpn Y4Xo6QtV8CTzQ== Subject: [PATCH 3/4] SUNRPC: Improve observability in svc_tcp_accept() From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Chuck Lever Date: Mon, 15 May 2023 09:32:53 -0400 Message-ID: <168415757392.9504.14836685251349712202.stgit@manet.1015granger.net> In-Reply-To: <168415745478.9504.1882537002036193828.stgit@manet.1015granger.net> References: <168415745478.9504.1882537002036193828.stgit@manet.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 The -ENOMEM arm could fire repeatedly if the system runs low on memory, so remove it. Don't bother to trace -EAGAIN error events, since those fire after a listener is created (with no work done) and once again after an accept has been handled successfully (again, with no work done). Signed-off-by: Chuck Lever --- net/sunrpc/svcsock.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index e0fb65e90af2..2058641ab9f6 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -885,13 +885,8 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt) clear_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags); err = kernel_accept(sock, &newsock, O_NONBLOCK); if (err < 0) { - if (err == -ENOMEM) - printk(KERN_WARNING "%s: no more sockets!\n", - serv->sv_name); - else if (err != -EAGAIN) - net_warn_ratelimited("%s: accept failed (err %d)!\n", - serv->sv_name, -err); - trace_svcsock_accept_err(xprt, serv->sv_name, err); + if (err != -EAGAIN) + trace_svcsock_accept_err(xprt, serv->sv_name, err); return NULL; } set_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags);