Messages in this thread | | | From | Shakeel Butt <> | Date | Thu, 11 Mar 2021 10:56:02 -0800 | Subject | Re: [PATCH v3 1/4] mm: memcontrol: introduce obj_cgroup_{un}charge_pages |
| |
On Tue, Mar 9, 2021 at 2:09 AM Muchun Song <songmuchun@bytedance.com> wrote: > > We know that the unit of slab object charging is bytes, the unit of > kmem page charging is PAGE_SIZE. If we want to reuse obj_cgroup APIs > to charge the kmem pages, we should pass PAGE_SIZE (as third parameter) > to obj_cgroup_charge(). Because the size is already PAGE_SIZE, we can > skip touch the objcg stock. And obj_cgroup_{un}charge_pages() are > introduced to charge in units of page level. > > In the later patch, we also can reuse those two helpers to charge or > uncharge a number of kernel pages to a object cgroup. This is just > a code movement without any functional changes. > > Signed-off-by: Muchun Song <songmuchun@bytedance.com> > Acked-by: Roman Gushchin <guro@fb.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
| |