mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] rust_binder: charge allocated pages to memcg
@ 2026-10-16 13:30 Alice Ryhl
  2026-10-16 13:30 ` [PATCH 1/2] rust: page: add Page::alloc_page_memcg() Alice Ryhl
  2026-10-16 13:30 ` [PATCH 2/2] rust_binder: charge allocated pages to memcg Alice Ryhl
  0 siblings, 2 replies; 5+ messages in thread
From: Alice Ryhl @ 2026-10-16 13:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Carlos Llamas, Lorenzo Stoakes,
	Liam R. Howlett, T.J. Mercier
  Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Danilo Krummrich,
	Daniel Almeida, Tamir Duberstein, Alexandre Courbot,
	Onur Özkan, linux-mm, rust-for-linux, linux-kernel,
	Alice Ryhl

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@google.com>
---
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@google.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-16 18:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16 13:30 [PATCH 0/2] rust_binder: charge allocated pages to memcg Alice Ryhl
2026-10-16 13:30 ` [PATCH 1/2] rust: page: add Page::alloc_page_memcg() Alice Ryhl
2026-10-16 18:41   ` T.J. Mercier
2026-10-16 13:30 ` [PATCH 2/2] rust_binder: charge allocated pages to memcg Alice Ryhl
2026-10-16 18:41   ` T.J. Mercier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®