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]
Message-ID: <1491371790.4536.151.camel@gmx.de>
Date:   Wed, 05 Apr 2017 07:56:30 +0200
From:   Mike Galbraith <efault@....de>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [Patch net] net_sched: replace yield() with cond_resched()

On Tue, 2017-04-04 at 22:19 -0700, Cong Wang wrote:
> On Tue, Apr 4, 2017 at 8:55 PM, Mike Galbraith <efault@....de> wrote:

> > That won't help, cond_resched() has the same impact upon a lone
> > SCHED_FIFO task as yield() does.. none.
> 
> Hmm? In the comment you quote:
> 
>  * If you want to use yield() to wait for something, use wait_event().
>  * If you want to use yield() to be 'nice' for others, use cond_resched().
> 
> So if cond_resched() doesn't help, why this misleading comment?

This is not an oh let's be nice guys thing, it's a perfect match of...

<copy/paste>
 * while (!event)
 *      yield();
(/copy/paste>

..get off the CPU until this happens thing.  With nobody to yield the C
PU to, some_qdisc_is_busy() will remain true forever more.

> I picked the latter one, because the former is harder to implement
> properly (at least for -net) we need qdisc's to notify this waiter once
> they finish transmitting packets, which means we probably need
> a per-netdevice wait struct.

Yup, why I merely notified net-fu masters of lurking spinner.  I met it
 because I sometimes run most kthreads at prio 1, some prioritized, and
kworkers at prio 2.  (never mind why, but they're excellent reasons)

	-Mike

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ