Subject: Re: [PATCH] net: core: alloc_netdev_mqs reduce alignment overhead

From: Jakub Kicinski <[email-masked]>
Date: Tue, 25 Jun 2024 08:29:00 -0700

On Mon, 24 Jun 2024 03:58:04 -0400 Chris Gregory wrote:
> I was reading over alloc_netdev_mqs and noticed that it's trying to
> align the allocation by adding on 31 bytes (NETDEV_ALIGN-1).  I'm not
> an expert on kmalloc, but AFAICT it will always give back a pointer
> aligned to ARCH_KMALLOC_MINALIGN.  On my x86_64,
> ARCH_KMALLOC_MINALIGN=8 so this saves 7 bytes which could mean an
> 8-byte allocation is freed up.

We're reworking the priv handling to use a flexible array:
https://lore.kernel.org/all/[email-masked]/
one more series of prep needs to get merged, and we'll convert.
-- 
pw-bot: reject