aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChris Leech <christopher.leech@intel.com>2006-08-02 17:21:19 -0400
committerDavid S. Miller <davem@davemloft.net>2006-08-02 17:21:19 -0400
commite6eb307d48c81d688804f8b39a0a3ddde3cd3458 (patch)
treed60117a38c614f916defbb91eda0b9e38feeb8ec /net
parent9bbf28a1ff7b9d4e7df57829c25638721984277b (diff)
[I/OAT]: Remove CPU hotplug lock from net_dma_rebalance
Remove the lock_cpu_hotplug()/unlock_cpu_hotplug() calls from net_dma_rebalance The lock_cpu_hotplug()/unlock_cpu_hotplug() sequence in net_dma_rebalance is both incorrect (as pointed out by David Miller) because lock_cpu_hotplug() may sleep while the net_dma_event_lock spinlock is held, and unnecessary (as pointed out by Andrew Morton) as spin_lock() disables preemption which protects from CPU hotplug events. Signed-off-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 5b630cece707..f25d7ecaf035 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3419,12 +3419,9 @@ static void net_dma_rebalance(void)
3419 unsigned int cpu, i, n; 3419 unsigned int cpu, i, n;
3420 struct dma_chan *chan; 3420 struct dma_chan *chan;
3421 3421
3422 lock_cpu_hotplug();
3423
3424 if (net_dma_count == 0) { 3422 if (net_dma_count == 0) {
3425 for_each_online_cpu(cpu) 3423 for_each_online_cpu(cpu)
3426 rcu_assign_pointer(per_cpu(softnet_data.net_dma, cpu), NULL); 3424 rcu_assign_pointer(per_cpu(softnet_data.net_dma, cpu), NULL);
3427 unlock_cpu_hotplug();
3428 return; 3425 return;
3429 } 3426 }
3430 3427
@@ -3444,8 +3441,6 @@ static void net_dma_rebalance(void)
3444 i++; 3441 i++;
3445 } 3442 }
3446 rcu_read_unlock(); 3443 rcu_read_unlock();
3447
3448 unlock_cpu_hotplug();
3449} 3444}
3450 3445
3451/** 3446/**