From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>, Eric Dumazet <edumazet@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next v2] net: sched: Avoid using yield() in a busy waiting loop
Date: Wed, 16 Oct 2019 20:48:42 +0200 [thread overview]
Message-ID: <20191016184842.v2f54epxautxbtig@linutronix.de> (raw)
In-Reply-To: <CAM_iQpXS5Dm-pCAu+7t+9RRauW=q64i6VCQ-Gz6j9_qFMPcOjA@mail.gmail.com>
On 2019-10-16 10:28:04 [-0700], Cong Wang wrote:
> > Link: https://lkml.kernel.org/r/1393976987-23555-1-git-send-email-mkl@pengutronix.de
>
> BTW, this link doesn't work, 404 is returned.
here it returns 200:
|$ wget https://lkml.kernel.org/r/1393976987-23555-1-git-send-email-mkl@pengutronix.de
|--2019-10-16 20:37:05-- https://lkml.kernel.org/r/1393976987-23555-1-git-send-email-mkl@pengutronix.de
|Resolving lkml.kernel.org (lkml.kernel.org)... 54.69.74.255, 54.71.250.162
|Connecting to lkml.kernel.org (lkml.kernel.org)|54.69.74.255|:443... connected.
|HTTP request sent, awaiting response... 302 Found
|Location: https://lore.kernel.org/linux-rt-users/1393976987-23555-1-git-send-email-mkl@pengutronix.de/ [following]
|--2019-10-16 20:37:06-- https://lore.kernel.org/linux-rt-users/1393976987-23555-1-git-send-email-mkl@pengutronix.de/
|Resolving lore.kernel.org (lore.kernel.org)... 54.71.250.162, 54.69.74.255
|Connecting to lore.kernel.org (lore.kernel.org)|54.71.250.162|:443... connected.
|HTTP request sent, awaiting response... 200 OK
|Length: 10044 (9,8K) [text/html]
|Saving to: ‘1393976987-23555-1-git-send-email-mkl@pengutronix.de’
> > --- a/net/sched/sch_generic.c
> > +++ b/net/sched/sch_generic.c
> > @@ -1217,8 +1217,13 @@ void dev_deactivate_many(struct list_head *head)
> >
> > /* Wait for outstanding qdisc_run calls. */
> > list_for_each_entry(dev, head, close_list) {
> > - while (some_qdisc_is_busy(dev))
> > - yield();
> > + while (some_qdisc_is_busy(dev)) {
> > + /* wait_event() would avoid this sleep-loop but would
> > + * require expensive checks in the fast paths of packet
> > + * processing which isn't worth it.
> > + */
> > + schedule_timeout_uninterruptible(1);
>
> I am curious why this is uninterruptible?
You don't want a signal to wake it too early. It has to chill for a
jiffy.
> Thanks.
Sebastian
next prev parent reply other threads:[~2019-10-16 18:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 17:15 [PATCH net-next] net: sched: Avoid using yield() in a busy waiting loop Sebastian Andrzej Siewior
2019-10-12 19:14 ` Sergei Shtylyov
2019-10-16 8:28 ` [PATCH net-next v2] " Sebastian Andrzej Siewior
2019-10-16 17:28 ` Cong Wang
2019-10-16 18:48 ` Sebastian Andrzej Siewior [this message]
2019-10-16 21:33 ` Cong Wang
2019-10-17 19:33 ` David Miller
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=20191016184842.v2f54epxautxbtig@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=tglx@linutronix.de \
--cc=xiyou.wangcong@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).