[PATCH v2 5/7] mm/compaction: remove repeat compact_blockskip_flush check in reset_isolation_suitable

Kemeng Shi posted 7 patches 2 years, 3 months ago
There is a newer version of this series
[PATCH v2 5/7] mm/compaction: remove repeat compact_blockskip_flush check in reset_isolation_suitable
Posted by Kemeng Shi 2 years, 3 months ago
We have compact_blockskip_flush check in __reset_isolation_suitable, just
remove repeat check before __reset_isolation_suitable in
compact_blockskip_flush.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 mm/compaction.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 2937e754cfb7..89a1b627bc89 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -434,9 +434,7 @@ void reset_isolation_suitable(pg_data_t *pgdat)
 		if (!populated_zone(zone))
 			continue;
 
-		/* Only flush if a full compaction finished recently */
-		if (zone->compact_blockskip_flush)
-			__reset_isolation_suitable(zone);
+		__reset_isolation_suitable(zone);
 	}
 }
 
-- 
2.30.0
Re: [PATCH v2 5/7] mm/compaction: remove repeat compact_blockskip_flush check in reset_isolation_suitable
Posted by Mel Gorman 2 years, 3 months ago
On Sat, Aug 26, 2023 at 11:36:15PM +0800, Kemeng Shi wrote:
> We have compact_blockskip_flush check in __reset_isolation_suitable, just
> remove repeat check before __reset_isolation_suitable in
> compact_blockskip_flush.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

The comment should move to __reset_isolation_suitable but otherwise

Acked-by: Mel Gorman <mgorman@techsingularity.net>

As a complete aside, the reset_isolation_suitable and
__reset_isolation_suitable were badly named because locking is not
involved but it's meaningless churn to fix it.

-- 
Mel Gorman
SUSE Labs
Re: [PATCH v2 5/7] mm/compaction: remove repeat compact_blockskip_flush check in reset_isolation_suitable
Posted by Kemeng Shi 2 years, 3 months ago

on 8/29/2023 11:05 PM, Mel Gorman wrote:
> On Sat, Aug 26, 2023 at 11:36:15PM +0800, Kemeng Shi wrote:
>> We have compact_blockskip_flush check in __reset_isolation_suitable, just
>> remove repeat check before __reset_isolation_suitable in
>> compact_blockskip_flush.
>>
>> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
>> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> 
> The comment should move to __reset_isolation_suitable but otherwise
> 
Thanks for the review, I will move comment in next version.
> Acked-by: Mel Gorman <mgorman@techsingularity.net>
> 
> As a complete aside, the reset_isolation_suitable and
> __reset_isolation_suitable were badly named because locking is not
> involved but it's meaningless churn to fix it.
>