[PATCH 0/2] rust_binder: charge allocated pages to memcg
From: Alice Ryhl
Date: Fri Oct 16 2026 - 09:30:42 EST
Pages allocated by the Rust Binder driver and mapped into a process's
VMA are currently not accounted to any memory cgroup. Add
`Page::alloc_page_memcg()` (using `put_page()` on drop so folios are
uncharged when freed), and use it to charge newly allocated binder pages
to the target process's `mm_struct`.
Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
---
Alice Ryhl (2):
rust: page: add Page::alloc_page_memcg()
rust_binder: charge allocated pages to memcg
drivers/android/binder/page_range.rs | 13 ++++++++--
rust/helpers/page.c | 17 ++++++++++++
rust/kernel/page.rs | 50 +++++++++++++++++++++++++++++++++++-
3 files changed, 77 insertions(+), 3 deletions(-)
---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
change-id: 20261014-binder-memcg-b42cb9f1098d
Best regards,
--
Alice Ryhl <aliceryhl@xxxxxxxxxx>