From: Chuck Lever III <chuck.lever@oracle.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <cel@kernel.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 3/4] SUNRPC: Improve observability in svc_tcp_accept()
Date: Mon, 15 May 2023 17:07:21 +0000 [thread overview]
Message-ID: <C6F66E2A-9FA3-4F5C-BA45-300B56CC0ADE@oracle.com> (raw)
In-Reply-To: <13c6a090134e64ce4961c322681a941399268cb9.camel@kernel.org>
> On May 15, 2023, at 12:54 PM, Jeff Layton <jlayton@kernel.org> wrote:
>
> 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?
I looked at doing that.
svcsock_accept_err is in a declared class. I would need to
split that into two trace events, one CONDITIONAL and the
other not. svc_tcp_accept() is not a hot path, so it really
isn't worth a whole lot of churn.
Let me know if there's some benefit aside from a bit of
code cleanliness that I forgot.
>> return NULL;
>> }
>> set_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags);
>>
>>
>
> --
> Jeff Layton <jlayton@kernel.org>
--
Chuck Lever
next prev parent reply other threads:[~2023-05-15 17:10 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
2023-05-15 17:07 ` Chuck Lever III [this message]
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=C6F66E2A-9FA3-4F5C-BA45-300B56CC0ADE@oracle.com \
--to=chuck.lever@oracle.com \
--cc=cel@kernel.org \
--cc=jlayton@kernel.org \
--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