You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
softirq: Add support for triggering softirq work on softirqs.
This is basically a genericization of Jens Axboe's block layer remote softirq changes. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
committed by
Jens Axboe
parent
2e532d68a2
commit
54514a70ad
@@ -11,6 +11,8 @@
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/system.h>
|
||||
@@ -273,6 +275,25 @@ extern void softirq_init(void);
|
||||
extern void raise_softirq_irqoff(unsigned int nr);
|
||||
extern void raise_softirq(unsigned int nr);
|
||||
|
||||
/* This is the worklist that queues up per-cpu softirq work.
|
||||
*
|
||||
* send_remote_sendirq() adds work to these lists, and
|
||||
* the softirq handler itself dequeues from them. The queues
|
||||
* are protected by disabling local cpu interrupts and they must
|
||||
* only be accessed by the local cpu that they are for.
|
||||
*/
|
||||
DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
|
||||
|
||||
/* Try to send a softirq to a remote cpu. If this cannot be done, the
|
||||
* work will be queued to the local cpu.
|
||||
*/
|
||||
extern void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq);
|
||||
|
||||
/* Like send_remote_softirq(), but the caller must disable local cpu interrupts
|
||||
* and compute the current cpu, passed in as 'this_cpu'.
|
||||
*/
|
||||
extern void __send_remote_softirq(struct call_single_data *cp, int cpu,
|
||||
int this_cpu, int softirq);
|
||||
|
||||
/* Tasklets --- multithreaded analogue of BHs.
|
||||
|
||||
|
||||
+3
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/cpumask.h>
|
||||
|
||||
@@ -16,7 +17,8 @@ struct call_single_data {
|
||||
struct list_head list;
|
||||
void (*func) (void *info);
|
||||
void *info;
|
||||
unsigned int flags;
|
||||
u16 flags;
|
||||
u16 priv;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
Reference in New Issue
Block a user