From: Gatis Peisenieks <ga...@mikrotik.com>
Date: Tue, 06 Apr 2021 17:49:32 +0300

> Tx queue cleanup happens in interrupt handler on same core as rx queue
> processing. Both can take considerable amount of processing in high
> packet-per-second scenarios.
> 
> Sending big amounts of packets can stall the rx processing which is
> unfair
> and also can lead to out-of-memory condition since __dev_kfree_skb_irq
> queues the skbs for later kfree in softirq which is not allowed to
> happen
> with heavy load in interrupt handler.
> 
> This puts tx cleanup in its own napi and enables threaded napi to
> allow
> the rx/tx queue processing to happen on different cores. Also as the
> first
> in-driver user of dev_set_threaded API, need to add EXPORT_SYMBOL for
> it.
> 
> The ability to sustain equal amounts of tx/rx traffic increased:
> from 280Kpps to 1130Kpps on Threadripper 3960X with upcoming
> Mikrotik 10/25G NIC,
> from 520Kpps to 850Kpps on Intel i3-3320 with Mikrotik RB44Ge adapter.
> 
> Signed-off-by: Gatis Peisenieks <ga...@mikrotik.com>
> ---
> changes since v3:
>       - made scripts/checkpatch.pl happy (commit message line wrap +
>         missing comment on spinlock)
>       - moved the new intr_mask_lock to be besides the intr_mask it
>         protects so they are more likely to be on same cacheline
> changes since v2:
>       - addressed comments from Eric Dumazet
>       - added EXPORT_SYMBOL for dev_set_threaded
> 
> Sorry for reposting, noticed that scripts/checkpatch.pl was not happy.

This does not apply to 'net',  did you mean 'net-next'?  If so, please indicate 
this clearly in
the Subject line as per convention.

Thank you.

Reply via email to