* [PATCH] mm: Remove redundant condition for THP folio
@ 2024-10-18 9:41 Dev Jain
2024-10-18 10:48 ` Matthew Wilcox
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dev Jain @ 2024-10-18 9:41 UTC (permalink / raw)
To: akpm, david, willy; +Cc: ziy, ying.huang, linux-kernel, linux-mm, Dev Jain
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: Remove redundant condition for THP folio
2024-10-18 9:41 [PATCH] mm: Remove redundant condition for THP folio Dev Jain
@ 2024-10-18 10:48 ` Matthew Wilcox
2024-10-18 10:50 ` David Hildenbrand
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2024-10-18 10:48 UTC (permalink / raw)
To: Dev Jain; +Cc: akpm, david, ziy, ying.huang, linux-kernel, linux-mm
On Fri, Oct 18, 2024 at 03:11:51PM +0530, 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>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: Remove redundant condition for THP folio
2024-10-18 9:41 [PATCH] mm: Remove redundant condition for THP folio Dev Jain
2024-10-18 10:48 ` Matthew Wilcox
@ 2024-10-18 10:50 ` David Hildenbrand
2024-10-18 15:58 ` Zi Yan
2024-10-22 5:23 ` Anshuman Khandual
3 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand @ 2024-10-18 10:50 UTC (permalink / raw)
To: Dev Jain, akpm, willy; +Cc: ziy, ying.huang, linux-kernel, linux-mm
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: Remove redundant condition for THP folio
2024-10-18 9:41 [PATCH] mm: Remove redundant condition for THP folio Dev Jain
2024-10-18 10:48 ` Matthew Wilcox
2024-10-18 10:50 ` David Hildenbrand
@ 2024-10-18 15:58 ` Zi Yan
2024-10-22 5:23 ` Anshuman Khandual
3 siblings, 0 replies; 5+ messages in thread
From: Zi Yan @ 2024-10-18 15:58 UTC (permalink / raw)
To: Dev Jain; +Cc: akpm, david, willy, ying.huang, linux-kernel, linux-mm
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
On 18 Oct 2024, at 5: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(-)
>
LGTM. Thanks. Reviewed-by: Zi Yan <ziy@nvidia.com>
Best Regards,
Yan, Zi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: Remove redundant condition for THP folio
2024-10-18 9:41 [PATCH] mm: Remove redundant condition for THP folio Dev Jain
` (2 preceding siblings ...)
2024-10-18 15:58 ` Zi Yan
@ 2024-10-22 5:23 ` Anshuman Khandual
3 siblings, 0 replies; 5+ messages in thread
From: Anshuman Khandual @ 2024-10-22 5:23 UTC (permalink / raw)
To: Dev Jain, akpm, david, willy; +Cc: ziy, ying.huang, linux-kernel, linux-mm
On 10/18/24 15:11, 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();
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-22 5:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-18 9:41 [PATCH] mm: Remove redundant condition for THP folio Dev Jain
2024-10-18 10:48 ` Matthew Wilcox
2024-10-18 10:50 ` David Hildenbrand
2024-10-18 15:58 ` Zi Yan
2024-10-22 5:23 ` Anshuman Khandual
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox