[lkml]   [2020]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 2/4] mm: memcontrol/slab: use helpers to access slab page's memcg_data
On Fri, Oct 2, 2020 at 10:26 AM Roman Gushchin <> wrote:
> To gather all direct accesses to struct page's memcg_data field
> in one place, let's introduce 3 new helpers to use in the slab
> accounting code:
> struct obj_cgroup **page_objcgs(struct page *page);
> struct obj_cgroup **page_objcgs_check(struct page *page);
> bool set_page_objcgs(struct page *page, struct obj_cgroup **objcgs);
> They are similar to the corresponding API for generic pages, except
> that the setter can return false, indicating that the value has been
> already set from a different thread.
> Signed-off-by: Roman Gushchin <>
> Acked-by: Johannes Weiner <>

Reviewed-by: Shakeel Butt <>

 \ /
  Last update: 2020-10-05 17:13    [W:0.109 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site