[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAC_iWjLwssHzyn83XO_XJV8kYBbz76NOsSE2cT90aKPzGLu8aw@mail.gmail.com>
Date: Mon, 19 May 2025 11:18:54 +0300
From: Ilias Apalodimas <ilias.apalodimas@...aro.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: netdev@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, Jesper Dangaard Brouer <hawk@...nel.org>
Subject: Re: [PATCH net-next v3 01/18] net: page_pool: Don't recycle into
cache on PREEMPT_RT
Hi Sebastian
On Wed, 30 Apr 2025 at 15:48, Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
>
> With preemptible softirq and no per-CPU locking in local_bh_disable() on
> PREEMPT_RT the consumer can be preempted while a skb is returned.
>
> Avoid the race by disabling the recycle into the cache on PREEMPT_RT.
I am not expert on PREEMPT_RT, but this sounds reasonable.
Did you have time to test this at all? There's a kernel module Jesper
originally authored to track regressions, which unfortunately isn't
upstreamed yet [0].
Any chance you can quickly spin it to get some numbers?
[0] https://lore.kernel.org/netdev/20250309084118.3080950-1-almasrymina@google.com/
Cheers
/Ilias
>
> Cc: Jesper Dangaard Brouer <hawk@...nel.org>
> Cc: Ilias Apalodimas <ilias.apalodimas@...aro.org>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
> net/core/page_pool.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
> index 7745ad924ae2d..ba8803c2c0b20 100644
> --- a/net/core/page_pool.c
> +++ b/net/core/page_pool.c
> @@ -805,6 +805,10 @@ static bool page_pool_napi_local(const struct page_pool *pool)
> const struct napi_struct *napi;
> u32 cpuid;
>
> + /* On PREEMPT_RT the softirq can be preempted by the consumer */
> + if (IS_ENABLED(CONFIG_PREEMPT_RT))
> + return false;
> +
> if (unlikely(!in_softirq()))
> return false;
>
> --
> 2.49.0
>
Powered by blists - more mailing lists