mbox series

[v2,0/2] Two minor cleanups for compaction

Message ID 20230721150957.2058634-1-shikemeng@huawei.com (mailing list archive)
Headers show
Series Two minor cleanups for compaction | expand

Message

Kemeng Shi July 21, 2023, 3:09 p.m. UTC
v1->v2:
 collect reviewed-by from Baolin to patch 2.

This series contains two random cleanups for compaction.
Patch 1 correct wrong comment in fast_isolate_freepages.
Patch 2 avoid to call unneeded pageblock_end_pfn when no_set_skip_hint
is set.
Thanks!

Kemeng Shi (2):
  mm/compaction: correct comment of candidate pfn in
    fast_isolate_freepages
  mm/compaction: avoid unneeded pageblock_end_pfn when no_set_skip_hint
    is set

 mm/compaction.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Baolin Wang July 31, 2023, 3:13 a.m. UTC | #1
On 7/21/2023 11:09 PM, Kemeng Shi wrote:
> If no preferred one was not found, we will use candidate page with maximum
> pfn > min_pfn which is saved in high_pfn. Correct "minimum" to "maximum
> candidate" in comment.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huawei.com>

Yes, the 'minimum' can be confused. At least to me, it looks good.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
>   mm/compaction.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index eb1d3d9a422c..c0d8d08fc163 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1526,7 +1526,7 @@ static void fast_isolate_freepages(struct compact_control *cc)
>   				break;
>   		}
>   
> -		/* Use a minimum pfn if a preferred one was not found */
> +		/* Use a maximum candidate pfn if a preferred one was not found */
>   		if (!page && high_pfn) {
>   			page = pfn_to_page(high_pfn);
>