linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH] mm/migrate: fix NR_ISOLATED corruption on 64-bit
Date: Wed, 28 Jul 2021 16:44:13 -0700	[thread overview]
Message-ID: <CAHbLzkrBa=hr+7PaUeVMZdtNK1mR80jRMcSd=Z3e8=nSAJ7_Ew@mail.gmail.com> (raw)
In-Reply-To: <20210728042531.359409-1-aneesh.kumar@linux.ibm.com>

On Tue, Jul 27, 2021 at 9:25 PM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:
>
> Similar to commit 2da9f6305f30 ("mm/vmscan: fix NR_ISOLATED_FILE corruption on 64-bit")
> avoid using unsigned int for nr_pages. With unsigned int type the large
> unsigned int converts to a large positive signed long.
>
> Symptoms include CMA allocations hanging forever
> due to alloc_contig_range->...->isolate_migratepages_block waiting
> forever in "while (unlikely(too_many_isolated(pgdat)))".
>
> Fixes: c5fc5c3ae0c8 ("mm: migrate: account THP NUMA migration counters correctly")
> Cc: Yang Shi <shy828301@gmail.com>
> Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

It seems Andrew picked this one. Either one is fine to me.
Reviewed-by: Yang Shi <shy828301@gmail.com>

> ---
>  mm/migrate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 34a9ad3e0a4f..7e240437e7d9 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -2068,7 +2068,7 @@ int migrate_misplaced_page(struct page *page, struct vm_area_struct *vma,
>         LIST_HEAD(migratepages);
>         new_page_t *new;
>         bool compound;
> -       unsigned int nr_pages = thp_nr_pages(page);
> +       int nr_pages = thp_nr_pages(page);
>
>         /*
>          * PTE mapped THP or HugeTLB page can't reach here so the page could
> --
> 2.31.1
>


      parent reply	other threads:[~2021-07-28 23:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28  4:25 Aneesh Kumar K.V
2021-07-28  8:19 ` David Hildenbrand
2021-07-28 23:44 ` Yang Shi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHbLzkrBa=hr+7PaUeVMZdtNK1mR80jRMcSd=Z3e8=nSAJ7_Ew@mail.gmail.com' \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox