Locking Between Softirqs
Prev | Chapter 3. Locking in the Linux Kernel | Next

## Locking Between Softirqs

Often a softirq might want to share data with itself or a tasklet/timer.

### The Same Softirq

The same softirq can run on the other CPUs: you can use a per-CPU array (see the section called “Per-CPU Data”) for better performance. If you're going so far as to use a softirq, you probably care about scalable performance enough to justify the extra complexity.

You'll need to use `spin_lock()` and `spin_unlock()` for shared data.

### Different Softirqs

You'll need to use `spin_lock()` and `spin_unlock()` for shared data, whether it be a timer, tasklet, different softirq or the same or another softirq: any of them could be running on a different CPU.

Prev | Up | Next
Locking Between Tasklets/Timers | Home | Chapter 4. Hard IRQ Context