Message ID | 75547b88b7e2d15b35339a6321c3a929.squirrel@www.codeaurora.org |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 2015-01-15 at 03:13 +0000, subashab@codeaurora.org wrote: > I am seeing frequent crashes in high throughput conditions in a > multiprocessor system with kernel version 3.10 where cores are getting hot > plugged. I have pinned the network stack to a particular core using > receive packet steering (RPS). At the time of crash, it looks like a > contention of the process_queue between dev_cpu_callback and > process_backlog. Your patch is mangled, hard to tell what is going on. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/core/dev.c b/net/core/dev.c index df0b522..aa8f503 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3640,6 +3640,7 @@ static void flush_backlog(void *arg) struct net_device *dev = arg; struct softnet_data *sd = &__get_cpu_var(softnet_data); struct sk_buff *skb, *tmp; + unsigned long flags; rps_lock(sd); skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) { @@ -3651,6 +3652,7 @@ static void flush_backlog(void *arg) } rps_unlock(sd); + spin_lock_irqsave(&sd->process_queue.lock, flags); skb_queue_walk_safe(&sd->process_queue, skb, tmp) { if (skb->dev == dev) { __skb_unlink(skb, &sd->process_queue); @@ -3658,6 +3660,7 @@ static void flush_backlog(void *arg) input_queue_head_incr(sd); } } + spin_unlock_irqrestore(&sd->process_queue.lock, flags); } static int napi_gro_complete(struct sk_buff *skb) @@ -4021,7 +4024,7 @@ static int process_backlog(struct napi_struct *napi, int quota) { int work = 0; struct softnet_data *sd = container_of(napi, struct softnet_data, backlog); - + unsigned long flags; #ifdef CONFIG_RPS