Re: [PATCH 2/3] mm/util.c: make vm_memory_committed() more accurate

2020-05-15 Thread Feng Tang
On Fri, May 15, 2020 at 05:04:40PM +0800, Michal Hocko wrote: > On Fri 15-05-20 16:11:09, Feng Tang wrote: > > On Fri, May 15, 2020 at 03:23:07PM +0800, Michal Hocko wrote: > > > On Fri 08-05-20 15:25:16, Feng Tang wrote: > > > > percpu_counter_sum_positive() will provide more accurate info. > > >

Re: [PATCH 2/3] mm/util.c: make vm_memory_committed() more accurate

2020-05-15 Thread Michal Hocko
On Fri 15-05-20 16:11:09, Feng Tang wrote: > On Fri, May 15, 2020 at 03:23:07PM +0800, Michal Hocko wrote: > > On Fri 08-05-20 15:25:16, Feng Tang wrote: > > > percpu_counter_sum_positive() will provide more accurate info. > > > > Why do we need that? > > This is a preparation for patch 3/3, whic

Re: [PATCH 2/3] mm/util.c: make vm_memory_committed() more accurate

2020-05-15 Thread Feng Tang
On Fri, May 15, 2020 at 03:23:07PM +0800, Michal Hocko wrote: > On Fri 08-05-20 15:25:16, Feng Tang wrote: > > percpu_counter_sum_positive() will provide more accurate info. > > Why do we need that? This is a preparation for patch 3/3, which will enlarge the batch size of percpu-counter 'vm_commi

Re: [PATCH 2/3] mm/util.c: make vm_memory_committed() more accurate

2020-05-15 Thread Michal Hocko
On Fri 08-05-20 15:25:16, Feng Tang wrote: > percpu_counter_sum_positive() will provide more accurate info. Why do we need that? > Its time cost is about 800 nanoseconds on a 2C/4T platform and > 2~3 microseconds on a 2S/36C/72T server in normal case, and in > worst case where vm_committed_as's s

[PATCH 2/3] mm/util.c: make vm_memory_committed() more accurate

2020-05-08 Thread Feng Tang
percpu_counter_sum_positive() will provide more accurate info. Its time cost is about 800 nanoseconds on a 2C/4T platform and 2~3 microseconds on a 2S/36C/72T server in normal case, and in worst case where vm_committed_as's spinlock is under severe contention, it costs 30~40 microseconds for the 2