[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170117190732.0fc733ec@redhat.com>
Date: Tue, 17 Jan 2017 19:07:32 +0100
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Mel Gorman <mgorman@...hsingularity.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>, Vlastimil Babka <vbabka@...e.cz>,
Hillf Danton <hillf.zj@...baba-inc.com>, brouer@...hat.com,
Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH 1/4] mm, page_alloc: Split buffered_rmqueue
On Tue, 17 Jan 2017 09:29:51 +0000 Mel Gorman <mgorman@...hsingularity.net> wrote:
> +/* Lock and remove page from the per-cpu list */
> +static struct page *rmqueue_pcplist(struct zone *preferred_zone,
> + struct zone *zone, unsigned int order,
> + gfp_t gfp_flags, int migratetype)
> +{
> + struct per_cpu_pages *pcp;
> + struct list_head *list;
> + bool cold = ((gfp_flags & __GFP_COLD) != 0);
> + struct page *page;
> + unsigned long flags;
> +
> + local_irq_save(flags);
> + pcp = &this_cpu_ptr(zone->pageset)->pcp;
> + list = &pcp->lists[migratetype];
> + page = __rmqueue_pcplist(zone, migratetype, cold, pcp, list);
> + if (page) {
> + __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
> + zone_statistics(preferred_zone, zone, gfp_flags);
Word-of-warning: The zone_statistics() call changed number of
parameters in commit 41b6167e8f74 ("mm: get rid of __GFP_OTHER_NODE").
(Not sure what tree you are based on)
> + }
> + local_irq_restore(flags);
> + return page;
> +}
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists