Search Linux Wireless

Re: [PATCH v1 wl-next 1/3] wifi: wext: Move wext_nlevents to net->gen[].

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
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 */




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux