From: Dev Jain <dev.jain@arm.com>
To: akpm@linux-foundation.org, david@redhat.com, willy@infradead.org
Cc: ziy@nvidia.com, ying.huang@intel.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Dev Jain <dev.jain@arm.com>
Subject: [PATCH] mm: Remove redundant condition for THP folio
Date: Fri, 18 Oct 2024 15:11:51 +0530 [thread overview]
Message-ID: <20241018094151.3458-1-dev.jain@arm.com> (raw)
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();
--
2.30.2
next reply other threads:[~2024-10-18 9:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 9:41 Dev Jain [this message]
2024-10-18 10:48 ` [PATCH] mm: Remove redundant condition for THP folio Matthew Wilcox
2024-10-18 10:50 ` David Hildenbrand
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=20241018094151.3458-1-dev.jain@arm.com \
--to=dev.jain@arm.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.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 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.