[PATCH] Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-04-06 Thread Shakeel Butt
On Thu, Mar 15, 2018 at 10:49 AM, Michal Hocko wrote: > Charging path is still a _hot path_. Especially when the kmem accounting > is enabled by default. You cannot simply downplay the overhead. We have > _one_ user but all users should pay the price. This is simply hard to >

[PATCH] Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-04-06 Thread Shakeel Butt
On Thu, Mar 15, 2018 at 10:49 AM, Michal Hocko wrote: > Charging path is still a _hot path_. Especially when the kmem accounting > is enabled by default. You cannot simply downplay the overhead. We have > _one_ user but all users should pay the price. This is simply hard to > justify. Maybe we

Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-03-15 Thread Shakeel Butt
On Thu, Mar 15, 2018 at 10:49 AM, Michal Hocko wrote: > On Tue 13-03-18 10:55:18, Shakeel Butt wrote: >> On Tue, Mar 13, 2018 at 6:49 AM, Michal Hocko wrote: >> > On Wed 21-02-18 14:37:56, Shakeel Butt wrote: >> > [...] >> >> +#ifdef CONFIG_MEMCG >> >>

Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-03-15 Thread Shakeel Butt
On Thu, Mar 15, 2018 at 10:49 AM, Michal Hocko wrote: > On Tue 13-03-18 10:55:18, Shakeel Butt wrote: >> On Tue, Mar 13, 2018 at 6:49 AM, Michal Hocko wrote: >> > On Wed 21-02-18 14:37:56, Shakeel Butt wrote: >> > [...] >> >> +#ifdef CONFIG_MEMCG >> >> +static inline struct mem_cgroup

Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-03-15 Thread Michal Hocko
On Tue 13-03-18 10:55:18, Shakeel Butt wrote: > On Tue, Mar 13, 2018 at 6:49 AM, Michal Hocko wrote: > > On Wed 21-02-18 14:37:56, Shakeel Butt wrote: > > [...] > >> +#ifdef CONFIG_MEMCG > >> +static inline struct mem_cgroup *memalloc_memcg_save(struct mem_cgroup > >> *memcg)

Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-03-15 Thread Michal Hocko
On Tue 13-03-18 10:55:18, Shakeel Butt wrote: > On Tue, Mar 13, 2018 at 6:49 AM, Michal Hocko wrote: > > On Wed 21-02-18 14:37:56, Shakeel Butt wrote: > > [...] > >> +#ifdef CONFIG_MEMCG > >> +static inline struct mem_cgroup *memalloc_memcg_save(struct mem_cgroup > >> *memcg) > >> +{ > >> +

Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-03-13 Thread Shakeel Butt
On Tue, Mar 13, 2018 at 6:49 AM, Michal Hocko wrote: > On Wed 21-02-18 14:37:56, Shakeel Butt wrote: > [...] >> +#ifdef CONFIG_MEMCG >> +static inline struct mem_cgroup *memalloc_memcg_save(struct mem_cgroup >> *memcg) >> +{ >> + struct mem_cgroup *old_memcg =

Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-03-13 Thread Shakeel Butt
On Tue, Mar 13, 2018 at 6:49 AM, Michal Hocko wrote: > On Wed 21-02-18 14:37:56, Shakeel Butt wrote: > [...] >> +#ifdef CONFIG_MEMCG >> +static inline struct mem_cgroup *memalloc_memcg_save(struct mem_cgroup >> *memcg) >> +{ >> + struct mem_cgroup *old_memcg = current->target_memcg; >> +

Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-03-13 Thread Michal Hocko
On Wed 21-02-18 14:37:56, Shakeel Butt wrote: [...] > +#ifdef CONFIG_MEMCG > +static inline struct mem_cgroup *memalloc_memcg_save(struct mem_cgroup > *memcg) > +{ > + struct mem_cgroup *old_memcg = current->target_memcg; > + current->target_memcg = memcg; > + return old_memcg; > +}

Re: [PATCH v3 1/2] mm: memcg: remote memcg charging for kmem allocations

2018-03-13 Thread Michal Hocko
On Wed 21-02-18 14:37:56, Shakeel Butt wrote: [...] > +#ifdef CONFIG_MEMCG > +static inline struct mem_cgroup *memalloc_memcg_save(struct mem_cgroup > *memcg) > +{ > + struct mem_cgroup *old_memcg = current->target_memcg; > + current->target_memcg = memcg; > + return old_memcg; > +}