Re: [PATCH 11/12] mm, page_alloc: Reserve pageblocks for high-order atomic allocations on demand

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

 



On Wed, Aug 26, 2015 at 04:53:52PM +0200, Michal Hocko wrote:
> > 
> > Overall, this is a small reduction but the reserves are small relative to the
> > number of allocation requests. In early versions of the patch, the failure
> > rate reduced by a much larger amount but that required much larger reserves
> > and perversely made atomic allocations seem more reliable than regular allocations.
> 
> Have you considered a counter for vmstat/zoneinfo so that we have an overview
> about the memory consumed for this reserve?
> 

It should already be available in /proc/pagetypeinfo

> > Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
> 
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> 
> [...]
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index d5ce050ebe4f..2415f882b89c 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> [...]
> > @@ -1645,10 +1725,16 @@ __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype)
> >   * Call me with the zone->lock already held.
> >   */
> >  static struct page *__rmqueue(struct zone *zone, unsigned int order,
> > -						int migratetype)
> > +				int migratetype, gfp_t gfp_flags)
> >  {
> >  	struct page *page;
> >  
> > +	if (unlikely(order && (gfp_flags & __GFP_ATOMIC))) {
> > +		page = __rmqueue_smallest(zone, order, MIGRATE_HIGHATOMIC);
> > +		if (page)
> > +			goto out;
> 
> I guess you want to change migratetype to MIGRATE_HIGHATOMIC in the
> successful case so the tracepoint reports this properly.
> 

Yes, thanks.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]