Re: [PATCH -mm -v2] mm, swap: Sort swap entries before free

2017-04-05 Thread Huang, Ying
Rik van Riel writes: > On Wed, 2017-04-05 at 15:10 +0800, Huang, Ying wrote: >> To solve the issue, the per-CPU buffer is sorted according to the >> swap >> device before freeing the swap entries.  Test shows that the time >> spent by swapcache_free_entries() could be reduced

Re: [PATCH -mm -v2] mm, swap: Sort swap entries before free

2017-04-05 Thread Huang, Ying
Rik van Riel writes: > On Wed, 2017-04-05 at 15:10 +0800, Huang, Ying wrote: >> To solve the issue, the per-CPU buffer is sorted according to the >> swap >> device before freeing the swap entries.  Test shows that the time >> spent by swapcache_free_entries() could be reduced after the patch. >

Re: [PATCH -mm -v2] mm, swap: Sort swap entries before free

2017-04-05 Thread Rik van Riel
On Wed, 2017-04-05 at 15:10 +0800, Huang, Ying wrote: > To solve the issue, the per-CPU buffer is sorted according to the > swap > device before freeing the swap entries.  Test shows that the time > spent by swapcache_free_entries() could be reduced after the patch. That makes a lot of sense. >

Re: [PATCH -mm -v2] mm, swap: Sort swap entries before free

2017-04-05 Thread Rik van Riel
On Wed, 2017-04-05 at 15:10 +0800, Huang, Ying wrote: > To solve the issue, the per-CPU buffer is sorted according to the > swap > device before freeing the swap entries.  Test shows that the time > spent by swapcache_free_entries() could be reduced after the patch. That makes a lot of sense. >

[PATCH -mm -v2] mm, swap: Sort swap entries before free

2017-04-05 Thread Huang, Ying
From: Huang Ying To reduce the lock contention of swap_info_struct->lock when freeing swap entry. The freed swap entries will be collected in a per-CPU buffer firstly, and be really freed later in batch. During the batch freeing, if the consecutive swap entries in the

[PATCH -mm -v2] mm, swap: Sort swap entries before free

2017-04-05 Thread Huang, Ying
From: Huang Ying To reduce the lock contention of swap_info_struct->lock when freeing swap entry. The freed swap entries will be collected in a per-CPU buffer firstly, and be really freed later in batch. During the batch freeing, if the consecutive swap entries in the per-CPU buffer belongs to