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

2017-05-24 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 -v6] mm, swap: Sort swap entries before free

2017-05-24 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