[RFC 2/7] ath10k: Add support to process rx packet in thread

Rakesh Pillai pillair at codeaurora.org
Thu Jul 23 14:25:06 EDT 2020

> -----Original Message-----
> From: Rajkumar Manoharan <rmanohar at codeaurora.org>
> Sent: Wednesday, July 22, 2020 3:23 AM
> To: Rakesh Pillai <pillair at codeaurora.org>
> Cc: ath10k at lists.infradead.org; linux-wireless at vger.kernel.org; linux-
> kernel at vger.kernel.org; kvalo at codeaurora.org; johannes at sipsolutions.net;
> davem at davemloft.net; kuba at kernel.org; netdev at vger.kernel.org;
> dianders at chromium.org; evgreen at chromium.org; linux-wireless-
> owner at vger.kernel.org
> Subject: Re: [RFC 2/7] ath10k: Add support to process rx packet in thread
> On 2020-07-21 10:14, Rakesh Pillai wrote:
> > NAPI instance gets scheduled on a CPU core on which
> > the IRQ was triggered. The processing of rx packets
> > can be CPU intensive and since NAPI cannot be moved
> > to a different CPU core, to get better performance,
> > its better to move the gist of rx packet processing
> > in a high priority thread.
> >
> > Add the init/deinit part for a thread to process the
> > receive packets.
> >
> IMHO this defeat the whole purpose of NAPI. Originally in ath10k
> irq processing happened in tasklet (high priority) context which in
> turn push more data to net core even though net is unable to process
> driver data as both happen in different context (fast producer - slow
> consumer)
> issue. Why can't CPU governor schedule the interrupts in less loaded CPU
> core?
> Otherwise you can play with different RPS and affinity settings to meet
> your
> requirement.
> IMO introducing high priority tasklets/threads is not viable solution.

Hi Rajkumar,
In linux, the IRQs are directed to the first core which is booted.
I see that all the IRQs are getting routed to CORE0 even if its heavily

IRQ and NAPI are not under the scheduler's control, since it cannot be
NAPI is scheduled only on the same core as IRQ. But a thread can be moved
around by the scheduler based on the CPU load.
This is the reason I went ahead with using thread.

Affinity settings are static, and cannot be done runtime without any
downstream userspace entity.

> -Rajkumar

More information about the ath10k mailing list