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 the problem I'm asking (full-version):
/**
* queue_work - queue work on a workqueue
* @wq: workqueue to use
* @work: work to queue
*
* Returns %false if @work was already on a queue, %true otherwise.
*
* We queue the work to the CPU on which it was submitted, but if the CPU dies
* it can be processed by another CPU.
*/
static inline bool queue_work(struct workqueue_struct *wq,
struct work_struct *work)
{
return queue_work_on(WORK_CPU_UNBOUND, wq, work);
}
Per-cpu workqueues are generally preferred because they tend to show better performance.
The work queue is submitted on one CPU, but if this CPU goes into IDLE, then the workqueue is moved to another CPU.
A worker goes in IDLE if its workqueue (one workqueue per each worker) is empty.
See here