]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mm: vmscan: mark kswapd_run() and kswapd_stop() __meminit
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 6 Jun 2023 12:18:13 +0000 (20:18 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 19 Jun 2023 23:19:00 +0000 (16:19 -0700)
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.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Yu Zhao <yuzhao@google.com>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/swap.h
mm/vmscan.c

index 2ddbfd85f6c798a567550f141744e720c2ae5848..b5f6f2916de18009f7203c65baab8eabad12e0ac 100644 (file)
@@ -460,8 +460,8 @@ static inline bool node_reclaim_enabled(void)
 void check_move_unevictable_folios(struct folio_batch *fbatch);
 void check_move_unevictable_pages(struct pagevec *pvec);
 
-extern void kswapd_run(int nid);
-extern void kswapd_stop(int nid);
+extern void __meminit kswapd_run(int nid);
+extern void __meminit kswapd_stop(int nid);
 
 #ifdef CONFIG_SWAP
 
index 9048739c41dbaa8cc346261ffd5c452d7a30f10f..a4e2936f6d35218a1830233a79908880d973f281 100644 (file)
@@ -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.
  */
-void kswapd_run(int nid)
+void __meminit kswapd_run(int nid)
 {
        pg_data_t *pgdat = NODE_DATA(nid);
 
@@ -7892,7 +7892,7 @@ void kswapd_run(int nid)
  * Called by memory hotplug when all memory in a node is offlined.  Caller must
  * be holding mem_hotplug_begin/done().
  */
-void kswapd_stop(int nid)
+void __meminit kswapd_stop(int nid)
 {
        pg_data_t *pgdat = NODE_DATA(nid);
        struct task_struct *kswapd;