<a href="https://lwn.net/Articles/288056/" rel="nofollow">https://lwn.net/Articles/288056/</a><p>Excerpt:<p>"There are advantages and disadvantages to each type of sleep. Interruptible sleeps enable faster response to signals, but they make the programming harder. Kernel code which uses interruptible sleeps must always check to see whether it woke up as a result of a signal, and, if so, clean up whatever it was doing and return -EINTR back to user space.<p>The user-space side, too, must realize that a system call was interrupted and respond accordingly; <i>not all user-space programmers are known for their diligence in this regard.</i><p>Making a sleep uninterruptible eliminates these problems, but at the cost of being, well, uninterruptible. If the expected wakeup event does not materialize, <i>the process will wait forever and there is usually nothing that anybody can do about it short of rebooting the system.</i><p>This is the source of the dreaded, unkillable process which is shown to be in the "D" state by ps.<p>Given the highly obnoxious nature of unkillable processes, one would think that interruptible sleeps should be used whenever possible. The problem with that idea is that, in many cases, the introduction of interruptible sleeps is likely to lead to application bugs.<p>As recently noted by <i>Alan Cox:</i><p><i>Unix tradition (and thus almost all applications) believe file store writes to be non signal interruptible. It would not be safe or practical to change that guarantee.</i>"<p>That's the <i>whyness</i> to all of this...