Re: [External] [PATCH v4 5/5] mm/memcg: Improve refill_obj_stock() performance

2021-04-19 Thread Waiman Long
On 4/19/21 2:06 AM, Muchun Song wrote: On Mon, Apr 19, 2021 at 8:01 AM Waiman Long wrote: There are two issues with the current refill_obj_stock() code. First of all, when nr_bytes reaches over PAGE_SIZE, it calls drain_obj_stock() to atomically flush out remaining bytes to obj_cgroup, clear ca

Re: [External] [PATCH v4 5/5] mm/memcg: Improve refill_obj_stock() performance

2021-04-19 Thread Waiman Long
On 4/19/21 11:00 AM, Shakeel Butt wrote: On Sun, Apr 18, 2021 at 11:07 PM Muchun Song wrote: On Mon, Apr 19, 2021 at 8:01 AM Waiman Long wrote: There are two issues with the current refill_obj_stock() code. First of all, when nr_bytes reaches over PAGE_SIZE, it calls drain_obj_stock() to atom

Re: [External] [PATCH v4 5/5] mm/memcg: Improve refill_obj_stock() performance

2021-04-19 Thread Shakeel Butt
On Sun, Apr 18, 2021 at 11:07 PM Muchun Song wrote: > > On Mon, Apr 19, 2021 at 8:01 AM Waiman Long wrote: > > > > There are two issues with the current refill_obj_stock() code. First of > > all, when nr_bytes reaches over PAGE_SIZE, it calls drain_obj_stock() to > > atomically flush out remainin

Re: [External] [PATCH v4 5/5] mm/memcg: Improve refill_obj_stock() performance

2021-04-18 Thread Muchun Song
On Mon, Apr 19, 2021 at 8:01 AM Waiman Long wrote: > > There are two issues with the current refill_obj_stock() code. First of > all, when nr_bytes reaches over PAGE_SIZE, it calls drain_obj_stock() to > atomically flush out remaining bytes to obj_cgroup, clear cached_objcg > and do a obj_cgroup_p

[PATCH v4 5/5] mm/memcg: Improve refill_obj_stock() performance

2021-04-18 Thread Waiman Long
There are two issues with the current refill_obj_stock() code. First of all, when nr_bytes reaches over PAGE_SIZE, it calls drain_obj_stock() to atomically flush out remaining bytes to obj_cgroup, clear cached_objcg and do a obj_cgroup_put(). It is likely that the same obj_cgroup will be used again