Thread (15 messages) 15 messages, 4 authors, 2020-11-18

Re: [PATCH v9 6/9] secretmem: add memcg accounting

flat view

From: Shakeel Butt <hidden>
Date: 2020-11-17 20:02:37
Also in: linux-arch, linux-arm-kernel, linux-fsdevel, linux-kselftest, linux-mm, linux-riscv, lkml, nvdimm

On Tue, Nov 17, 2020 at 11:49 AM Roman Gushchin [off-list ref] wrote:
On Tue, Nov 17, 2020 at 06:29:29PM +0200, Mike Rapoport wrote:
quoted
From: Mike Rapoport <redacted>

Account memory consumed by secretmem to memcg. The accounting is updated
when the memory is actually allocated and freed.

Signed-off-by: Mike Rapoport <redacted>
[snip]
quoted

+static int secretmem_account_pages(struct page *page, gfp_t gfp, int order)
+{
+     int err;
+
+     err = memcg_kmem_charge_page(page, gfp, order);
I haven't looked at the whole series but it seems like these pages
will be mapped into the userspace, so this patch has dependency on
Roman's "mm: allow mapping
accounted kernel pages to userspace" patch series.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help