For questions about the creation and usage of workqueues in the Linux kernel. When using this tag also include the more generic [linux], and [linux-kernel] tags where possible.
Questions tagged [workqueue]
12 questions
13
votes
1 answer
What is the difference between tasklet and workqueue
I am a Linux device driver newbie, and want to know the exact differences between tasklet and workqueue. I have the following doubts:
Which kernel stack do interrupts, tasklet and workqueue use when running in interrupt/process context?
At what…

manav m-n
- 11,136
- 23
- 74
- 97
3
votes
1 answer
What does "CPU dies" (not hardware-related) mean?
Recently working with workqueue of the Linux kernel, and I found something ("CPU dies") that I'm not sure what it is, even googling it.
Does it means particular CPU core is currently not available or something similar?
Following is the context of…

Feng. Ma
- 121
- 8
3
votes
1 answer
What are these flags for workqueue means?
While studying workqueue, I came across WorkQueue flags & constants defined in kernel. I have following doubts which i could not understand.
What exactly draining & rescuer mean here?
WQ_DRAINING = 1 << 6, /* internal: workqueue is…

0x07FC
- 523
- 1
- 6
- 33
1
vote
0 answers
Drawback of polling in kernel sensor driver
I have a sensor driver, which instead of processing interrupts does poll of gyroscope and accelerometer every 5 ms, with help of workqueues.
static void sensor_delaywork_func(struct work_struct *work)
{
struct delayed_work *delaywork =…

pulse
- 303
- 4
- 18
0
votes
1 answer
How to pass a char *array (belonging to the user address space) to a tasklet or workqueue in a kernel module?
I’m writing a device driver. If someone calls the write operation I want it to be deferred (using tasklet or workqueue). The code should be something like that:
static ssize_t dev_write(struct file *filp, const char *buff, size_t len, loff_t *off)…

Silvia di Luise
- 1
- 1
0
votes
1 answer
Can a work submitted to linux workqueue schedule itself
PFB the pseudo code:
struct work_struct my_work;
my_wq = alloc_workqueue();
INIT_WORK(&my_work, worker_func);
void worker_func() {
if (condition)
queue_work(my_wq, my_work);
}
Is this allowed?

Anonymous
- 11
0
votes
0 answers
Can you restrict workqueue workers from running on certain cores while using a bounded workqueue in linux kernel?
I work on a Control Flow Integrity mechanism that monitors a process. I have been trying to restrict the kernel workqueue workers to certain cores while running the monitored program on an isolated core (Pinned using taskset and isolcpus). But I…
0
votes
1 answer
How to print linux workqueue worker's printk immediately into dmesg?
I have a question about linux workqueue.
I found example kernel module using workqueue and tested it.
Here is the code.
#include
#include
#include
#include
MODULE_LICENSE( "GPL"…

JY N
- 37
- 6
0
votes
1 answer
System blocked when delayed work is schedulated
i'm working on an accademic project and i have to understand the usage of linux's workqueue.
For this reason i've developed a small module that simply schedule the execution of a work on a custom workqueue after 1000 jiffies.
However, when the…

Tommaso
- 3
- 1
0
votes
1 answer
Kernel Oops when calling aio_complete by workqueue
Short Edition of the question:
Process submit IO through io_submit(file open with O_DIRECT).
When kiocb->ki_complete(aio_complete_rw) is called in fs address_space_operations .direct_IO, everything works well.
But when…

zz bb
- 13
- 4
0
votes
2 answers
Workqueue implementation in Linux Kernel
Can any one help me to understand difference between below mentioned APIs in Linux kernel:
struct workqueue_struct *create_workqueue(const char *name);
struct workqueue_struct *create_singlethread_workqueue(const char *name);
I had written sample…

sanumala
- 201
- 1
- 5
- 16
0
votes
1 answer
Workqueue handling if the same interrupt occurs before workqueue finishes
In Linux,I have an ISR and I want to schedule a workqueue to push my work to bottom half. Now I have a situation where the workqueue has not finished its task and the same interrupt occurs again.
Now how should I handle the situation or rather is…

sandeep
- 141
- 1
- 1
- 11