Skip to content

delayed_work tweaks

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3make queue_delayed_work() friendly to flush_fork()include/linux/workqueue.h kernel/workqueue.c+19 -111 reply
2/3unify queue_delayed_work() and queue_delayed_work_on()kernel/workqueue.c+8 -210 replies
3/3ipvs: flush defense_work before module unloadnet/ipv4/ipvs/ip_vs_ctl.c+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] delayed_work tweaks

Andrew, unless you stop me right now, I am going to send the following patches in addition:

[PATCH] kill cancel_rearming_delayed_workqueue()

cancel_rearming_delayed_workqueue(wq, dwork) does not need the first parameter, it could be figured out from dwork. So we can rename it to cancel_rearming_delayed_work after the simple change and fix all callers.

In other words:

- cancel_rearming_delayed_work(dwork) will work for any workqueue, not just keventd_wq.

- all callers of cancel_rearming_delayed_workqueue() will be converted to use it.

No? This breaks the public interface, but we already did this recently ...

[PATCH] kill flush_work_keventd()

The same is true for flush_work(), it doesn't need the "struct workqueue_struct *wq" parameter. I missed this fact when I was doing flush_work().

This change is obviously good to do before flush_work() goes to mainline.

Also, I think the name "flush_work" is very bad. Isn't it better to rename it as well?

cancel_work? cancel_work_sync? whatever.

[PATCH] bonus: mark kernel/workqueue.c as CONFIG_EXPERIMENTAL

too many non-reviewed changes ...

Oleg.