From: Uladzislau Rezki <urezki@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Matthew Wilcox <willy@infradead.org>,
Nicholas Piggin <npiggin@gmail.com>,
Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>
Subject: Re: [PATCH 0/5] Reduce a vmalloc internal lock contention preparation work
Date: Wed, 8 Jun 2022 12:05:50 +0200 [thread overview]
Message-ID: <CA+KHdyUgdVUrvMONTNkPZi-wKLk_6jzfa4NNTaKoHBAdyX3spg@mail.gmail.com> (raw)
In-Reply-To: <20220607153544.7727e87f669ea3a7c9f4a6b5@linux-foundation.org>
>
> I can toss it in for some runtime testing, but...
>
> What lock are we talking about here, what is the magnitude of the
> performance issues it is causing and what is the status of the patch
> which uses all this preparation?
>
1.
The vmalloc still uses the global lock in order to access to the global
vmap space. As for magnitude it depends on number of CPUs, higher
number higher contention. Linear dependence.
2.
I am not aware about performance issues which i run into on my setup,
from the other hand there is a "Per cpu kva allocator" built on top of
vmalloc. See vm_map_ram() vm_unmap_ram(). Having vmalloc-per
CPU we can get rid of it.
It is used by the XFS, f2fs and some drivers. The reason is that a
vmalloc is costly due to internal global lock. That is why those users
go with "Per cpu kva allocator" to accelerate their workloads.
3.
My synthetic test shows a big difference between per-CPU vmalloc
patches and default variant. I have different prototypes based on
various ways how to make it per-CPU. I still do not have a fully solution
that satisfies all the needs. But i do not think it is possible due to many
constraints.
4.
This series is not tighten to future per-cpu-vmalloc patches, it is rather
makes the vmalloc code to be more generic as a result of such common
code it would be easier to extend it to per-cpu variant.
It means if per-cpu is not in place it is not needed to be reverted back.
That is the status.
--
Uladzislau Rezki
prev parent reply other threads:[~2022-06-08 10:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 9:34 Uladzislau Rezki (Sony)
2022-06-07 9:34 ` [PATCH 1/5] mm/vmalloc: Make link_va()/unlink_va() common to different rb_root Uladzislau Rezki (Sony)
2022-06-08 3:45 ` Baoquan He
2022-06-07 9:34 ` [PATCH 2/5] mm/vmalloc: Extend __alloc_vmap_area() with extra arguments Uladzislau Rezki (Sony)
2022-06-07 9:49 ` Christoph Hellwig
2022-06-07 13:02 ` Uladzislau Rezki
2022-06-10 8:18 ` Christoph Hellwig
2022-06-08 3:46 ` Baoquan He
2022-06-07 9:34 ` [PATCH 3/5] mm/vmalloc: Initialize VA's list node after unlink Uladzislau Rezki (Sony)
2022-06-08 3:19 ` Baoquan He
2022-06-09 12:36 ` Uladzislau Rezki
2022-06-09 13:30 ` Baoquan He
2022-06-09 13:53 ` Uladzislau Rezki
2022-06-07 9:34 ` [PATCH 4/5] mm/vmalloc: Extend __find_vmap_area() with one more argument Uladzislau Rezki (Sony)
2022-06-07 9:47 ` Christoph Hellwig
2022-06-07 13:03 ` Uladzislau Rezki
2022-06-08 3:47 ` Baoquan He
2022-06-07 9:34 ` [PATCH 5/5] lib/test_vmalloc: Switch to prandom_u32() Uladzislau Rezki (Sony)
2022-06-07 22:35 ` [PATCH 0/5] Reduce a vmalloc internal lock contention preparation work Andrew Morton
2022-06-08 10:05 ` Uladzislau Rezki [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=CA+KHdyUgdVUrvMONTNkPZi-wKLk_6jzfa4NNTaKoHBAdyX3spg@mail.gmail.com \
--to=urezki@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@gmail.com \
--cc=oleksiy.avramchenko@sony.com \
--cc=willy@infradead.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