[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220923033347.3935160-6-liushixin2@huawei.com>
Date: Fri, 23 Sep 2022 11:33:44 +0800
From: Liu Shixin <liushixin2@...wei.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Waiman Long <longman@...hat.com>,
Zefan Li <lizefan.x@...edance.com>,
Christoph Lameter <cl@...ux.com>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
Liu Shixin <liushixin2@...wei.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: [PATCH v4 5/8] mm/mm_init.c: use hotplug_memory_notifier() directly
Since patch 316346243be6 has already updated the minimum gcc version to 5.1.
The previous problem mentioned in patch f02c69680088 is not existed. So we
can now revert to use hotplug_memory_notifier() directly rather than
register_hotmemory_notifier().
Signed-off-by: Liu Shixin <liushixin2@...wei.com>
Reviewed-by: David Hildenbrand <david@...hat.com>
---
mm/mm_init.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 0d7b2bd2454a..44aadc162d1f 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -178,16 +178,10 @@ static int __meminit mm_compute_batch_notifier(struct notifier_block *self,
return NOTIFY_OK;
}
-static struct notifier_block compute_batch_nb __meminitdata = {
- .notifier_call = mm_compute_batch_notifier,
- .priority = IPC_CALLBACK_PRI, /* use lowest priority */
-};
-
static int __init mm_compute_batch_init(void)
{
mm_compute_batch(sysctl_overcommit_memory);
- register_hotmemory_notifier(&compute_batch_nb);
-
+ hotplug_memory_notifier(mm_compute_batch_notifier, IPC_CALLBACK_PRI);
return 0;
}
--
2.25.1
Powered by blists - more mailing lists