diff mbox series

[v3,1/8] cgroup/cpuset: use hotplug_memory_notifier() directly

Message ID 20220922141904.3245505-2-liushixin2@huawei.com (mailing list archive)
State New
Headers show
Series mm: Use hotplug_memory_notifier() instead of register_hotmemory_notifier() | expand

Commit Message

Liu Shixin Sept. 22, 2022, 2:18 p.m. UTC
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>
---
 kernel/cgroup/cpuset.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

David Hildenbrand Sept. 22, 2022, 5:56 p.m. UTC | #1
On 22.09.22 16:18, Liu Shixin wrote:
> 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>
> ---
>   kernel/cgroup/cpuset.c | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index b474289c15b8..0c6db6a4f427 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -3630,11 +3630,6 @@ static int cpuset_track_online_nodes(struct notifier_block *self,
>   	return NOTIFY_OK;
>   }
>   
> -static struct notifier_block cpuset_track_online_nodes_nb = {
> -	.notifier_call = cpuset_track_online_nodes,
> -	.priority = 10,		/* ??! */
> -};
> -
>   /**
>    * cpuset_init_smp - initialize cpus_allowed
>    *
> @@ -3652,7 +3647,7 @@ void __init cpuset_init_smp(void)
>   	cpumask_copy(top_cpuset.effective_cpus, cpu_active_mask);
>   	top_cpuset.effective_mems = node_states[N_MEMORY];
>   
> -	register_hotmemory_notifier(&cpuset_track_online_nodes_nb);
> +	hotplug_memory_notifier(cpuset_track_online_nodes, 10);
>   
>   	cpuset_migrate_mm_wq = alloc_ordered_workqueue("cpuset_migrate_mm", 0);
>   	BUG_ON(!cpuset_migrate_mm_wq);


Please don't drop Reviewed-by or Acked-by tags. Otherwise reviewers have 
no clue which patch they already reviewed -- and they always have little 
time ;)
Liu Shixin Sept. 23, 2022, 1:56 a.m. UTC | #2
On 2022/9/23 1:56, David Hildenbrand wrote:
> On 22.09.22 16:18, Liu Shixin wrote:
>> 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>
>> ---
>>   kernel/cgroup/cpuset.c | 7 +------
>>   1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>> index b474289c15b8..0c6db6a4f427 100644
>> --- a/kernel/cgroup/cpuset.c
>> +++ b/kernel/cgroup/cpuset.c
>> @@ -3630,11 +3630,6 @@ static int cpuset_track_online_nodes(struct notifier_block *self,
>>       return NOTIFY_OK;
>>   }
>>   -static struct notifier_block cpuset_track_online_nodes_nb = {
>> -    .notifier_call = cpuset_track_online_nodes,
>> -    .priority = 10,        /* ??! */
>> -};
>> -
>>   /**
>>    * cpuset_init_smp - initialize cpus_allowed
>>    *
>> @@ -3652,7 +3647,7 @@ void __init cpuset_init_smp(void)
>>       cpumask_copy(top_cpuset.effective_cpus, cpu_active_mask);
>>       top_cpuset.effective_mems = node_states[N_MEMORY];
>>   -    register_hotmemory_notifier(&cpuset_track_online_nodes_nb);
>> +    hotplug_memory_notifier(cpuset_track_online_nodes, 10);
>>         cpuset_migrate_mm_wq = alloc_ordered_workqueue("cpuset_migrate_mm", 0);
>>       BUG_ON(!cpuset_migrate_mm_wq);
>
>
> Please don't drop Reviewed-by or Acked-by tags. Otherwise reviewers have no clue which patch they already reviewed -- and they always have little time ;)
>
Thanks for your reminder, I'll keep it in mind.
diff mbox series

Patch

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index b474289c15b8..0c6db6a4f427 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -3630,11 +3630,6 @@  static int cpuset_track_online_nodes(struct notifier_block *self,
 	return NOTIFY_OK;
 }
 
-static struct notifier_block cpuset_track_online_nodes_nb = {
-	.notifier_call = cpuset_track_online_nodes,
-	.priority = 10,		/* ??! */
-};
-
 /**
  * cpuset_init_smp - initialize cpus_allowed
  *
@@ -3652,7 +3647,7 @@  void __init cpuset_init_smp(void)
 	cpumask_copy(top_cpuset.effective_cpus, cpu_active_mask);
 	top_cpuset.effective_mems = node_states[N_MEMORY];
 
-	register_hotmemory_notifier(&cpuset_track_online_nodes_nb);
+	hotplug_memory_notifier(cpuset_track_online_nodes, 10);
 
 	cpuset_migrate_mm_wq = alloc_ordered_workqueue("cpuset_migrate_mm", 0);
 	BUG_ON(!cpuset_migrate_mm_wq);