Re: [PATCH v5 3/9] mm/swap: Split swap cache into 64MB trunks

2017-01-12 Thread Tim Chen
On Wed, Jan 11, 2017 at 03:19:37PM -0800, Andi Kleen wrote: > > Switching from a single radix-tree to an array of radix-trees to reduce > > contention seems a bit hacky. That we can do this and have everything > > continue to work tells me that we're simply using an inappropriate data > > structur

Re: [PATCH v5 3/9] mm/swap: Split swap cache into 64MB trunks

2017-01-11 Thread Andi Kleen
> Switching from a single radix-tree to an array of radix-trees to reduce > contention seems a bit hacky. That we can do this and have everything > continue to work tells me that we're simply using an inappropriate data > structure to hold this info. What would you use instead? A tree with fine

Re: [PATCH v5 3/9] mm/swap: Split swap cache into 64MB trunks

2017-01-11 Thread Andrew Morton
On Wed, 11 Jan 2017 09:55:13 -0800 Tim Chen wrote: > The patch is to improve the scalability of the swap out/in via using > fine grained locks for the swap cache. In current kernel, one address > space will be used for each swap device. And in the common > configuration, the number of the swap