Messages in this thread | | | Date | Tue, 17 Jul 2007 08:14:58 +0200 | From | Jarek Poplawski <> | Subject | Re: [patch] revert: [NET]: Fix races in net_rx_action vs netpoll |
| |
On Tue, Jul 17, 2007 at 07:46:39AM +0200, Jarek Poplawski wrote: ... > > static void net_rx_action(struct softirq_action *h) > > { > > struct softnet_data *queue = &__get_cpu_var(softnet_data); > > unsigned long start_time = jiffies; > > int budget = netdev_budget; > > void *have; > > > > local_irq_disable(); > > > > while (!list_empty(&queue->poll_list)) { > > struct net_device *dev; > > > > if (budget <= 0 || jiffies - start_time > 1) > > goto softnet_break; > > > > local_irq_enable(); > > > > dev = list_entry(queue->poll_list.next, > > struct net_device, poll_list); > > have = netpoll_poll_lock(dev); > > > > if (dev->quota <= 0 || dev->poll(dev, &budget)) { > > If after poll_napi dev->quota <= 0 dev->poll is not run and > __LINK_STATE_RX_SCHED bit (plus dev->poll_list) stays uncleared.
Or, more precisely dev->poll_list will be cleared just after this, and net_rx_action returns with __LINK_STATE_RX_SCHED bit set.
Jarek P. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |