Re: Queries on bottom halves

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Abhinav,

On 09/01/2018 04:05 PM, Abhinav Misra wrote:
Hi,

Sorry for the delay in the reply.
I think the question is not correctly framed. Will try to do it again.

1. Which stack does the tasklet, softriq and workqueue use for their execution ?


Softirq actually is a group of N kernel threads(N equals to your cpu number), each thread is restricted to run on its corresponding cpu.

A tasklet is a call-back function that runs on softirq thread.

In the latest kernel version, a tasklet uses softirq thread stack.

A workqueue is almost the same, a work is almost the same as the a tasklet, it runs on a worker thread and shares the stack with worker thread.


2. Why can't we sleep in tasklet and softriq ?
Yes, you can.
Tasklet runs on softirq thread, it has its own task_struct, you can sleep or call schedule in your tasklet.

When you sleep in your tasklet, the softirq thread that the tasklet is running on will sleep, the sequential tasklet could not be executed until next schedule.

BR,
Larry


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



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux