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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKW=ZPpYMBBKN_U=-4zCYB4jZD6N4M6_HLcTJVupiVx3A@mail.gmail.com>
Date: Wed, 8 Oct 2025 00:32:17 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Simon Horman <horms@...nel.org>, Jamal Hadi Salim <jhs@...atatu.com>, 
	Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>, 
	Kuniyuki Iwashima <kuniyu@...gle.com>, Willem de Bruijn <willemb@...gle.com>, netdev@...r.kernel.org, 
	eric.dumazet@...il.com
Subject: Re: [PATCH RFC net-next 5/5] net: dev_queue_xmit() llist adoption

On Tue, Oct 7, 2025 at 11:37 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> Hi,
>
> On 10/6/25 9:31 PM, Eric Dumazet wrote:
> > diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> > index 31561291bc92fd70d4d3ca8f5f7dbc4c94c895a0..94966692ccdf51db085c236319705aecba8c30cf 100644
> > --- a/include/net/sch_generic.h
> > +++ b/include/net/sch_generic.h
> > @@ -115,7 +115,9 @@ struct Qdisc {
> >       struct Qdisc            *next_sched;
> >       struct sk_buff_head     skb_bad_txq;
> >
> > -     spinlock_t              busylock ____cacheline_aligned_in_smp;
> > +     atomic_long_t           defer_count ____cacheline_aligned_in_smp;
> > +     struct llist_head       defer_list;
> > +
>
> Dumb question: I guess the above brings back Qdisc to the original size
> ? (pre patch 4/5?) If so, perhaps is worth mentioning somewhere in the
> commit message.


Hmm, I do not think this changes the size.
The cache line that was starting at busylock had holes.
You can see that even adding the long and the pointer, we still have room in it.

/* --- cacheline 3 boundary (192 bytes) --- */
struct gnet_stats_queue    qstats;               /*  0xc0  0x14 */
bool                       running;              /*  0xd4   0x1 */

/* XXX 3 bytes hole, try to pack */

unsigned long              state;                /*  0xd8   0x8 */
struct Qdisc *             next_sched;           /*  0xe0   0x8 */
struct sk_buff_head        skb_bad_txq;          /*  0xe8  0x18 */
/* --- cacheline 4 boundary (256 bytes) --- */
atomic_long_t              defer_count
__attribute__((__aligned__(64))); /* 0x100   0x8 */
struct llist_head          defer_list;           /* 0x108   0x8 */
spinlock_t                 seqlock;              /* 0x110   0x4 */

/* XXX 4 bytes hole, try to pack */

struct callback_head       rcu __attribute__((__aligned__(8))); /*
0x118  0x10 */
netdevice_tracker          dev_tracker;          /* 0x128   0x8 */
struct lock_class_key      root_lock_key;        /* 0x130     0 */

/* XXX 16 bytes hole, try to pack */

/* --- cacheline 5 boundary (320 bytes) --- */
long                       privdata[]
__attribute__((__aligned__(64))); /* 0x140     0 */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ