[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1491357139-27108-1-git-send-email-xiyou.wangcong@gmail.com>
Date: Tue, 4 Apr 2017 18:52:19 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: netdev@...r.kernel.org
Cc: efault@....de, Cong Wang <xiyou.wangcong@...il.com>
Subject: [Patch net] net_sched: replace yield() with cond_resched()
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@....de>
Signed-off-by: Cong Wang <xiyou.wangcong@...il.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
Powered by blists - more mailing lists