diff options
author | Miaohe Lin <[email protected]> | 2022-07-04 21:21:56 +0800 |
---|---|---|
committer | akpm <[email protected]> | 2022-07-17 17:14:46 -0700 |
commit | 0b175468a02d9ae8b97919b4de62ab4da578b520 (patch) | |
tree | 19b25baa77e252518a30694d0fcef12a7d439c0b | |
parent | 3ce4fee4401206cf5a2c476ec0ee6c90191dfade (diff) |
mm/huge_memory: try to free subpage in swapcache when possible
Subpages in swapcache won't be freed even if it is the last user of the
page until next time reclaim. It shouldn't hurt indeed, but we could try
to free these pages to save more memory for system.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: Zach O'Keefe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | mm/huge_memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 266afca39058..de3feb97f0e9 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2538,7 +2538,7 @@ static void __split_huge_page(struct page *page, struct list_head *list, * requires taking the lru_lock so we do the put_page * of the tail pages after the split is complete. */ - put_page(subpage); + free_page_and_swap_cache(subpage); } } |