[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240513120358.1503-1-honggyu.kim@sk.com>
Date: Mon, 13 May 2024 21:03:56 +0900
From: Honggyu Kim <honggyu.kim@...com>
To: SeongJae Park <sj@...nel.org>
Cc: Honggyu Kim <honggyu.kim@...com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-mm@...ck.org,
damon@...ts.linux.dev,
linux-kernel@...r.kernel.org,
kernel_team@...ynix.com
Subject: Re: [RFC PATCH v4 1/5] mm: make alloc_demote_folio externally invokable for migration
On Sun, 12 May 2024 10:54:43 -0700 SeongJae Park <sj@...nel.org> wrote:
> From: Honggyu Kim <honggyu.kim@...com>
>
> The alloc_demote_folio can be used out of vmscan.c so it'd be better to
> remove static keyword from it.
>
> This function can also be used for both demotion and promotion so it'd
> be better to rename it from alloc_demote_folio to alloc_migrate_folio.
This description doesn't match with the changes below.
> Signed-off-by: Honggyu Kim <honggyu.kim@...com>
> Reviewed-by: SeongJae Park <sj@...nel.org>
> Signed-off-by: SeongJae Park <sj@...nel.org>
> ---
> mm/internal.h | 1 +
> mm/vmscan.c | 3 +--
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/internal.h b/mm/internal.h
> index b2c75b12014e..b3ca996a4efc 100644
> --- a/mm/internal.h
> +++ b/mm/internal.h
> @@ -1052,6 +1052,7 @@ extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long,
> unsigned long, unsigned long);
>
> extern void set_pageblock_order(void);
> +struct folio *alloc_demote_folio(struct folio *src, unsigned long private);
I still prefer to rename it to alloc_migrate_folio.
> unsigned long reclaim_pages(struct list_head *folio_list);
> unsigned int reclaim_clean_pages_from_list(struct zone *zone,
> struct list_head *folio_list);
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 6981a71c8ef0..27269bc2bcc5 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -933,8 +933,7 @@ static void folio_check_dirty_writeback(struct folio *folio,
> mapping->a_ops->is_dirty_writeback(folio, dirty, writeback);
> }
>
> -static struct folio *alloc_demote_folio(struct folio *src,
> - unsigned long private)
> +struct folio *alloc_demote_folio(struct folio *src, unsigned long private)
Here as well.
> {
> struct folio *dst;
> nodemask_t *allowed_mask;
> --
> 2.39.2
>
Thanks,
Honggyu
Powered by blists - more mailing lists