mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH] mm/vmalloc.c: add a schedule point to vmalloc()
Date: Tue, 24 Jun 2014 15:25:24 -0700	[thread overview]
Message-ID: <20140624152524.f65d62a08538a63b3dc96838@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1406241517560.29176@chino.kir.corp.google.com>

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))



      reply	other threads:[~2014-06-24 22:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 14:00 Eric Dumazet
2014-06-24 22:18 ` David Rientjes
2014-06-24 22:25   ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140624152524.f65d62a08538a63b3dc96838@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=eric.dumazet@gmail.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®