mm/vmalloc.c: add a schedule point to vmalloc()
authorEric Dumazet <edumazet@google.com>
Wed, 6 Aug 2014 23:06:25 +0000 (16:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:18 +0000 (18:01 -0700)
commit660654f90e7f8f6d8163276d47fc1573a39c7007
tree9e0f8ffede8d9b77fb6d425bf513aff6d069d3be
parent54980b93c026ac24b7d5046597a254244eafcdeb
mm/vmalloc.c: add a schedule point to vmalloc()

It is not uncommon on busy servers to get stuck hundred of ms in
vmalloc() calls (like file descriptor expansions).

Add a cond_resched() to __vmalloc_area_node() to be gentle to
other tasks.

[akpm@linux-foundation.org: only do it for __GFP_WAIT, per David]
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Hugh Dickins <hughd@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmalloc.c