]> git.hungrycats.org Git - linux/commit
[PATCH] might_sleep() improvements
authorAndrew Morton <akpm@osdl.org>
Wed, 3 Sep 2003 18:12:43 +0000 (11:12 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 3 Sep 2003 18:12:43 +0000 (11:12 -0700)
commit5eebb6f205162c0a7b0075e8d86453f81994aa2f
tree439671fe1bdc0c1a80ceab3bf8bfdab36792821c
parent55308a20138c3ea39a0882265f255c5b0f931f20
[PATCH] might_sleep() improvements

From: Mitchell Blank Jr <mitch@sfgoth.com>

This patch makes the following improvements to might_sleep():

 o Add a "might_sleep_if()" macro for when we might sleep only if some
   condition is met.  It's a bit tidier, and has an unlikely() in it.

 o Add might_sleep checks to skb_share_check() and skb_unshare() which
   sometimes need to allocate memory.

 o Make all architectures call might_sleep() in both down() and
   down_interruptible().  Before only ppc, ppc64, and i386 did this check.
   (sh did the check on down() but not down_interruptible())
21 files changed:
arch/sparc64/kernel/semaphore.c
include/asm-alpha/semaphore.h
include/asm-arm/semaphore.h
include/asm-arm26/semaphore.h
include/asm-cris/semaphore.h
include/asm-h8300/semaphore.h
include/asm-ia64/semaphore.h
include/asm-m68k/semaphore.h
include/asm-m68knommu/semaphore.h
include/asm-mips/semaphore.h
include/asm-parisc/semaphore.h
include/asm-s390/semaphore.h
include/asm-sh/semaphore.h
include/asm-sparc/semaphore.h
include/asm-v850/semaphore.h
include/asm-x86_64/semaphore.h
include/linux/kernel.h
include/linux/skbuff.h
mm/page_alloc.c
mm/rmap.c
mm/slab.c