lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Oct 2019 20:48:42 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Cong Wang <xiyou.wangcong@...il.com>
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 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@...gutronix.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ