linux-rt-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	netdev@vger.kernel.org, linux-rt-devel@lists.linux.dev,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH net-next v4 10/15] net/sched: act_mirred: Move the recursion counter struct netdev_xmit
Date: Thu, 15 May 2025 14:49:04 +0200	[thread overview]
Message-ID: <aCXiwEVJ8sLJLzxc@jlelli-thinkpadt14gen4.remote.csb> (raw)
In-Reply-To: <235b93a5-6989-4131-9099-c0c03bb6afc1@redhat.com>

On 15/05/25 11:55, Paolo Abeni wrote:
> CC sched maintainers.
> 
> On 5/12/25 11:27 AM, Sebastian Andrzej Siewior wrote:
> > mirred_nest_level is a per-CPU variable and relies on disabled BH for its
> > locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT
> > this data structure requires explicit locking.
> > 
> > Move mirred_nest_level to struct netdev_xmit as u8, provide wrappers.
> > 
> > Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> > Cc: Cong Wang <xiyou.wangcong@gmail.com>
> > Cc: Jiri Pirko <jiri@resnulli.us>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > ---
> >  include/linux/netdevice_xmit.h |  3 +++
> >  net/sched/act_mirred.c         | 28 +++++++++++++++++++++++++---
> >  2 files changed, 28 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/linux/netdevice_xmit.h b/include/linux/netdevice_xmit.h
> > index 38325e0702968..848735b3a7c02 100644
> > --- a/include/linux/netdevice_xmit.h
> > +++ b/include/linux/netdevice_xmit.h
> > @@ -8,6 +8,9 @@ struct netdev_xmit {
> >  #ifdef CONFIG_NET_EGRESS
> >  	u8  skip_txqueue;
> >  #endif
> > +#if IS_ENABLED(CONFIG_NET_ACT_MIRRED)
> > +	u8 sched_mirred_nest;
> > +#endif
> >  };
> 
> The above struct is embedded into task_struct in RT build. The new field
>  *should* use an existing hole. According to my weak knowledge in that
> area the task_struct binary layout is a critical, an explicit ack from
> SMEs would be nice.

Agree. Still fitting in an existing task_struct hole.

Reviewed-by: Juri Lelli <juri.lelli@redhat.com>

Best,
Juri


  reply	other threads:[~2025-05-15 12:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12  9:27 [PATCH net-next v4 00/15] net: Cover more per-CPU storage with local nested BH locking Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 01/15] net: page_pool: Don't recycle into cache on PREEMPT_RT Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 02/15] net: dst_cache: Use nested-BH locking for dst_cache::cache Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 03/15] ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 04/15] ipv6: sr: Use nested-BH locking for hmac_storage Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 05/15] xdp: Use nested-BH locking for system_page_pool Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 06/15] xfrm: Use nested-BH locking for nat_keepalive_sk_ipv[46] Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 07/15] openvswitch: Merge three per-CPU structures into one Sebastian Andrzej Siewior
2025-05-14 14:13   ` [ovs-dev] " Aaron Conole
2025-05-12  9:27 ` [PATCH net-next v4 08/15] openvswitch: Use nested-BH locking for ovs_pcpu_storage Sebastian Andrzej Siewior
2025-05-14 14:14   ` [ovs-dev] " Aaron Conole
2025-05-12  9:27 ` [PATCH net-next v4 09/15] openvswitch: Move ovs_frag_data_storage into the struct ovs_pcpu_storage Sebastian Andrzej Siewior
2025-05-14 14:14   ` [ovs-dev] " Aaron Conole
2025-05-12  9:27 ` [PATCH net-next v4 10/15] net/sched: act_mirred: Move the recursion counter struct netdev_xmit Sebastian Andrzej Siewior
2025-05-15  9:55   ` Paolo Abeni
2025-05-15 12:49     ` Juri Lelli [this message]
2025-05-12  9:27 ` [PATCH net-next v4 11/15] net/sched: Use nested-BH locking for sch_frag_data_storage Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 12/15] mptcp: Use nested-BH locking for hmac_storage Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 13/15] rds: Disable only bottom halves in rds_page_remainder_alloc() Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 14/15] rds: Acquire per-CPU pointer within BH disabled section Sebastian Andrzej Siewior
2025-05-12  9:27 ` [PATCH net-next v4 15/15] rds: Use nested-BH locking for rds_page_remainder Sebastian Andrzej Siewior
2025-05-15 13:40 ` [PATCH net-next v4 00/15] net: Cover more per-CPU storage with local nested BH locking patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aCXiwEVJ8sLJLzxc@jlelli-thinkpadt14gen4.remote.csb \
    --to=juri.lelli@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).