The patch titled Subject: mm-fix-shmem-thp-counters-on-migration-v3 has been added to the -mm mm-unstable branch. Its filename is mm-fix-shmem-thp-counters-on-migration-v3.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-fix-shmem-thp-counters-on-migration-v3.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Jan Glauber <jglauber@xxxxxxxxxxxxxxxx> Subject: mm-fix-shmem-thp-counters-on-migration-v3 Date: Thu, 22 Jun 2023 11:47:20 +0200 use folio_test_pmd_mappable instead of folio_test_transhuge Link: https://lkml.kernel.org/r/20230622094720.510540-1-jglauber@xxxxxxxxxxxxxxxx Signed-off-by: Jan Glauber <jglauber@xxxxxxxxxxxxxxxx> Cc: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/migrate.c~mm-fix-shmem-thp-counters-on-migration-v3 +++ a/mm/migrate.c @@ -487,7 +487,7 @@ int folio_migrate_mapping(struct address __mod_lruvec_state(old_lruvec, NR_SHMEM, -nr); __mod_lruvec_state(new_lruvec, NR_SHMEM, nr); - if (folio_test_transhuge(folio)) { + if (folio_test_pmd_mappable(folio)) { __mod_lruvec_state(old_lruvec, NR_SHMEM_THPS, -nr); __mod_lruvec_state(new_lruvec, NR_SHMEM_THPS, nr); } _ Patches currently in -mm which might be from jglauber@xxxxxxxxxxxxxxxx are mm-fix-shmem-thp-counters-on-migration.patch mm-fix-shmem-thp-counters-on-migration-v3.patch