kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: kinglt <kinglotterry@163.com>
To: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: how tasklet_kill() worked?
Date: Sat, 06 Jul 2019 18:10:08 +0800	[thread overview]
Message-ID: <616e2214e58f450baff4b1511cb19645bd751a07.camel@163.com> (raw)

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


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

                 reply	other threads:[~2019-07-06 10:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=616e2214e58f450baff4b1511cb19645bd751a07.camel@163.com \
    --to=kinglotterry@163.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).