]> git.karo-electronics.de Git - karo-tx-linux.git/commit
NET: Add preemption point in qdisc_run
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 7 Apr 2008 06:41:50 +0000 (23:41 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 19 Apr 2008 01:53:25 +0000 (18:53 -0700)
commitd55db74d5dbb56eb8f4fc874a97af7294a3b3008
treebe62df2bbbbb07e200778f1d1510cab37025c456
parent43bee598bd747dc6849d3c4f32a3a912200073c0
NET: Add preemption point in qdisc_run

Upstream commit: 2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0

The qdisc_run loop is currently unbounded and runs entirely in a
softirq.  This is bad as it may create an unbounded softirq run.

This patch fixes this by calling need_resched and breaking out if
necessary.

It also adds a break out if the jiffies value changes since that would
indicate we've been transmitting for too long which starves other
softirqs.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
net/sched/sch_generic.c