Commit cd0d3e27 authored by Hugh Dickins's avatar Hugh Dickins Committed by Liu Shixin
Browse files

mm: simplify folio_migrate_mapping()

mainline inclusion
from mainline-v6.11-rc1
commit a5ea521250afdf3d70c72970660f44aebf56ea19
category: performance
bugzilla: https://gitee.com/openeuler/kernel/issues/IAHY3K

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5ea521250afdf3d70c72970660f44aebf56ea19

--------------------------------

Now that folio_undo_large_rmappable() is an inline function checking
order and large_rmappable for itself (and __folio_undo_large_rmappable()
is now declared even when CONFIG_TRANASPARENT_HUGEPAGE is off) there is
no need for folio_migrate_mapping() to check large and large_rmappable
first (in the mapping case when it has had to freeze anyway).

Link: https://lkml.kernel.org/r/68feee73-050e-8e98-7a3a-abf78738d92c@google.com


Signed-off-by: default avatarHugh Dickins <hughd@google.com>
Reviewed-by: default avatarZi Yan <ziy@nvidia.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
parent ae577de7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -441,7 +441,6 @@ int folio_migrate_mapping(struct address_space *mapping,
	}

	/* Take off deferred split queue while frozen and memcg set */
	if (folio_test_large(folio) && folio_test_large_rmappable(folio))
	folio_undo_large_rmappable(folio);

	/*