From: Uladzislau Rezki <urezki@gmail.com>
To: Shivam Kalra <shivamkalra98@zohomail.in>
Cc: Uladzislau Rezki <urezki@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Alice Ryhl <aliceryhl@google.com>,
Danilo Krummrich <dakr@kernel.org>
Subject: Re: [PATCH v12 2/5] mm/vmalloc: use physical page count for vrealloc() grow-in-place check
Date: Fri, 8 May 2026 17:27:31 +0200 [thread overview]
Message-ID: <af4A48vNI1RR_Mm-@milan> (raw)
In-Reply-To: <a165e1ed-60ce-4836-bc58-96b4514861b5@zohomail.in>
On Fri, May 08, 2026 at 12:36:18AM +0530, Shivam Kalra wrote:
> On 07/05/26 22:51, Uladzislau Rezki wrote:
> > On Thu, May 07, 2026 at 01:13:35AM +0530, Shivam Kalra wrote:
> > > On 07/05/26 00:17, Uladzislau Rezki wrote:
> > > > Maybe we should consider Fujunjie approach and borrow his idea to shrink VA also?
> > > > In that case, we do not need to switch to vm->nr_pages? And we do not
> > > > need
> > > >
> > > > [PATCH v12 3/5] mm/vmalloc: use physical page count in vread_iter()
> > > >
> > > > ?
> > > >
> > > > --
> > > > Uladzislau Rezki
> > > I didn't want to change the va in this patch series and wanted to keep
> > > it simple.
> > > If we change the va, we will also need to rebalance the rb tree.
> > > I can work on a followup patch series if VA space pressure is critical.
> > >
> > Actually it is not critical. The idea is if we shrink VA then we do not
> > need care much about the size thus keeping vread_iter() unchanged as
> > well as [PATCH v12 2/5]? at least partly.
> >
> > I am find with it anyway.
> >
> > Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> >
> > --
> > Uladzislau Rezki
>
> Thanks for the review.
>
> There's actually one more benefit of this approach for a future
> grow-in-place optimization: since the VA reservation is kept intact
> after a shrink, a subsequent grow wouldn't need to allocate a new
> virtual address range or manipulate the vmap_area tree. It could
> allocate and map new pages directly into the existing VA range.
> So for workloads where shrinking and growing occur frequently,
> this approach lays better groundwork.
>
Fair point, so there are pros and cons.
--
Uladzislau Rezki
next prev parent reply other threads:[~2026-05-08 15:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 20:24 [PATCH v12 0/5] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
2026-04-27 20:24 ` Shivam Kalra via B4 Relay
2026-04-27 20:24 ` [PATCH v12 1/5] mm/vmalloc: extract vm_area_free_pages() helper from vfree() Shivam Kalra
2026-04-27 20:24 ` Shivam Kalra via B4 Relay
2026-05-06 18:32 ` Uladzislau Rezki
2026-04-27 20:24 ` [PATCH v12 2/5] mm/vmalloc: use physical page count for vrealloc() grow-in-place check Shivam Kalra
2026-04-27 20:24 ` Shivam Kalra via B4 Relay
2026-05-06 18:47 ` Uladzislau Rezki
2026-05-06 19:43 ` Shivam Kalra
2026-05-07 17:21 ` Uladzislau Rezki
2026-05-07 19:06 ` Shivam Kalra
2026-05-08 15:27 ` Uladzislau Rezki [this message]
2026-04-27 20:24 ` [PATCH v12 3/5] mm/vmalloc: use physical page count in vread_iter() Shivam Kalra
2026-04-27 20:24 ` Shivam Kalra via B4 Relay
2026-05-06 18:28 ` Uladzislau Rezki
2026-04-27 20:24 ` [PATCH v12 4/5] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
2026-04-27 20:24 ` Shivam Kalra via B4 Relay
2026-05-06 18:27 ` Uladzislau Rezki
2026-04-27 20:24 ` [PATCH v12 5/5] lib/test_vmalloc: add vrealloc test case Shivam Kalra
2026-04-27 20:24 ` Shivam Kalra via B4 Relay
2026-05-05 15:42 ` [PATCH v12 0/5] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
2026-05-09 0:27 ` Andrew Morton
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=af4A48vNI1RR_Mm-@milan \
--to=urezki@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shivamkalra98@zohomail.in \
/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.