[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yf1qc7R5rFoALsCo@linutronix.de>
Date: Fri, 4 Feb 2022 19:03:31 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Yannick Vignon <yannick.vignon@....nxp.com>,
Eric Dumazet <edumazet@...gle.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Antoine Tenart <atenart@...nel.org>,
Alexander Lobakin <alexandr.lobakin@...el.com>,
Paolo Abeni <pabeni@...hat.com>, Wei Wang <weiwan@...gle.com>,
Kumar Kartikeya Dwivedi <memxor@...il.com>,
Yunsheng Lin <linyunsheng@...wei.com>,
Arnd Bergmann <arnd@...db.de>, netdev <netdev@...r.kernel.org>,
Vladimir Oltean <olteanv@...il.com>,
Xiaoliang Yang <xiaoliang.yang_1@....com>, mingkai.hu@....com,
Joakim Zhang <qiangqing.zhang@....com>,
sebastien.laveze@....com, Yannick Vignon <yannick.vignon@....com>
Subject: Re: [PATCH net-next 1/2] net: napi: wake up ksoftirqd if needed
after scheduling NAPI
On 2022-02-04 09:45:22 [-0800], Jakub Kicinski wrote:
> Coincidentally, I believe the threaded NAPI wake up is buggy -
> we assume the thread is only woken up when NAPI gets scheduled,
> but IIUC signal delivery and other rare paths may wake up kthreads,
> randomly.
I had to look into NAPI-threads for some reason.
What I dislike is that after enabling it via sysfs I have to:
- adjust task priority manual so it is preferred over other threads.
This is usually important on RT. But then there is no overload
protection.
- set an affinity-mask for the thread so it does not migrate from one
CPU to the other. This is worse for a RT task where the scheduler
tries to keep the task running.
Wouldn't it work to utilize the threaded-IRQ API and use that instead
the custom thread? Basically the primary handler would what it already
does (disable the interrupt) and the threaded handler would feed packets
into the stack. In the overload case one would need to lower the
thread-priority.
Sebastian
Powered by blists - more mailing lists