WARN_ON_ONCE(in_nmi()); if (llist_add(&work->llnode, &per_cpu(raised_list, cpu))) arch_send_call_function_single_ipi(cpu); __smp_call_single_queue(cpu, &work->llnode); } else { __irq_work_queue_local(work); } @@ -131,6 +130,31 @@ bool irq_work_needs_cpu(void) ret...
若是没有指定 IRQ_WORK_LAZY 标志,则会添加到当前CPU的 raised_list 链表中,若是链表上的首个work,则会触发对irq_work的处理。处理流程放到下节讲。 /* Enqueue on current CPU, work must already be claimed and preempt disabled */ static void __irq_work_queue_local(struct irq_work *work) { /*...
queue is called workqueue and the thread is called worker. While there are work items on the workqueue the worker executes the functions associated with the work items one after the other. When there is no work item left on the workqueue the worker becomes idle. When a new work item gets ...
将中断绑到CPU 0-$queue_num-1上cat /proc/interrupts grep virtio grep input cut -d: -f1 while read i; do echo -n "irq $i bind cpu: "; echo $((($i / 2) % $queue_num)) > /proc/irq/$i/smp... 中断寄存器和中断请求线(IRQ) -相关内容 Cilium 原理解析:网络数据包在内核中的...
}staticDECLARE_WAIT_QUEUE_HEAD(gpio_key_wait);staticvoidkey_timer_expire(unsignedlongdata){structgpio_key*gpio_key=data;intval;intkey; val = gpiod_get_value(gpio_key->gpiod); printk("key_timer_expire key %d %d\n", gpio_key->gpio, val); ...
queueis called workqueueandthe thread is called worker. While there are work items on the workqueue the worker executes the functions associated with the work items one after the other. When there is no work item left on the workqueue the worker becomes idle. ...
soft_irq用在对底半执行时间要求比较紧急或者非常重要的场合,主要为一些subsystem用,一般driver基本上用不上。 tasklet和work queue在普通的driver里用的相对较多,主要区别是tasklet是在中断上下文执行,而work queue是在process上下文,因此可以执行可能sleep的操作。
WORK_QUEUE_TYPE enumeration WRITE_PORT_BUFFER_UCHAR function WRITE_PORT_BUFFER_ULONG function WRITE_PORT_BUFFER_USHORT function WRITE_PORT_UCHAR function WRITE_PORT_ULONG function WRITE_PORT_USHORT function WRITE_REGISTER_BUFFER_UCHAR function WRITE_REGISTER_BUFFER_ULONG function WRITE_REGISTER_BUFFER_ULON...
ret = queue_work(phba->wq, &cq->irqwork); ret = queue_delayed_work(phba->wq, &cq->sched_irqwork, delay); else ret = queue_work_on(cq->chann, phba->wq, &cq->irqwork); ret = queue_delayed_work_on(cq->chann, phba->wq, ...
soft_irq用在对底半执行时间要求比较紧急或者非常重要的场合,主要为一些subsystem用,一般driver基本上用不上。 tasklet和work queue在普通的driver里用的相对较多,主要区别是tasklet是在中断上下文执行,而work queue是在process上下文,因此可以执行可能sleep的操作。