Skip to contentSkip to conversation

mm/swap: free swap slots in batch

PATCH New [email protected] 1 participant 1 message Feb 22, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 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.

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]>

---

 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
diff -puN include/linux/swap.h~mm-swap-free-swap-slots-in-batch include/linux/swap.h
@@ -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

_