From: Eric Dumazet Date: Thu, 26 Jun 2014 00:42:42 +0000 (+1000) Subject: mm/vmalloc.c: add a schedule point to vmalloc() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e774d946ea9f7f01bf13d45d7ef76a854fc60d12;p=karo-tx-linux.git 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. Signed-off-by: Eric Dumazet Cc: Hugh Dickins Acked-by: David Rientjes Signed-off-by: Andrew Morton --- diff --git a/mm/vmalloc.c b/mm/vmalloc.c index fdbb116ee669..a7c779d3ffa6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1602,6 +1602,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, goto fail; } area->pages[i] = page; + cond_resched(); } if (map_vm_area(area, prot, &pages))