From: Joe Damato <jdamato@fastly.com>
To: Hillf Danton <hdanton@sina.com>
Cc: netdev@vger.kernel.org, edumazet@google.com, willy@infradead.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, mkarsten@uwaterloo.ca,
sridhar.samudrala@intel.com
Subject: Re: [PATCH net-next v4 5/7] eventpoll: Control irq suspension for prefer_busy_poll
Date: Sat, 2 Nov 2024 21:10:49 -0700 [thread overview]
Message-ID: <Zyb3yS6Whi5Na0lg@LQ3V64L9R2> (raw)
In-Reply-To: <20241102233925.2948-1-hdanton@sina.com>
On Sun, Nov 03, 2024 at 07:39:25AM +0800, Hillf Danton wrote:
> On Sat, 2 Nov 2024 00:52:01 +0000 Martin Karsten <mkarsten@uwaterloo.ca>
> >
> > @@ -2005,8 +2032,10 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
> > * trying again in search of more luck.
> > */
> > res = ep_send_events(ep, events, maxevents);
> > - if (res)
> > + if (res) {
> > + ep_suspend_napi_irqs(ep);
>
> Leave napi irq intact in case of -EINTR.
(I've added Martin and Sridhar to the CC list)
Thanks for pointing out this inconsistency. It's not a big problem,
because on receiving EINTR or another error code, the app either
retries epoll_wait or, if the app is buggy somehow and doesn't retry
epoll_wait, the timer fires and everything proceeds as normal.
However, since irqs are not suspended at other points in ep_poll
where an error code is returned, it is probably best to be
consistent and not suspend here either. We will fix this in the next
revision.
Sridhar: Since the change is very minor I plan to retain your
Reviewed-by, but if you'd like me to drop it, please let me know.
The proposed fix will look like:
if (res) {
if (res > 0)
ep_suspend_napi_irqs(ep);
return res;
}
>
> > return res;
> > + }
> > }
> >
> > if (timed_out)
> > --
> > 2.25.1
next prev parent reply other threads:[~2024-11-03 4:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 0:51 [PATCH net-next v4 0/7] Suspend IRQs during application busy periods Joe Damato
2024-11-02 0:51 ` [PATCH net-next v4 1/7] net: Add napi_struct parameter irq_suspend_timeout Joe Damato
2024-11-02 23:30 ` Samudrala, Sridhar
2024-11-02 0:51 ` [PATCH net-next v4 2/7] net: Suspend softirq when prefer_busy_poll is set Joe Damato
2024-11-02 23:32 ` Samudrala, Sridhar
2024-11-02 0:51 ` [PATCH net-next v4 3/7] net: Add control functions for irq suspension Joe Damato
2024-11-02 23:33 ` Samudrala, Sridhar
2024-11-02 0:52 ` [PATCH net-next v4 4/7] eventpoll: Trigger napi_busy_loop, if prefer_busy_poll is set Joe Damato
2024-11-02 23:33 ` Samudrala, Sridhar
2024-11-02 0:52 ` [PATCH net-next v4 5/7] eventpoll: Control irq suspension for prefer_busy_poll Joe Damato
2024-11-02 23:35 ` Samudrala, Sridhar
2024-11-02 23:39 ` Hillf Danton
2024-11-03 4:10 ` Joe Damato [this message]
2024-11-02 0:52 ` [PATCH net-next v4 6/7] selftests: net: Add busy_poll_test Joe Damato
2024-11-02 0:52 ` [PATCH net-next v4 7/7] docs: networking: Describe irq suspension Joe Damato
2024-11-02 23:41 ` Samudrala, Sridhar
2024-11-02 23:51 ` [PATCH net-next v4 0/7] Suspend IRQs during application busy periods Hillf Danton
2024-11-03 1:50 ` Joe Damato
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=Zyb3yS6Whi5Na0lg@LQ3V64L9R2 \
--to=jdamato@fastly.com \
--cc=edumazet@google.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mkarsten@uwaterloo.ca \
--cc=netdev@vger.kernel.org \
--cc=sridhar.samudrala@intel.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.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