All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] block: partitions: replace __get_free_page() with kmalloc()
Date: Mon, 25 May 2026 23:27:33 -0700	[thread overview]
Message-ID: <ahU9VQAxZE_jXi28@infradead.org> (raw)
In-Reply-To: <ahQX_JCgS9JWIhY-@kernel.org>

On Mon, May 25, 2026 at 12:35:56PM +0300, Mike Rapoport wrote:
> > This does, but it still fails to explain why kmalloc performs just as
> > well as __get_free_page(s) these days.
> 
> I don't think that in this case - a single allocation on the cold path -
> the performance difference is even measurable.

Well, please state that.

> Nevertheless allocations from slab caches are way faster than
> __get_free_page() (i.e.  alloc_pages()) as it's essentially lockless
> cmpxchg. Allocations that need to refill the cache do alloc_pages() with a
> little of slab bookkeeping overhead.

Please state that too.


  reply	other threads:[~2026-05-26  6:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20  8:15 [PATCH] block: partitions: replace __get_free_page() with kmalloc() Mike Rapoport (Microsoft)
2026-05-25  6:08 ` Christoph Hellwig
2026-05-25  6:52   ` Mike Rapoport
2026-05-25  7:16     ` Christoph Hellwig
2026-05-25  9:35       ` Mike Rapoport
2026-05-26  6:27         ` Christoph Hellwig [this message]
2026-05-26 12:07         ` Vlastimil Babka
2026-05-26 14:37           ` Matthew Wilcox
2026-05-26 20:57             ` Vlastimil Babka
2026-05-27 10:04               ` Hannes Reinecke
2026-05-27 13:11                 ` Christoph Hellwig
2026-05-27 13:16                   ` Hannes Reinecke

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=ahU9VQAxZE_jXi28@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.