Re: [PATCH]: Clean up of __alloc_pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2005-10-29 at 17:16 -0700, Paul Jackson wrote:
> Seth wroteL
> > @@ -851,19 +853,11 @@
> >  	 * Ignore cpuset if GFP_ATOMIC (!wait) rather than fail alloc.
> >  	 * See also cpuset_zone_allowed() comment in kernel/cpuset.c.
> >  	 */
> > -	for (i = 0; (z = zones[i]) != NULL; i++) {
> > -		if (!zone_watermark_ok(z, order, z->pages_min,
> > -				       classzone_idx, can_try_harder,
> > -				       gfp_mask & __GFP_HIGH))
> > -			continue;
> > -
> > -		if (wait && !cpuset_zone_allowed(z, gfp_mask))
> > -			continue;
> > -
> > -		page = buffered_rmqueue(z, order, gfp_mask);
> > -		if (page)
> > -			goto got_pg;
> > -	}
> > +	if (!wait)
> > +		page = get_page_from_freelist(gfp_mask, order, zones, 
> > +						can_try_harder);
> 
> Thanks for the clean-up work.  Good stuff.
> 
> I think you've changed the affect that the cpuset check has on the
> above pass.
> 
> As you know, the above is the last chance we have for GFP_ATOMIC (can't
> wait) allocations before getting into the oom_kill code.  The code had
> been written to ignore cpuset constraints for GFP_ATOMIC (that is,
> "!wait") allocations.  The intent is to allow taking GFP_ATOMIC memory
> from any damn node we can find it on, rather than start killing.
> 
> Your change will call into get_page_from_freelist() in such cases,
> where the cpuset check is still done.


Shooo....I will fix it.

-rohit

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux