[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpUFE0-WMEkCrMhXcHa9Tq5qs+FpNMW5ri=hSK-zN4gx5Q@mail.gmail.com>
Date: Wed, 16 Oct 2019 14:33:58 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>,
Eric Dumazet <edumazet@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Marc Kleine-Budde <mkl@...gutronix.de>,
Peter Zijlstra <peterz@...radead.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next v2] net: sched: Avoid using yield() in a busy
waiting loop
On Wed, Oct 16, 2019 at 11:48 AM Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
>
> 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:
Must be some firewall rule on my side.
>
> > > --- 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.
Yeah, at least msleep() is uninterruptible too.
So,
Acked-by: Cong Wang <xiyou.wangcong@...il.com>
Thanks!
Powered by blists - more mailing lists