linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: remove redundant check in page_vma_mapped_walk
Date: Tue, 4 Jul 2023 10:05:48 -0700	[thread overview]
Message-ID: <20230704100548.11bce56bb79be4a7d1d8482c@linux-foundation.org> (raw)
In-Reply-To: <20230704213932.1339204-2-shikemeng@huaweicloud.com>

On Wed,  5 Jul 2023 05:39:31 +0800 Kemeng Shi <shikemeng@huaweicloud.com> wrote:

> For PVMW_SYNC case, we always take pte lock when get first pte of
> PTE-mapped THP in map_pte and hold it until:
> 1. scan of pmd range finished or
> 2. scan of user input range finished or
> 3. user stop walk with page_vma_mapped_walk_done.
> In each case. pte lock will not be freed during middle scan of PTE-mapped
> THP.
> 
> ...
>
> --- a/mm/page_vma_mapped.c
> +++ b/mm/page_vma_mapped.c
> @@ -275,10 +275,6 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
>  				goto restart;
>  			}
>  			pvmw->pte++;
> -			if ((pvmw->flags & PVMW_SYNC) && !pvmw->ptl) {
> -				pvmw->ptl = pte_lockptr(mm, pvmw->pmd);
> -				spin_lock(pvmw->ptl);
> -			}
>  		} while (pte_none(*pvmw->pte));
>  
>  		if (!pvmw->ptl) {

This code has changed significantly since 6.4.  Please develop against
the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm, thanks.



       reply	other threads:[~2023-07-04 17:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230704213932.1339204-1-shikemeng@huaweicloud.com>
     [not found] ` <20230704213932.1339204-2-shikemeng@huaweicloud.com>
2023-07-04 17:05   ` Andrew Morton [this message]
2023-07-06  2:37     ` Kemeng Shi

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=20230704100548.11bce56bb79be4a7d1d8482c@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shikemeng@huaweicloud.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