poweroff: change orderly_poweroff() to use schedule_work()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | poweroff: change orderly_poweroff() to use schedule_work()kernel/ | +32 | 15 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] poweroff: change orderly_poweroff() to use schedule_work()
Quoted 9 lines · Oleg Nesterov
Quoted 3 lines · Linus Torvalds
So yeah, I guess
everything could just go into a workqueue.OK, I'll try to make the patch tomorrow. Should be trivial but it is not clear how we should pass "bool force" without allocating the
work_structwhich would be nice to avoid.
Yes, it would be nice to keep it simple and use a single work/arg.
Could you review? The change is trivial but
- orderly_poweroff() always return 0.
- the patch assumes that orderly_poweroff(false) after orderly_poweroff(true) acts as "force = true". Only xen uses "false", I hope this is fine.
In fact I think we can change poweroff_force argument unconditionally, this "if (force)" check is mostly documentation.
But we can add the locking or even allocate work_struct every time if this is wrong (or just looks wrong).
- The patch assumes that orderly_poweroff() doesn't need the keventd_up() check, I hope this is correct...
Lucas, Andrew, sorry. If this patch will be applied, then
kernel-sysc-use-the-simpler-call_usermodehelper.patch
should be dropped. Or I can redo this fix on top of -mm cleanup.
Quoted 2 lines
And. It seems there is another problem.
argv_split(poweroff_cmd)can obviously race withproc_dostring()?
I'll send another patch...
Oleg.