Messages in this thread Patch in this message | | | From | Liu Shixin <> | Subject | [PATCH 5/9] mm/mm_init.c: use hotplug_memory_notifier() directly | Date | Mon, 19 Sep 2022 16:31:48 +0800 |
| |
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@huawei.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..ec6989fcf762 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
| |