Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 2202

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Locking Between Softirqs</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Unreliable Guide To Locking" /><link rel="up" href="ch03.html" title="Chapter&#160;3.&#160;Locking in the Linux Kernel" /><link rel="prev" href="ch03s07.html" title="Locking Between Tasklets/Timers" /><link rel="next" href="ch04.html" title="Chapter&#160;4.&#160;Hard IRQ Context" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Locking Between Softirqs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s07.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;3.&#160;Locking in the Linux Kernel</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch04.html">Next</a></td></tr></table><hr /></div><div class="sect1" title="Locking Between Softirqs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="lock-softirqs"></a>Locking Between Softirqs</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="ch03s08.html#lock-softirqs-same">The Same Softirq</a></span></dt><dt><span class="sect2"><a href="ch03s08.html#lock-softirqs-different">Different Softirqs</a></span></dt></dl></div><p>
      Often a softirq might
      want to share data with itself or a tasklet/timer.
    </p><div class="sect2" title="The Same Softirq"><div class="titlepage"><div><div><h3 class="title"><a id="lock-softirqs-same"></a>The Same Softirq</h3></div></div></div><p>
       The same softirq can run on the other CPUs: you can use a
       per-CPU array (see <a class="xref" href="ch09s03.html" title="Per-CPU Data">the section called &#8220;Per-CPU Data&#8221;</a>) 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.
     </p><p>
       You'll need to use <code class="function">spin_lock()</code> and 
       <code class="function">spin_unlock()</code> for shared data.
     </p></div><div class="sect2" title="Different Softirqs"><div class="titlepage"><div><div><h3 class="title"><a id="lock-softirqs-different"></a>Different Softirqs</h3></div></div></div><p>
       You'll need to use <code class="function">spin_lock()</code> and
       <code class="function">spin_unlock()</code> 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.
     </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s07.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Locking Between Tasklets/Timers&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;4.&#160;Hard IRQ Context</td></tr></table></div></body></html>