Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, linux-nfs@vger.kernel.org
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH 3/4] SUNRPC: Improve observability in svc_tcp_accept()
Date: Mon, 15 May 2023 12:54:39 -0400	[thread overview]
Message-ID: <13c6a090134e64ce4961c322681a941399268cb9.camel@kernel.org> (raw)
In-Reply-To: <168415757392.9504.14836685251349712202.stgit@manet.1015granger.net>

On Mon, 2023-05-15 at 09:32 -0400, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> 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 <chuck.lever@oracle.com>
> ---
>  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);

Would this be better done as a TP_CONDITION tracepoint?

>  		return NULL;
>  	}
>  	set_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags);
> 
> 

-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2023-05-15 16:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 13:32 [PATCH 0/4] Socket creation observability Chuck Lever
2023-05-15 13:32 ` [PATCH 1/4] SUNRPC: Fix an incorrect comment Chuck Lever
2023-05-15 13:32 ` [PATCH 2/4] SUNRPC: Remove dprintk() in svc_handle_xprt() Chuck Lever
2023-05-15 13:32 ` [PATCH 3/4] SUNRPC: Improve observability in svc_tcp_accept() Chuck Lever
2023-05-15 16:54   ` Jeff Layton [this message]
2023-05-15 17:07     ` Chuck Lever III
2023-05-15 13:33 ` [PATCH 4/4] SUNRPC: Trace struct svc_sock lifetime events Chuck Lever
2023-05-15 16:56 ` [PATCH 0/4] Socket creation observability Jeff Layton
2023-05-15 18:10   ` Chuck Lever III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13c6a090134e64ce4961c322681a941399268cb9.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox