[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALZVapniE32NfuOjmfDd7DmVHxGLmMTunJu2CxBHRsyoE1Kqaw@mail.gmail.com>
Date: Wed, 6 Mar 2013 18:20:35 +0100
From: Javier Domingo <javierdo1@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: Softirqs without captured packets
> To free memory, so that rx handler gets more chance to be able to
> allocate memory, and reuse memory already hot in cpu caches.
I have been thinking about the tx completion thread, and what happens
if for example in e1000_clean:
tx_clean_complete = e1000_clean_tx_irq(adapter, &adapter->tx_ring[0]);
adapter->clean_rx(adapter, &adapter->rx_ring[0], &work_done, budget);
if (!tx_clean_complete)
work_done = budget;
the tx_clean_complete is false (count of the cleaned tx packets is
less than the needed ones), that would then make the polling function
return that the budget was fully filled. If this happens with the
first poll, it will make net_rx_action believe that those packets have
been captured, so it will have to exit after that loop.
Thus that interface, will be checked in net_rx_action, as the work
equals the weight of the function:
if (unlikely(work == weight)) {
if (unlikely(napi_disable_pending(n))) {
local_irq_enable();
napi_complete(n);
local_irq_disable();
} else {
list_move_tail(&n->poll_list, &sd->poll_list);
}
}
, it will be rescheduled for the next net_rx_action, but the rest of
the poll-able cards would then have to move to the next net_rx_action
softirq. Would it be alright to make e1000/e1000e drivers just return
the budget they used?
Another question, that is a little related, in tg3, it deactivates
napi, when it has a TX_RECOVERY_PENDING, what does that flag mean?
Thank you for your attention,
Javier Domingo
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists