linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Barry Song <21cnbao@gmail.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, Barry Song <v-songbaohua@oppo.com>,
	Ryan Roberts <ryan.roberts@arm.com>
Subject: Re: [PATCH] mm/vmscan: drop checking if _deferred_list is empty before using TTU_SYNC
Date: Mon, 1 Jul 2024 10:51:08 +0200	[thread overview]
Message-ID: <81d768d4-6d37-4d73-a1a4-39950a663105@redhat.com> (raw)
In-Reply-To: <20240629234155.53524-1-21cnbao@gmail.com>

On 30.06.24 01:41, Barry Song wrote:
> From: Barry Song <v-songbaohua@oppo.com>
> 
> The optimization of list_empty(&folio->_deferred_list) aimed to prevent
> increasing the PTL duration when a large folio is partially unmapped,
> for example, from subpage 0 to subpage (nr - 2).
> 
> But Ryan's commit 5ed890ce5147 ("mm: vmscan: avoid split during
> shrink_folio_list()") actually splits this kind of large folios. This
> makes the "optimization" useless.
> 
> Signed-off-by: Barry Song <v-songbaohua@oppo.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Ryan Roberts <ryan.roberts@arm.com>
> ---
>   -v1
>   * I remember David and Ryan once suggested that this check could be dropped
>     while the patch was being pulled into mm-unstable. However, for some reason,
>     I forgot to request squashing this change.
> 
>   mm/vmscan.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 3d4c681c6d40..0761f91b407f 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1291,7 +1291,7 @@ static unsigned int shrink_folio_list(struct list_head *folio_list,
>   			 * try_to_unmap acquire PTL from the first PTE,
>   			 * eliminating the influence of temporary PTE values.
>   			 */
> -			if (folio_test_large(folio) && list_empty(&folio->_deferred_list))
> +			if (folio_test_large(folio))
>   				flags |= TTU_SYNC;
>   
>   			try_to_unmap(folio, flags);

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb



      parent reply	other threads:[~2024-07-01  8:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-29 23:41 Barry Song
2024-07-01  8:48 ` Ryan Roberts
2024-07-01  9:35   ` Barry Song
2024-07-02  6:32     ` Andrew Morton
2024-07-01  8:51 ` David Hildenbrand [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=81d768d4-6d37-4d73-a1a4-39950a663105@redhat.com \
    --to=david@redhat.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=v-songbaohua@oppo.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