how tasklet_kill() worked?

kinglt kinglotterry at 163.com
Sat Jul 6 06:10:08 EDT 2019


Dear mentors,

After tired digging, I'm wholly stuck in tasklet_kill(). Hope your help.

>From the source tree (4.9.168), I got:
1. TASKLET_STATE_SCHED flag is only set by tasklet_schedule(). (also in
dccp_tasklet_schedule()).
2. tasklet_schedule() immediately put the tasklet to queue tasklet_vec.
3. softirq handler tasklet_action() run the queue and clear their SCHED
flag.
4. Unlike tasklet_kill_immediate, tasklet_kill() doesn't touch tasklet_vec.
5. tasklet_kill() just yield to waiting the tasklet complete and clear its
SCHED flag. 

Then how to say the tasklet been killed? If a tasklet SCHED flag been set,
it must be in tasklet_vec queue. At this time, tasklet_kill does not kick it
out of the queue but waiting it to run over. Is my understanding right or I
miss something?

Thanks,
laokz




More information about the Kernelnewbies mailing list