Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-09 Thread Stanislav Meduna
On 09.03.2014 23:53, David Miller wrote: > To me it means "I've got nothing to do if other tasks want to run right > now" Yes, I even see it having this meaning when an RT task executes > it. http://www.kernel.org/doc/htmldocs/device-drivers/API-yield.html lists this exact "while (!event) yield;

Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-09 Thread David Lang
On Sun, 9 Mar 2014, Ben Hutchings wrote: On Sun, 2014-03-09 at 18:53 -0400, David Miller wrote: From: Ben Hutchings Date: Sun, 09 Mar 2014 19:09:20 + On Thu, 2014-03-06 at 16:06 -0500, David Miller wrote: From: Marc Kleine-Budde Date: Wed, 5 Mar 2014 00:49:47 +0100 @@ -839,7 +839,7

Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-09 Thread Ben Hutchings
On Sun, 2014-03-09 at 18:53 -0400, David Miller wrote: > From: Ben Hutchings > Date: Sun, 09 Mar 2014 19:09:20 + > > > On Thu, 2014-03-06 at 16:06 -0500, David Miller wrote: > >> From: Marc Kleine-Budde > >> Date: Wed, 5 Mar 2014 00:49:47 +0100 > >> > >> > @@ -839,7 +839,7 @@ void dev_deac

Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-09 Thread David Miller
From: Ben Hutchings Date: Sun, 09 Mar 2014 19:09:20 + > On Thu, 2014-03-06 at 16:06 -0500, David Miller wrote: >> From: Marc Kleine-Budde >> Date: Wed, 5 Mar 2014 00:49:47 +0100 >> >> > @@ -839,7 +839,7 @@ void dev_deactivate_many(struct list_head *head) >> > /* Wait for outstanding

Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-09 Thread Ben Hutchings
On Thu, 2014-03-06 at 16:06 -0500, David Miller wrote: > From: Marc Kleine-Budde > Date: Wed, 5 Mar 2014 00:49:47 +0100 > > > @@ -839,7 +839,7 @@ void dev_deactivate_many(struct list_head *head) > > /* Wait for outstanding qdisc_run calls. */ > > list_for_each_entry(dev, head, unreg_

Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-07 Thread Sebastian Andrzej Siewior
* Marc Kleine-Budde | 2014-03-06 22:39:58 [+0100]: >> Therefore it should allow lower priority threads to run, not just >> equal or higher priority ones. > >Yes, we need a call that does what you described, however I'm not sure >if yield() really does that. According to: > >http://lxr.free-electro

Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-06 Thread Mike Galbraith
On Thu, 2014-03-06 at 16:06 -0500, David Miller wrote: > From: Marc Kleine-Budde > Date: Wed, 5 Mar 2014 00:49:47 +0100 > > > @@ -839,7 +839,7 @@ void dev_deactivate_many(struct list_head *head) > > /* Wait for outstanding qdisc_run calls. */ > > list_for_each_entry(dev, head, unreg_lis

Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-06 Thread Marc Kleine-Budde
On 03/06/2014 10:06 PM, David Miller wrote: > From: Marc Kleine-Budde > Date: Wed, 5 Mar 2014 00:49:47 +0100 > >> @@ -839,7 +839,7 @@ void dev_deactivate_many(struct list_head *head) >> /* Wait for outstanding qdisc_run calls. */ >> list_for_each_entry(dev, head, unreg_list) >>

Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-06 Thread David Miller
From: Marc Kleine-Budde Date: Wed, 5 Mar 2014 00:49:47 +0100 > @@ -839,7 +839,7 @@ void dev_deactivate_many(struct list_head *head) > /* Wait for outstanding qdisc_run calls. */ > list_for_each_entry(dev, head, unreg_list) > while (some_qdisc_is_busy(dev)) > -

[PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls

2014-03-04 Thread Marc Kleine-Budde
On PREEMPT_RT enabled systems the interrupt handler run as threads at prio 50 (by default). If a high priority userspace process tries to shut down a busy network interface it might spin in a yield loop waiting for the device to become idle. With the interrupt thread having a lower priority than th