lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc7fb885df3a52d076bb71191afa786d19d79cd5.camel@siemens.com>
Date: Mon, 30 Oct 2023 12:29:02 +0100
From: Florian Bezdeka <florian.bezdeka@...mens.com>
To: Kurt Kanzenbach <kurt@...utronix.de>, "David S. Miller"
	 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	 <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Sebastian Andrzej Siewior
 <bigeasy@...utronix.de>,  jan.kiszka@...mens.com, vivek.behera@...mens.com
Subject: Re: [PATCH net-next] net/core: Enable socket busy polling on -RT

Hi Kurt,

On Sat, 2023-10-28 at 12:09 +0200, Kurt Kanzenbach wrote:
> Hi Florian,
> 
> On Fri Oct 27 2023, Florian Bezdeka wrote:
> > On Tue, 2023-05-23 at 13:15 +0200, Kurt Kanzenbach wrote:
> > > Busy polling is currently not allowed on PREEMPT_RT, because it disables
> > > preemption while invoking the NAPI callback. It is not possible to acquire
> > > sleeping locks with disabled preemption. For details see commit
> > > 20ab39d13e2e ("net/core: disable NET_RX_BUSY_POLL on PREEMPT_RT").
> > 
> > Is that something that we could consider as Bug-Fix for 6.1 and request
> > a backport, or would you consider that as new feature?
> 
> IMO it is in category "never worked". Hence it is not stable material.
> 
> > 
> > > 
> > > However, strict cyclic and/or low latency network applications may prefer busy
> > > polling e.g., using AF_XDP instead of interrupt driven communication.
> > > 
> > > The preempt_disable() is used in order to prevent the poll_owner and NAPI owner
> > > to be preempted while owning the resource to ensure progress. Netpoll performs
> > > busy polling in order to acquire the lock. NAPI is locked by setting the
> > > NAPIF_STATE_SCHED flag. There is no busy polling if the flag is set and the
> > > "owner" is preempted. Worst case is that the task owning NAPI gets preempted and
> > > NAPI processing stalls.  This is can be prevented by properly prioritising the
> > > tasks within the system.
> > > 
> > > Allow RX_BUSY_POLL on PREEMPT_RT if NETPOLL is disabled. Don't disable
> > > preemption on PREEMPT_RT within the busy poll loop.

Sorry, I need one more information here: We try to re-use the kernel
and its configuration from Debian whenever possible. NETPOLL/NETCONSOLE
is build as module there.

Will this limitation be addressed in the future? Is someone already
working on that? Is that maybe on the radar for the ongoing printk()
work? (Assuming printk() with NETCONSOLE enabled is the underlying
problem)

We don't use NETPOLL/NETCONSOLE during runtime but it is enabled at
build time. Sadly we can not use busy polling mode in combination with
XDP now. (Ignoring the fact that we could adjust the kernel
configuration, build on our own, ...)

Would love to hear your thoughts about that. Thanks a lot!

> > > 
> > > Tested on x86 hardware with v6.1-RT and v6.3-RT on Intel i225 (igc) with
> > > AF_XDP/ZC sockets configured to run in busy polling mode.
> > 
> > That is exactly our use case as well and we would like to have it in
> > 6.1. Any (technical) reasons that prevent a backport?
> 
> There is no technical reason which prevents a backport to v6.1. In fact,
> we're using this with v6.1-RT LTS.
> 
> Thanks,
> Kurt


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ