mm/swap: free swap slots in batch
Subsystems (2)
[email protected]
maintainerPATCH 117/142 mm/swap: free swap slots in batch
From: Tim Chen <[email protected]>
Subject: mm/swap: free swap slots in batch
Add new functions that free unused swap slots in batches without the need to reacquire swap info lock. This improves scalability and reduce lock contention.
Link http://lkml.kernel.org/r/c25e0fcdfd237ec4ca7db91631d3b9f6ed23824e.1484082593.git.tim.c.chen@linux.intel.com open here
Signed-off-by Tim Chen <[email protected]>
Signed-off-by "Huang, Ying" <[email protected]>
Cc Aaron Lu <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Hillf Danton <[email protected]>
Cc Huang Ying <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Jonathan Corbet <[email protected]> escreveu:
Cc Kirill A. Shutemov <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Shaohua Li <[email protected]>
Cc Vladimir Davydov <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
include/linux/swap.h | 1 mm/swapfile.c | 157 ++++++++++++++++++++++++----------------- 2 files changed, 96 insertions(+), 62 deletions(-)
include/linux/swap.h renamed from include/linux/swap.h~mm-swap-free-swap-slots-in-batch +1 -0
@@ -394,6 +394,7 @@ extern int swap_duplicate(swp_entry_t);extern int swapcache_prepare (swp_entry_t );extern void swap_free (swp_entry_t );extern void swapcache_free (swp_entry_t ); +extern void swapcache_free_entries (swp_entry_t *entries,int n);extern int free_swap_and_cache (swp_entry_t );extern int swap_type_of (dev_t ,sector_t ,struct block_device **);extern unsigned int count_swap_pages (int ,int );
mm/swapfile.c renamed from mm/swapfile.c~mm-swap-free-swap-slots-in-batch +95 -62
213 lines not on this page · raw message
_