From: David Hildenbrand <david@redhat.com>
To: Dev Jain <dev.jain@arm.com>,
akpm@linux-foundation.org, willy@infradead.org
Cc: ziy@nvidia.com, ying.huang@intel.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: Remove redundant condition for THP folio
Date: Fri, 18 Oct 2024 12:50:20 +0200 [thread overview]
Message-ID: <f6f62ef5-a57e-44d3-94be-d5472d2c55ca@redhat.com> (raw)
In-Reply-To: <20241018094151.3458-1-dev.jain@arm.com>
On 18.10.24 11:41, Dev Jain wrote:
> folio_test_pmd_mappable() implies folio_test_large(), therefore,
> simplify the expression for is_thp.
>
> Signed-off-by: Dev Jain <dev.jain@arm.com>
> ---
> mm/migrate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index df91248755e4..b43e7b105559 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1731,7 +1731,7 @@ static int migrate_pages_batch(struct list_head *from,
>
> list_for_each_entry_safe(folio, folio2, from, lru) {
> is_large = folio_test_large(folio);
> - is_thp = is_large && folio_test_pmd_mappable(folio);
> + is_thp = folio_test_pmd_mappable(folio);
> nr_pages = folio_nr_pages(folio);
>
> cond_resched();
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-10-18 10:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 9:41 Dev Jain
2024-10-18 10:48 ` Matthew Wilcox
2024-10-18 10:50 ` David Hildenbrand [this message]
2024-10-18 15:58 ` Zi Yan
2024-10-22 5:23 ` Anshuman Khandual
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=f6f62ef5-a57e-44d3-94be-d5472d2c55ca@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dev.jain@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox