Skip to content

Commit

Permalink
mm/mm_init.c: use hotplug_memory_notifier() directly
Browse files Browse the repository at this point in the history
Since patch 3163462 has already updated the minimum gcc version to 5.1.
The previous problem mentioned in patch f02c696 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>
  • Loading branch information
Liu Shixin authored and intel-lab-lkp committed Sep 19, 2022
1 parent f147c36 commit 33c4e50
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions mm/mm_init.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 33c4e50

Please sign in to comment.