Kernel Newbies archive on lore.kernel.org
 help / color / 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
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 index

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

Reply instructions:

You may reply publically 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

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox