Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-06 Thread Mike Galbraith
On Thu, 2017-04-06 at 18:13 -0400, Stephen Hemminger wrote: > Why not replace yield with msleep(1) which gets rid of the inversion > issues? That's fine, just not super efficient, if that matters. -Mike

Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-06 Thread Stephen Hemminger
On Thu, 06 Apr 2017 03:54:19 +0200 Mike Galbraith wrote: > On Wed, 2017-04-05 at 16:42 -0700, Cong Wang wrote: > > On Tue, Apr 4, 2017 at 10:56 PM, Mike Galbraith wrote: > > > On Tue, 2017-04-04 at 22:19 -0700, Cong Wang wrote: > > > > On Tue, Apr 4, 2017 at 8:55 PM, Mike Galbraith wrote:

Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-05 Thread Mike Galbraith
On Wed, 2017-04-05 at 16:42 -0700, Cong Wang wrote: > On Tue, Apr 4, 2017 at 10:56 PM, Mike Galbraith wrote: > > On Tue, 2017-04-04 at 22:19 -0700, Cong Wang wrote: > > > On Tue, Apr 4, 2017 at 8:55 PM, Mike Galbraith wrote: > > > > > > That won't help, cond_resched() has the same impact upon a

Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-05 Thread Cong Wang
On Tue, Apr 4, 2017 at 10:56 PM, Mike Galbraith wrote: > On Tue, 2017-04-04 at 22:19 -0700, Cong Wang wrote: >> On Tue, Apr 4, 2017 at 8:55 PM, Mike Galbraith wrote: > >> > That won't help, cond_resched() has the same impact upon a lone >> > SCHED_FIFO task as yield() does.. none. >> >> Hmm? In t

Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-04 Thread Mike Galbraith
On Tue, 2017-04-04 at 22:19 -0700, Cong Wang wrote: > On Tue, Apr 4, 2017 at 8:55 PM, Mike Galbraith 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 wai

Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-04 Thread Cong Wang
On Tue, Apr 4, 2017 at 8:55 PM, Mike Galbraith wrote: > On Tue, 2017-04-04 at 18:52 -0700, Cong Wang wrote: > >> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c >> index 1a2f9e9..4725d2f 100644 >> --- a/net/sched/sch_generic.c >> +++ b/net/sched/sch_generic.c >> @@ -925,7 +925,7 @@

Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-04 Thread Mike Galbraith
On Tue, 2017-04-04 at 18:52 -0700, Cong Wang wrote: > diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c > index 1a2f9e9..4725d2f 100644 > --- a/net/sched/sch_generic.c > +++ b/net/sched/sch_generic.c > @@ -925,7 +925,7 @@ void dev_deactivate_many(struct list_head *head) > /* Wai

[Patch net] net_sched: replace yield() with cond_resched()

2017-04-04 Thread Cong Wang
yield() should be rendered dead, according to Mike. It is hard to wait properly for all qdisc's to transmit all packets. So just keep the original logic. Reported-by: Mike Galbraith Signed-off-by: Cong Wang --- net/sched/sch_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff