linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: yangge1116@126.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, 21cnbao@gmail.com,
	baolin.wang@linux.alibaba.com, mgorman@techsingularity.net,
	liuzixing@hygon.cn
Subject: Re: [PATCH] mm/page_alloc: add one PCP list for THP
Date: Wed, 19 Jun 2024 18:01:49 -0700	[thread overview]
Message-ID: <20240619180149.c043cce3f1f84db02fe24f5f@linux-foundation.org> (raw)
In-Reply-To: <1718801672-30152-1-git-send-email-yangge1116@126.com>

On Wed, 19 Jun 2024 20:54:32 +0800 yangge1116@126.com wrote:

> From: yangge <yangge1116@126.com>
> 
> Since commit 5d0a661d808f ("mm/page_alloc: use only one PCP list for
> THP-sized allocations") no longer differentiates the migration type
> of pages in THP-sized PCP list, it's possible that non-movable
> allocation requests may get a CMA page from the list, in some cases,
> it's not acceptable.
> 
> If a large number of CMA memory are configured in system (for
> example, the CMA memory accounts for 50% of the system memory),
> starting a virtual machine with device passthrough will get stuck.
> During starting the virtual machine, it will call
> pin_user_pages_remote(..., FOLL_LONGTERM, ...) to pin memory. Normally
> if a page is present and in CMA area, pin_user_pages_remote() will
> migrate the page from CMA area to non-CMA area because of
> FOLL_LONGTERM flag. But if non-movable allocation requests return
> CMA memory, migrate_longterm_unpinnable_pages() will migrate a CMA
> page to another CMA page, which will fail to pass the check in
> check_and_migrate_movable_pages() and cause migration endless.
> Call trace:

Thanks.  I'll add this for testing - please send us a new version which
addresses Barry's comments.


  parent reply	other threads:[~2024-06-20  1:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 12:54 yangge1116
2024-06-19 22:28 ` Barry Song
2024-06-20  0:33   ` Ge Yang
2024-06-20  1:01 ` Andrew Morton [this message]
2024-06-20  1:07   ` Ge Yang
2024-07-05  9:27 ` Mel Gorman
  -- strict thread matches above, loose matches on Subject: below --
2024-06-19  9:48 yangge1116
2024-06-19 10:13 ` Barry Song
2024-06-19 11:09   ` Ge Yang
2024-06-19  8:21 yangge1116

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=20240619180149.c043cce3f1f84db02fe24f5f@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=21cnbao@gmail.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuzixing@hygon.cn \
    --cc=mgorman@techsingularity.net \
    --cc=stable@vger.kernel.org \
    --cc=yangge1116@126.com \
    /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