mm/ksm: convert chain series funcs and replace get_ksm_page
In ksm stable tree all page are single, let's convert them to use and folios as well as stable_tree_insert/stable_tree_search funcs. And replace get_ksm_page() by ksm_get_folio() since there is no more needs. It could save a few compound_head calls. Link: https://lkml.kernel.org/r/20240411061713.1847574-9-alexs@kernel.org Signed-off-by: Alex Shi (tencent) <alexs@kernel.org> Cc: Izik Eidus <izik.eidus@ravellosystems.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Chris Wright <chrisw@sous-sol.org> Cc: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
40d707f33d
commit
79899cce33
+1
-1
@@ -616,7 +616,7 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)
|
||||
folio_migrate_ksm(newfolio, folio);
|
||||
/*
|
||||
* Please do not reorder this without considering how mm/ksm.c's
|
||||
* get_ksm_page() depends upon ksm_migrate_page() and PageSwapCache().
|
||||
* ksm_get_folio() depends upon ksm_migrate_page() and PageSwapCache().
|
||||
*/
|
||||
if (folio_test_swapcache(folio))
|
||||
folio_clear_swapcache(folio);
|
||||
|
||||
Reference in New Issue
Block a user