From: Alice Ryhl <aliceryhl@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: shivamkalra98@zohomail.in,
Shivam Kalra via B4 Relay
<devnull+shivamkalra98.zohomail.in@kernel.org>,
Uladzislau Rezki <urezki@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Danilo Krummrich <dakr@kernel.org>
Subject: Re: [PATCH v8 0/6] mm/vmalloc: free unused pages on vrealloc() shrink
Date: Mon, 30 Mar 2026 08:05:44 +0000 [thread overview]
Message-ID: <acou2CsZOUQPx5nW@google.com> (raw)
In-Reply-To: <20260327113758.75f04588310a707b4d4b1aac@linux-foundation.org>
On Fri, Mar 27, 2026 at 11:37:58AM -0700, Andrew Morton wrote:
> On Fri, 27 Mar 2026 15:18:36 +0530 Shivam Kalra via B4 Relay <devnull+shivamkalra98.zohomail.in@kernel.org> wrote:
>
> > This series implements the TODO in vrealloc() to unmap and free unused
> > pages when shrinking across a page boundary.
>
> Thanks. I'd prefer to defer this until the next -rc cycle
> (https://lkml.kernel.org/r/20260323202941.08ddf2b0411501cae801ab4c@linux-foundation.org).
> If Ulad would prefer that we push ahead then OK.
That's fine. No rush from my side.
> Are we able to describe how much memory this change might save under
> various scenarios? If the savings are impressively large then that
> would get attention.
The primary purpose of this is to ensure that this scenario is not
possible:
* There is a global list in the Binder driver. It's an array allocated
using kvmalloc and resized on demand using kvrealloc.
* A process decides to add a bajillion elements to that global list.
* The process exits, taking its entries with it.
* The global list now remains extremely large for no good reason.
I don't know if it would save a significant amount of memory for
well-behaved programs.
Alice
next prev parent reply other threads:[~2026-03-30 8:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 9:48 [PATCH v8 0/6] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
2026-03-27 9:48 ` Shivam Kalra via B4 Relay
2026-03-27 9:48 ` [PATCH v8 1/6] mm/vmalloc: extract vm_area_free_pages() helper from vfree() Shivam Kalra
2026-03-27 9:48 ` Shivam Kalra via B4 Relay
2026-03-31 17:44 ` Uladzislau Rezki
2026-03-27 9:48 ` [PATCH v8 2/6] mm/vmalloc: fix vrealloc() grow-in-place check Shivam Kalra
2026-03-27 9:48 ` Shivam Kalra via B4 Relay
2026-03-27 9:48 ` [PATCH v8 3/6] mm/vmalloc: zero newly exposed memory on vrealloc() grow Shivam Kalra
2026-03-27 9:48 ` Shivam Kalra via B4 Relay
2026-03-27 9:48 ` [PATCH v8 4/6] mm/vmalloc: use READ_ONCE() for vmalloc nr_pages status readers Shivam Kalra
2026-03-27 9:48 ` Shivam Kalra via B4 Relay
2026-03-31 17:43 ` Uladzislau Rezki
2026-03-27 9:48 ` [PATCH v8 5/6] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
2026-03-27 9:48 ` Shivam Kalra via B4 Relay
2026-03-27 9:48 ` [PATCH v8 6/6] lib/test_vmalloc: add vrealloc test case Shivam Kalra
2026-03-27 9:48 ` Shivam Kalra via B4 Relay
2026-03-31 17:45 ` Uladzislau Rezki
2026-03-27 18:37 ` [PATCH v8 0/6] mm/vmalloc: free unused pages on vrealloc() shrink Andrew Morton
2026-03-27 19:31 ` Danilo Krummrich
2026-03-30 8:05 ` Alice Ryhl [this message]
2026-03-30 12:27 ` Uladzislau Rezki
2026-03-31 17:15 ` Shivam Kalra
2026-03-31 17:50 ` Uladzislau Rezki
2026-03-31 19:23 ` Shivam Kalra
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=acou2CsZOUQPx5nW@google.com \
--to=aliceryhl@google.com \
--cc=akpm@linux-foundation.org \
--cc=dakr@kernel.org \
--cc=devnull+shivamkalra98.zohomail.in@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shivamkalra98@zohomail.in \
--cc=urezki@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 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.