Re: [External] Re: [PATCH v4 4/5] mm: memcontrol: use obj_cgroup APIs to charge kmem pages

2021-03-19 Thread Muchun Song
On Fri, Mar 19, 2021 at 9:59 PM Shakeel Butt wrote: > > On Thu, Mar 18, 2021 at 9:05 PM Muchun Song wrote: > > > > On Fri, Mar 19, 2021 at 11:40 AM Shakeel Butt wrote: > > > > > > On Thu, Mar 18, 2021 at 4:08 AM Muchun Song > > > wrote: > > > > > > > [...] > > > > > > > > +static inline

Re: [External] Re: [PATCH v4 4/5] mm: memcontrol: use obj_cgroup APIs to charge kmem pages

2021-03-19 Thread Shakeel Butt
On Thu, Mar 18, 2021 at 9:05 PM Muchun Song wrote: > > On Fri, Mar 19, 2021 at 11:40 AM Shakeel Butt wrote: > > > > On Thu, Mar 18, 2021 at 4:08 AM Muchun Song > > wrote: > > > > > [...] > > > > > > +static inline struct mem_cgroup *get_obj_cgroup_memcg(struct obj_cgroup > > > *objcg) > > > >

Re: [External] Re: [PATCH v4 4/5] mm: memcontrol: use obj_cgroup APIs to charge kmem pages

2021-03-18 Thread Muchun Song
On Fri, Mar 19, 2021 at 11:40 AM Shakeel Butt wrote: > > On Thu, Mar 18, 2021 at 4:08 AM Muchun Song wrote: > > > [...] > > > > +static inline struct mem_cgroup *get_obj_cgroup_memcg(struct obj_cgroup > > *objcg) > > I would prefer get_mem_cgroup_from_objcg(). Inspired by obj_cgroup_memcg()

Re: [PATCH v4 4/5] mm: memcontrol: use obj_cgroup APIs to charge kmem pages

2021-03-18 Thread Shakeel Butt
On Thu, Mar 18, 2021 at 4:08 AM Muchun Song wrote: > [...] > > +static inline struct mem_cgroup *get_obj_cgroup_memcg(struct obj_cgroup > *objcg) I would prefer get_mem_cgroup_from_objcg(). > +{ > + struct mem_cgroup *memcg; > + > + rcu_read_lock(); > +retry: > + memcg =

Re: [PATCH v4 4/5] mm: memcontrol: use obj_cgroup APIs to charge kmem pages

2021-03-18 Thread Johannes Weiner
On Thu, Mar 18, 2021 at 07:06:57PM +0800, Muchun Song wrote: > Since Roman series "The new cgroup slab memory controller" applied. All > slab objects are charged via the new APIs of obj_cgroup. The new APIs > introduce a struct obj_cgroup to charge slab objects. It prevents > long-living objects

[PATCH v4 4/5] mm: memcontrol: use obj_cgroup APIs to charge kmem pages

2021-03-18 Thread Muchun Song
Since Roman series "The new cgroup slab memory controller" applied. All slab objects are charged via the new APIs of obj_cgroup. The new APIs introduce a struct obj_cgroup to charge slab objects. It prevents long-living objects from pinning the original memory cgroup in the memory. But there are