All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Zi Yan <ziy@nvidia.com>, Yang Shi <shy828301@gmail.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Oscar Salvador <osalvador@suse.de>,
	Matthew Wilcox <willy@infradead.org>,
	Bharata B Rao <bharata@amd.com>,
	Alistair Popple <apopple@nvidia.com>,
	haoxin <xhao@linux.alibaba.com>
Subject: Re: [PATCH -v2 0/9] migrate_pages(): batch TLB flushing
Date: Thu, 12 Jan 2023 20:49:19 -0800	[thread overview]
Message-ID: <Y8DizzvFXBSEPzI4@monkey> (raw)
In-Reply-To: <87bkn3rw8v.fsf@yhuang6-desk2.ccr.corp.intel.com>

On 01/13/23 10:42, Huang, Ying wrote:
> Mike Kravetz <mike.kravetz@oracle.com> writes:
> > On 01/12/23 15:17, Huang, Ying wrote:
> >> Mike Kravetz <mike.kravetz@oracle.com> writes:
> >> > On 01/12/23 08:09, Huang, Ying wrote:
> >
> > Isolated to patch,
> > [PATCH -v2 4/9] migrate_pages: split unmap_and_move() to _unmap() and _move()
> >
> > Actually, recreated/isolated by just applying this series to v6.2-rc3 in an
> > effort to eliminate any possible noise in linux-next.
> >
> > Spent a little time looking at modifications made there, but nothing stood out.
> > Will investigate more as time allows.
> 
> Thank you very much!  That's really helpful.
> 
> Checked that patch again, found that there's an issue about non-lru
> pages.  Do you enable zram in your test system?  Can you try the
> below debug patch on top of

CONFIG_ZRAM=y

> 
> [PATCH -v2 4/9] migrate_pages: split unmap_and_move() to _unmap() and _move()
> 
> The following patches in series need to be rebased for the below
> change.  I will test with zram enabled too.

A quick test with below patch on top of [PATCH -v2 4/9] (without the rest of
the series applied) makes the issue go away.  Thanks!
-- 
Mike Kravetz

> 
> Best Regards,
> Huang, Ying
> 
> ---------------------------8<------------------------------------------------------
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 4c35c2a49574..7153d954b8a2 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1187,10 +1187,13 @@ static int __migrate_folio_move(struct folio *src, struct folio *dst,
>  	int rc;
>  	int page_was_mapped = 0;
>  	struct anon_vma *anon_vma = NULL;
> +	bool is_lru = !__PageMovable(&src->page);
>  
>  	__migrate_folio_extract(dst, &page_was_mapped, &anon_vma);
>  
>  	rc = move_to_new_folio(dst, src, mode);
> +	if (!unlikely(is_lru))
> +		goto out_unlock_both;
>  
>  	/*
>  	 * When successful, push dst to LRU immediately: so that if it
> @@ -1211,6 +1214,7 @@ static int __migrate_folio_move(struct folio *src, struct folio *dst,
>  		remove_migration_ptes(src,
>  			rc == MIGRATEPAGE_SUCCESS ? dst : src, false);
>  
> +out_unlock_both:
>  	folio_unlock(dst);
>  	/* Drop an anon_vma reference if we took one */
>  	if (anon_vma)


  reply	other threads:[~2023-01-13  4:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10  7:53 [PATCH -v2 0/9] migrate_pages(): batch TLB flushing Huang Ying
2023-01-10  7:53 ` [PATCH -v2 1/9] migrate_pages: organize stats with struct migrate_pages_stats Huang Ying
2023-01-10 10:03   ` Baolin Wang
2023-01-11  2:15     ` Huang, Ying
2023-01-10  7:53 ` [PATCH -v2 2/9] migrate_pages: separate hugetlb folios migration Huang Ying
2023-01-10 10:30   ` Baolin Wang
2023-01-11  2:04     ` Huang, Ying
2023-01-10  7:53 ` [PATCH -v2 3/9] migrate_pages: restrict number of pages to migrate in batch Huang Ying
2023-01-11  3:19   ` Baolin Wang
2023-01-10  7:53 ` [PATCH -v2 4/9] migrate_pages: split unmap_and_move() to _unmap() and _move() Huang Ying
2023-01-11  3:29   ` Baolin Wang
2023-01-10  7:53 ` [PATCH -v2 5/9] migrate_pages: batch _unmap and _move Huang Ying
2023-01-10  7:53 ` [PATCH -v2 6/9] migrate_pages: move migrate_folio_unmap() Huang Ying
2023-01-10  7:53 ` [PATCH -v2 7/9] migrate_pages: share more code between _unmap and _move Huang Ying
2023-01-10  7:53 ` [PATCH -v2 8/9] migrate_pages: batch flushing TLB Huang Ying
2023-01-10  7:53 ` [PATCH -v2 9/9] migrate_pages: move THP/hugetlb migration support check to simplify code Huang Ying
2023-01-11  1:53 ` [PATCH -v2 0/9] migrate_pages(): batch TLB flushing Mike Kravetz
2023-01-11 22:21   ` Mike Kravetz
2023-01-12  0:09     ` Huang, Ying
2023-01-12  2:15       ` Mike Kravetz
2023-01-12  7:17         ` Huang, Ying
2023-01-13  0:11           ` Mike Kravetz
2023-01-13  2:42             ` Huang, Ying
2023-01-13  4:49               ` Mike Kravetz [this message]
2023-01-13  5:39                 ` Huang, Ying
2023-01-16  4:35               ` Matthew Wilcox
2023-01-16  6:05                 ` Huang, Ying

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=Y8DizzvFXBSEPzI4@monkey \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bharata@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=shy828301@gmail.com \
    --cc=willy@infradead.org \
    --cc=xhao@linux.alibaba.com \
    --cc=ying.huang@intel.com \
    --cc=ziy@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.