netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net] net_sched: replace yield() with cond_resched()
@ 2017-04-05  1:52 Cong Wang
  2017-04-05  3:55 ` Mike Galbraith
  0 siblings, 1 reply; 8+ messages in thread
From: Cong Wang @ 2017-04-05  1:52 UTC (permalink / raw)
  To: netdev; +Cc: efault, 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 <efault@gmx.de>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/sched/sch_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 	/* Wait for outstanding qdisc_run calls. */
 	list_for_each_entry(dev, head, close_list)
 		while (some_qdisc_is_busy(dev))
-			yield();
+			cond_resched();
 }
 
 void dev_deactivate(struct net_device *dev)
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-04-07  3:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-05  1:52 [Patch net] net_sched: replace yield() with cond_resched() Cong Wang
2017-04-05  3:55 ` Mike Galbraith
2017-04-05  5:19   ` Cong Wang
2017-04-05  5:56     ` Mike Galbraith
2017-04-05 23:42       ` Cong Wang
2017-04-06  1:54         ` Mike Galbraith
2017-04-06 22:13           ` Stephen Hemminger
2017-04-07  3:59             ` Mike Galbraith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).