lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+KHdyWezxoLH_HbJNYfXhSG0axdRpH5Ax9of8=g9zJwk0Z2TQ@mail.gmail.com>
Date: Wed, 17 Dec 2025 12:53:08 +0100
From: Uladzislau Rezki <urezki@...il.com>
To: Dev Jain <dev.jain@....com>
Cc: Baoquan He <bhe@...hat.com>, linux-mm@...ck.org, 
	Andrew Morton <akpm@...ux-foundation.org>, Vishal Moola <vishal.moola@...il.com>, 
	Ryan Roberts <ryan.roberts@....com>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] mm/vmalloc: Add attempt_larger_order_alloc parameter

Hello, Jain!

>> (btw, I had resent my RFC, in case you missed!)
I have not :) I saw that. Give me some time.

--
Uladzislau Rezki

On Wed, Dec 17, 2025 at 12:49 PM Dev Jain <dev.jain@....com> wrote:
>
>
> 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



-- 
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ