]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/vmalloc.c: add a schedule point to vmalloc()
authorEric Dumazet <edumazet@google.com>
Thu, 26 Jun 2014 00:42:42 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 26 Jun 2014 00:42:42 +0000 (10:42 +1000)
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 <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>
mm/vmalloc.c

index fdbb116ee66990ab951922823873299c8cad064a..a7c779d3ffa6daa8d43a7eef197800dd821695c8 100644 (file)
@@ -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))