Re: [External] Re: [PATCH v3 7/7] mm: memcontrol: make the slab calculation consistent

2020-12-15 Thread Muchun Song
On Tue, Dec 15, 2020 at 9:35 PM Michal Hocko wrote: > > On Tue 08-12-20 12:18:47, Muchun Song wrote: > > Although the ratio of the slab is one, we also should read the ratio > > from the related memory_stats instead of hard-coding. And the local > > variable of size is already the value of

Re: [PATCH v3 7/7] mm: memcontrol: make the slab calculation consistent

2020-12-15 Thread Michal Hocko
On Tue 08-12-20 12:18:47, Muchun Song wrote: > Although the ratio of the slab is one, we also should read the ratio > from the related memory_stats instead of hard-coding. And the local > variable of size is already the value of slab_unreclaimable. So we > do not need to read again. > > We can

Re: [External] Re: [PATCH v3 7/7] mm: memcontrol: make the slab calculation consistent

2020-12-07 Thread Muchun Song
On Tue, Dec 8, 2020 at 3:21 PM Pankaj Gupta wrote: > > > Although the ratio of the slab is one, we also should read the ratio > > from the related memory_stats instead of hard-coding. And the local > > variable of size is already the value of slab_unreclaimable. So we > > do not need to read

Re: [PATCH v3 7/7] mm: memcontrol: make the slab calculation consistent

2020-12-07 Thread Pankaj Gupta
> Although the ratio of the slab is one, we also should read the ratio > from the related memory_stats instead of hard-coding. And the local > variable of size is already the value of slab_unreclaimable. So we > do not need to read again. > > We can drop the ratio in struct memory_stat. This can

[PATCH v3 7/7] mm: memcontrol: make the slab calculation consistent

2020-12-07 Thread Muchun Song
Although the ratio of the slab is one, we also should read the ratio from the related memory_stats instead of hard-coding. And the local variable of size is already the value of slab_unreclaimable. So we do not need to read again. We can drop the ratio in struct memory_stat. This can make the