lkml.org 
[lkml]   [2014]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] mm/vmalloc.c: add a schedule point to vmalloc()
On Tue, 24 Jun 2014 15:18:57 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:

> On Tue, 24 Jun 2014, Eric Dumazet wrote:
>
> > diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> > index f64632b67196..05a145ed1332 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))
>
> Now that we pass the gfp mask into vmalloc() and all allocations aren't
> inherently GFP_KERNEL, I think this should only be done for (gfp_mask &
> __GFP_WAIT).

spose so.

--- a/mm/vmalloc.c~mm-vmallocc-add-a-schedule-point-to-vmalloc-fix
+++ a/mm/vmalloc.c
@@ -1602,7 +1602,8 @@ static void *__vmalloc_area_node(struct
goto fail;
}
area->pages[i] = page;
- cond_resched();
+ if (gfp_mask & __GFP_WAIT)
+ cond_resched();
}

if (map_vm_area(area, prot, &pages))



\
 
 \ /
  Last update: 2014-06-25 00:41    [W:0.044 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site