netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Chris Gregory <czipperz@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: core: alloc_netdev_mqs reduce alignment overhead
Date: Tue, 25 Jun 2024 08:29:00 -0700	[thread overview]
Message-ID: <20240625082900.1928b932@kernel.org> (raw)
In-Reply-To: <CAH6RvXgctKWU0rdByDZgUNJ9k=6Wf6c=Tw_9ZzH7Un2mZbi-uQ@mail.gmail.com>

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/20240229225910.79e224cf@kernel.org/
one more series of prep needs to get merged, and we'll convert.
-- 
pw-bot: reject

      reply	other threads:[~2024-06-25 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24  7:58 [PATCH] net: core: alloc_netdev_mqs reduce alignment overhead Chris Gregory
2024-06-25 15:29 ` Jakub Kicinski [this message]

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=20240625082900.1928b932@kernel.org \
    --to=kuba@kernel.org \
    --cc=czipperz@gmail.com \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).