Commit e5797dc0 authored by Miaohe Lin's avatar Miaohe Lin Committed by Andrew Morton

mm: vmscan: mark kswapd_run() and kswapd_stop() __meminit

Add __meminit to kswapd_run() and kswapd_stop() to ensure they're default
to __init when memory hotplug is not enabled.

Link: https://lkml.kernel.org/r/20230606121813.242163-1-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Acked-by: default avatarYu Zhao <yuzhao@google.com>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent e52ee4cc
...@@ -460,8 +460,8 @@ static inline bool node_reclaim_enabled(void) ...@@ -460,8 +460,8 @@ static inline bool node_reclaim_enabled(void)
void check_move_unevictable_folios(struct folio_batch *fbatch); void check_move_unevictable_folios(struct folio_batch *fbatch);
void check_move_unevictable_pages(struct pagevec *pvec); void check_move_unevictable_pages(struct pagevec *pvec);
extern void kswapd_run(int nid); extern void __meminit kswapd_run(int nid);
extern void kswapd_stop(int nid); extern void __meminit kswapd_stop(int nid);
#ifdef CONFIG_SWAP #ifdef CONFIG_SWAP
......
...@@ -7871,7 +7871,7 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim) ...@@ -7871,7 +7871,7 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim)
/* /*
* This kswapd start function will be called by init and node-hot-add. * This kswapd start function will be called by init and node-hot-add.
*/ */
void kswapd_run(int nid) void __meminit kswapd_run(int nid)
{ {
pg_data_t *pgdat = NODE_DATA(nid); pg_data_t *pgdat = NODE_DATA(nid);
...@@ -7892,7 +7892,7 @@ void kswapd_run(int nid) ...@@ -7892,7 +7892,7 @@ void kswapd_run(int nid)
* Called by memory hotplug when all memory in a node is offlined. Caller must * Called by memory hotplug when all memory in a node is offlined. Caller must
* be holding mem_hotplug_begin/done(). * be holding mem_hotplug_begin/done().
*/ */
void kswapd_stop(int nid) void __meminit kswapd_stop(int nid)
{ {
pg_data_t *pgdat = NODE_DATA(nid); pg_data_t *pgdat = NODE_DATA(nid);
struct task_struct *kswapd; struct task_struct *kswapd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment