public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <johannes@sipsolutions.net>
Cc: <alexandre.ferrieux@gmail.com>, <kuni1840@gmail.com>,
	<kuniyu@amazon.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v1 wl-next 1/3] wifi: wext: Move wext_nlevents to net->gen[].
Date: Tue, 15 Oct 2024 17:49:56 -0700	[thread overview]
Message-ID: <20241016004956.74702-1-kuniyu@amazon.com> (raw)
In-Reply-To: <2d4bc83dffef3b773312aa08d55bb310f2dcead9.camel@sipsolutions.net>

From: Johannes Berg <johannes@sipsolutions.net>
Date: Tue, 15 Oct 2024 08:36:24 +0200
> On Mon, 2024-10-14 at 13:55 -0700, Kuniyuki Iwashima wrote:
> > CONFIG_WEXT_CORE cannot be built as a module
> 
> Isn't that precisely an argument for _not_ using net->gen[] with all the
> additional dynamic allocations that implies?

Exactly...

Recently I was thinking most of the structs in struct net (except for
first-class citizens like ipv4/ipv6) should use net->gen[] given the
distro kernel enables most configs.

But yes, WEXT is always built-in.


> I'm not really against
> doing this, but it does make the third patch more complex, requiring the
> new wext_net->net pointer,

Right, FWIW, before posting this patch, I checked 5 structs have
a similar pointer.

rdma_dev_net : possible_net_t net
pktgen_net : struct net
netns_ipvs : struct net
bond_net : struct net
afs_net : struct net


> and given allocations (rounded up) will take
> more space - for something always present - than just going with the
> existing scheme?
> 
> What's the reason to use net->gen[]?

Probably because wext_nlevents was just before a cacheline
on my setup ?

$ pahole -EC net vmlinux | grep net_generic -C 30
...
	} wext_nlevents; /*  2536    24 */
	/* --- cacheline 40 boundary (2560 bytes) --- */
	struct net_generic *       gen;                                                  /*  2560     8 */

  reply	other threads:[~2024-10-16  0:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 20:55 [PATCH v1 wl-next 0/3] wifi: wext: Namespacify wireless_nlevent_flush() calls Kuniyuki Iwashima
2024-10-14 20:55 ` [PATCH v1 wl-next 1/3] wifi: wext: Move wext_nlevents to net->gen[] Kuniyuki Iwashima
2024-10-15  6:36   ` Johannes Berg
2024-10-16  0:49     ` Kuniyuki Iwashima [this message]
2024-10-16  8:56       ` Johannes Berg
2024-10-16 23:58         ` Kuniyuki Iwashima
2024-10-17  8:06           ` Johannes Berg
2024-10-14 20:55 ` [PATCH v1 wl-next 2/3] wifi: wext: Convert wireless_nlevent_work to per-netns work Kuniyuki Iwashima
2024-10-14 20:55 ` [PATCH v1 wl-next 3/3] wifi: wext: Don't iterate all netns in wireless_nlevent_flush() Kuniyuki Iwashima

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=20241016004956.74702-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=alexandre.ferrieux@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuni1840@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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