Re: [PATCH] mm: Fix shmem THP counters on migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux