On Mon, Jun 19, 2023 at 8:40 AM Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> wrote:
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 01cac26a3127..d2ba786ea105 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -492,6 +492,11 @@ int folio_migrate_mapping(struct address_space *mapping,
> if (folio_test_swapbacked(folio) && !folio_test_swapcache(folio)) {
> __mod_lruvec_state(old_lruvec, NR_SHMEM, -nr);
> __mod_lruvec_state(new_lruvec, NR_SHMEM, nr);
> +
> + if (folio_test_transhuge(folio)) {
> + __mod_lruvec_state(old_lruvec, NR_SHMEM_THP, -nr);
> + __mod_lruvec_state(new_lruvec, NR_SHMEM_THP, nr);
Should be NR_SHMEM_THPS.
Sorry, was testing the change on another system. Will send a new patch.
--Jan