Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2017-01-04 Thread Minchan Kim
Hi, On Thu, Jan 05, 2017 at 09:33:55AM +0800, Huang, Ying wrote: > Hi, Minchan, > > Minchan Kim writes: > [snip] > > > > The patchset has used several techniqueus to reduce lock contention, for > > example, > > batching alloc/free, fine-grained lock and cluster distribution to avoid > > cache

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2017-01-04 Thread Huang, Ying
Minchan Kim writes: > Hi, > > On Thu, Jan 05, 2017 at 09:33:55AM +0800, Huang, Ying wrote: >> Hi, Minchan, >> >> Minchan Kim writes: >> [snip] >> > >> > The patchset has used several techniqueus to reduce lock contention, for >> > example, >> > batching alloc/free, fine-grained lock and cluste

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2017-01-04 Thread Minchan Kim
Hi Huang, On Tue, Jan 03, 2017 at 01:43:43PM +0800, Huang, Ying wrote: > Hi, Minchan, > > Minchan Kim writes: > > > Hi Jan, > > > > On Mon, Jan 02, 2017 at 04:48:41PM +0100, Jan Kara wrote: > >> Hi, > >> > >> On Tue 27-12-16 16:45:03, Minchan Kim wrote: > >> > > Patch 3 splits the swap cache r

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2017-01-04 Thread Huang, Ying
Hi, Minchan, Minchan Kim writes: [snip] > > The patchset has used several techniqueus to reduce lock contention, for > example, > batching alloc/free, fine-grained lock and cluster distribution to avoid cache > false-sharing. Each items has different complexity and benefits so could you > show t

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2017-01-03 Thread Tim Chen
On Tue, 2017-01-03 at 13:34 +0900, Minchan Kim wrote: > Hi Jan, > > On Mon, Jan 02, 2017 at 04:48:41PM +0100, Jan Kara wrote: > > > > Hi, > > > > On Tue 27-12-16 16:45:03, Minchan Kim wrote: > > > > > > > > > > > Patch 3 splits the swap cache radix tree into 64MB chunks, reducing > > > >  

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2017-01-02 Thread Huang, Ying
Hi, Minchan, Minchan Kim writes: > Hi Jan, > > On Mon, Jan 02, 2017 at 04:48:41PM +0100, Jan Kara wrote: >> Hi, >> >> On Tue 27-12-16 16:45:03, Minchan Kim wrote: >> > > Patch 3 splits the swap cache radix tree into 64MB chunks, reducing >> > > the rate that we have to contende for the

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2017-01-02 Thread Minchan Kim
Hi Jan, On Mon, Jan 02, 2017 at 04:48:41PM +0100, Jan Kara wrote: > Hi, > > On Tue 27-12-16 16:45:03, Minchan Kim wrote: > > > Patch 3 splits the swap cache radix tree into 64MB chunks, reducing > > > the rate that we have to contende for the radix tree. > > > > To me, it's rather hacky.

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2017-01-02 Thread Jan Kara
Hi, On Tue 27-12-16 16:45:03, Minchan Kim wrote: > > Patch 3 splits the swap cache radix tree into 64MB chunks, reducing > > the rate that we have to contende for the radix tree. > > To me, it's rather hacky. I think it might be common problem for page cache > so can we think another gene

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2016-12-27 Thread Huang, Ying
Minchan Kim writes: > On Wed, Dec 28, 2016 at 11:31:06AM +0800, Huang, Ying wrote: > > < snip > > >> >>> > Frankly speaking, although I'm huge user of bit_spin_lock(zram/zsmalloc >> >>> > have used it heavily), I don't like swap subsystem uses it. >> >>> > During zram development, it really hurts

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2016-12-27 Thread Minchan Kim
On Wed, Dec 28, 2016 at 11:31:06AM +0800, Huang, Ying wrote: < snip > > >>> > Frankly speaking, although I'm huge user of bit_spin_lock(zram/zsmalloc > >>> > have used it heavily), I don't like swap subsystem uses it. > >>> > During zram development, it really hurts debugging due to losing > >>>

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2016-12-27 Thread Huang, Ying
"Huang, Ying" writes: > Minchan Kim writes: > >> Hi Huang, >> >> On Wed, Dec 28, 2016 at 09:54:27AM +0800, Huang, Ying wrote: >> >> < snip > >> >>> > The patchset has used several techniqueus to reduce lock contention, for >>> > example, >>> > batching alloc/free, fine-grained lock and cluster

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2016-12-27 Thread Huang, Ying
Minchan Kim writes: > Hi Huang, > > On Wed, Dec 28, 2016 at 09:54:27AM +0800, Huang, Ying wrote: > > < snip > > >> > The patchset has used several techniqueus to reduce lock contention, for >> > example, >> > batching alloc/free, fine-grained lock and cluster distribution to avoid >> > cache >>

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2016-12-27 Thread Minchan Kim
Hi Huang, On Wed, Dec 28, 2016 at 09:54:27AM +0800, Huang, Ying wrote: < snip > > > The patchset has used several techniqueus to reduce lock contention, for > > example, > > batching alloc/free, fine-grained lock and cluster distribution to avoid > > cache > > false-sharing. Each items has dif

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2016-12-27 Thread Huang, Ying
Hi, Minchan, Minchan Kim writes: > Hi, > > On Fri, Dec 09, 2016 at 01:09:13PM -0800, Tim Chen wrote: >> Change Log: >> v4: >> 1. Fix a bug in unlock cluster in add_swap_count_continuation(). We >> should use unlock_cluster() instead of unlock_cluser_or_swap_info(). >> 2. During swap off, handle

Re: [PATCH v4 0/9] mm/swap: Regular page swap optimizations

2016-12-26 Thread Minchan Kim
Hi, On Fri, Dec 09, 2016 at 01:09:13PM -0800, Tim Chen wrote: > Change Log: > v4: > 1. Fix a bug in unlock cluster in add_swap_count_continuation(). We > should use unlock_cluster() instead of unlock_cluser_or_swap_info(). > 2. During swap off, handle race when swap slot is marked unused but alloc