linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dev Jain <dev.jain@arm.com>
To: Uladzislau Rezki <urezki@gmail.com>, Baoquan He <bhe@redhat.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Vishal Moola <vishal.moola@gmail.com>,
	Ryan Roberts <ryan.roberts@arm.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] mm/vmalloc: Add attempt_larger_order_alloc parameter
Date: Wed, 17 Dec 2025 17:19:13 +0530	[thread overview]
Message-ID: <1329f4ad-5fe1-41e8-97f4-0b58caf86fce@arm.com> (raw)
In-Reply-To: <aUKXs_3bxLyMvTgu@milan>


On 17/12/25 5:14 pm, Uladzislau Rezki wrote:
> On Wed, Dec 17, 2025 at 11:54:26AM +0800, Baoquan He wrote:
>> Hi Uladzislau,
>>
>> On 12/16/25 at 10:19pm, Uladzislau Rezki (Sony) wrote:
>>> Introduce a module parameter to enable or disable the large-order
>>> allocation path in vmalloc. High-order allocations are disabled by
>>> default so far, but users may explicitly enable them at runtime if
>>> desired.
>>>
>>> High-order pages allocated for vmalloc are immediately split into
>>> order-0 pages and later freed as order-0, which means they do not
>>> feed the per-CPU page caches. As a result, high-order attempts tend
>> I don't get why order-0 do not feed the PCP caches.
>>
> "they" -> high-order pages. I should improve it.
>
>>> to bypass the PCP fastpath and fall back to the buddy allocator that
>>> can affect performance.
>>>
>>> However, when the PCP caches are empty, high-order allocations may
>>> show better performance characteristics especially for larger
>>> allocation requests.
>> And when PCP is empty, high-order alloc show better performance. Could
>> you please help elaborate a little more about them? Thanks.
>>
> This is what i/we measured. See below example:
>
> # default order-3
> Summary: fix_size_alloc_test passed: 1 failed: 0 xfailed: 0 repeat: 1 loops: 1000000 avg: 3718592 usec
> Summary: fix_size_alloc_test passed: 1 failed: 0 xfailed: 0 repeat: 1 loops: 1000000 avg: 3740495 usec
> Summary: fix_size_alloc_test passed: 1 failed: 0 xfailed: 0 repeat: 1 loops: 1000000 avg: 3737213 usec
> Summary: fix_size_alloc_test passed: 1 failed: 0 xfailed: 0 repeat: 1 loops: 1000000 avg: 3740765 usec
>
> # patch order-3
> Summary: fix_size_alloc_test passed: 1 failed: 0 xfailed: 0 repeat: 1 loops: 1000000 avg: 3350391 usec
> Summary: fix_size_alloc_test passed: 1 failed: 0 xfailed: 0 repeat: 1 loops: 1000000 avg: 3374568 usec
> Summary: fix_size_alloc_test passed: 1 failed: 0 xfailed: 0 repeat: 1 loops: 1000000 avg: 3286374 usec
> Summary: fix_size_alloc_test passed: 1 failed: 0 xfailed: 0 repeat: 1 loops: 1000000 avg: 3261335 usec
>
> why higher-order wins, i think it is less cyclesto get one big chunk from the
> buddy instead of looping and pick one by one.

I have the same observation that getting a higher-order chunk is faster than bulk allocating basepages.
(btw, I had resent my RFC, in case you missed!)

>
> --
> Uladzislau Rezki


  reply	other threads:[~2025-12-17 11:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16 21:19 [PATCH 1/2] mm/vmalloc: Add large-order allocation helper Uladzislau Rezki (Sony)
2025-12-16 21:19 ` [PATCH 2/2] mm/vmalloc: Add attempt_larger_order_alloc parameter Uladzislau Rezki (Sony)
2025-12-16 23:36   ` Andrew Morton
2025-12-17 11:37     ` Uladzislau Rezki
2025-12-17  3:54   ` Baoquan He
2025-12-17 11:44     ` Uladzislau Rezki
2025-12-17 11:49       ` Dev Jain [this message]
2025-12-17 11:53         ` Uladzislau Rezki
2025-12-18 10:34       ` Baoquan He
2025-12-17  8:27   ` Ryan Roberts
2025-12-17 12:02     ` Uladzislau Rezki
2025-12-17 15:20       ` Ryan Roberts
2025-12-17 17:01         ` Ryan Roberts
2025-12-17 19:22           ` Uladzislau Rezki
2025-12-18 11:12             ` Ryan Roberts
2025-12-18 11:33               ` Uladzislau Rezki
2025-12-17 20:08           ` Uladzislau Rezki
2025-12-18 11:14             ` Ryan Roberts
2025-12-18 11:29               ` Uladzislau Rezki
2025-12-18  4:55         ` Dev Jain
2025-12-18 11:53           ` Ryan Roberts
2025-12-18 11:56             ` Ryan Roberts
2025-12-19  8:33               ` David Hildenbrand (Red Hat)
2025-12-19 11:17                 ` Ryan Roberts
2025-12-19  0:34             ` Vishal Moola (Oracle)
2025-12-19 11:23               ` Ryan Roberts
2025-12-24  6:35             ` Dev Jain

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=1329f4ad-5fe1-41e8-97f4-0b58caf86fce@arm.com \
    --to=dev.jain@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=urezki@gmail.com \
    --cc=vishal.moola@gmail.com \
    /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