Re: [PATCH] mm: kmemleak: Turn kmemleak_lock to spin lock and RCU primitives

2019-01-07 Thread Paul E. McKenney
On Mon, Jan 07, 2019 at 03:31:18PM +0800, He Zhe wrote: > > > On 1/5/19 2:37 AM, Catalin Marinas wrote: > > On Fri, Jan 04, 2019 at 10:29:13PM +0800, zhe...@windriver.com wrote: > >> It's not necessary to keep consistency between readers and writers of > >> kmemleak_lock. RCU is more proper for t

Re: [PATCH] mm: kmemleak: Turn kmemleak_lock to spin lock and RCU primitives

2019-01-07 Thread Catalin Marinas
On Mon, Jan 07, 2019 at 03:31:18PM +0800, He Zhe wrote: > On 1/5/19 2:37 AM, Catalin Marinas wrote: > > On Fri, Jan 04, 2019 at 10:29:13PM +0800, zhe...@windriver.com wrote: > >> It's not necessary to keep consistency between readers and writers of > >> kmemleak_lock. RCU is more proper for this ca

Re: [PATCH] mm: kmemleak: Turn kmemleak_lock to spin lock and RCU primitives

2019-01-06 Thread He Zhe
On 1/5/19 2:37 AM, Catalin Marinas wrote: > On Fri, Jan 04, 2019 at 10:29:13PM +0800, zhe...@windriver.com wrote: >> It's not necessary to keep consistency between readers and writers of >> kmemleak_lock. RCU is more proper for this case. And in order to gain better >> performance, we turn the r

Re: [PATCH] mm: kmemleak: Turn kmemleak_lock to spin lock and RCU primitives

2019-01-04 Thread Catalin Marinas
On Fri, Jan 04, 2019 at 10:29:13PM +0800, zhe...@windriver.com wrote: > It's not necessary to keep consistency between readers and writers of > kmemleak_lock. RCU is more proper for this case. And in order to gain better > performance, we turn the reader locks to RCU read locks and writer locks to

[PATCH] mm: kmemleak: Turn kmemleak_lock to spin lock and RCU primitives

2019-01-04 Thread zhe.he
From: He Zhe It's not necessary to keep consistency between readers and writers of kmemleak_lock. RCU is more proper for this case. And in order to gain better performance, we turn the reader locks to RCU read locks and writer locks to normal spin locks. "time echo scan > /sys/kernel/debug/kmeml