sched: swait: use wake_up_process() instead of wake_up_state()
PATCH 1/1 sched: swait: use wake_up_process() instead of wake_up_state()
Why not just use wake_up_process().
--- kernel/sched/swait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/swait.c +1 -1
@@ -69,7 +69,7 @@ void swake_up_all(struct swait_queue_head *q)while (!list_empty (&tmp)) { curr =list_first_entry (&tmp,typeof (*curr), task_list); -wake_up_state (curr->task,TASK_NORMAL ); +wake_up_process (curr->task);list_del_init (&curr->task_list);if (list_empty (&tmp))
Signature · 1 line
2.7.4
Quoted 1 line · Wang Qing
Why not just use
wake_up_process().
IMO this is not an improvement. There are other places where explicit TASK_NORMAL is used as well, and they're all perfectly clear as is.
Quoted 18 lines
Signed-off-by Wang Qing <[email protected]>--- kernel/sched/swait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/swait.c +1
-1@@ -69,7 +69,7 @@ void swake_up_all(struct swait_queue_head *q)while (!list_empty (&tmp)) { curr =list_first_entry (&tmp,typeof (*curr), task_list); -wake_up_state (curr->task,TASK_NORMAL ); +wake_up_process (curr->task);list_del_init (&curr->task_list);if (list_empty (&tmp))
Quoted 5 lines · Mike Galbraith
Quoted 1 line · Wang Qing
Why not just use
wake_up_process().IMO this is not an improvement. There are other places where explicit
TASK_NORMALis used as well, and they're all perfectly clear as is.
Arguably those could all be converted to wake_up_process() as well. It's a very small kernel code size optimization. There's about 3 such places, could be converted in a single patch.
Thanks,
Ingo
Peter Zijlstra
maintainerQuoted 4 lines · Ingo Molnar
Quoted 1 line · Mike Galbraith
On Tue, 2021-03-16 at 19:20 +0800, Wang Qing wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Why not just use
wake_up_process().IMO this is not an improvement. There are other places where explicit
TASK_NORMALis used as well, and they're all perfectly clear as is.Arguably those could all be converted to
wake_up_process()as well. It's a very small kernel code size optimization. There's about 3 such places, could be converted in a single patch.
It's still pointless churn IMO.
Quoted 7 lines
Quoted 7 lines · Mike Galbraith
Quoted 4 lines · Wang Qing
Quoted 1 line
Why not just use
wake_up_process().
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
IMO this is not an improvement. There are other places where explicit
TASK_NORMALis used as well, and they're all perfectly clear as is.Arguably those could all be converted to
wake_up_process()as well. It's a very small kernel code size optimization. There's about 3 such places, could be converted in a single patch.It's still pointless churn IMO.
Using wake_up_process() is more simpler and friendly for beginners, and it is more convenient for analysis and statistics.
Quoted 9 lines · 王擎
Quoted 9 lines
Quoted 9 lines · Mike Galbraith
Quoted 6 lines · Wang Qing
Quoted 1 line
Why not just use
wake_up_process().IMO this is not an improvement. There are other places where explicit
TASK_NORMALis used as well, and they're all perfectly clear as is.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Arguably those could all be converted to
wake_up_process()as well. It's a very small kernel code size optimization. There's about 3 such places, could be converted in a single patch.It's still pointless churn IMO.
Using
wake_up_process()is more simpler and friendly for beginners, and it is more convenient for analysis and statistics.
If that's your argument, that should have been in the change log. That said, it's IMO still pretty darn weak. When presenting a patch, do what Ingo did, show the technical merit, that's what will determine whether it flies or dies.
-Mike
Quoted 11 lines · Ingo Molnar
Quoted 5 lines · Mike Galbraith
Quoted 1 line · Wang Qing
Why not just use
wake_up_process().IMO this is not an improvement. There are other places where explicit
TASK_NORMALis used as well, and they're all perfectly clear as is.Arguably those could all be converted to
wake_up_process()as well. It's a very small kernel code size optimization. There's about 3 such places, could be converted in a single patch.
I still prefer the way it sits, but that's certainlyly a heck of a lot better change justification than "why not" :)
-Mike
Quoted 9 lines · Mike Galbraith
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Mike Galbraith
Quoted 1 line · Wang Qing
Why not just use
wake_up_process().IMO this is not an improvement. There are other places where explicit
TASK_NORMALis used as well, and they're all perfectly clear as is.
Quoted 6 lines
Quoted 3 lines
Arguably those could all be converted to
wake_up_process()as well. It's a very small kernel code size optimization. There's about 3 such places, could be converted in a single patch.I still prefer the way it sits, but that's certainlyly a heck of a lot better change justification than "why not" :)
Which begs the reply "Why should we?" just for 10 bytes less of kernel text :)