mm: Remove redundant condition for THP folio
Subsystems (2)
PATCH 1/1 mm: Remove redundant condition for THP folio
folio_test_pmd_mappable() implies folio_test_large(), therefore, simplify the expression for is_thp.
--- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/migrate.c +1 -1
@@ -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 ();
Signature · 1 line
2.30.2
Quoted 4 lines · Dev Jain
folio_test_pmd_mappable()impliesfolio_test_large(), therefore, simplify the expression foris_thp.Signed-off-by Dev Jain <[email protected]>
Quoted 13 lines · Dev Jain
folio_test_pmd_mappable()impliesfolio_test_large(), therefore, simplify the expression foris_thp.Signed-off-by Dev Jain <[email protected]>--- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/migrate.c +0
-0
mm/migrate.c static int migrate_pages_batch(struct list_head *from, · line 1737
Quoted 8 lines
mm/migrate.c +1
-1@@ -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 ();
Signature · 3 lines
Cheers, David / dhildenb
Zi Yan
reviewerQuoted 8 lines · Dev Jain
folio_test_pmd_mappable()impliesfolio_test_large(), therefore, simplify the expression foris_thp.Signed-off-by Dev Jain <[email protected]>--- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
LGTM. Thanks. Reviewed-by: Zi Yan <[email protected]>
Best Regards,
Yan, Zi
Quoted 13 lines · Dev Jain
folio_test_pmd_mappable()impliesfolio_test_large(), therefore, simplify the expression foris_thp.Signed-off-by Dev Jain <[email protected]>--- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/migrate.c +0
-0
mm/migrate.c static int migrate_pages_batch(struct list_head *from, · line 1737
Quoted 8 lines
mm/migrate.c +1
-1@@ -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 ();