summary
A delayed work will first start a timer,
and when timeout, the delayed work will be put a worker_pool‘sworklist or a pool_workqueue‘s delayed_works
how to use delayed work
data structure
1 | 113 struct delayed_work { |
1 | 157 |
defination
1 | 52 static void dst_gc_task(struct work_struct *work); |
1 | 63 static void dst_gc_task(struct work_struct *work) |
api to schedule workqueue.
schedule_delayed_work will put the work into a struct work_pool‘s worklist
or a pool_workqueue‘s delayed_works.
1 | 586 /** |
1 | ... |
call trace
1 | > schedule_delayed_work |
core function __queue_work
1 | 1314 static void __queue_work(int cpu, struct workqueue_struct *wq, |