Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1533286
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 |
| Date | 2016-11-30 14:10 +0100 |
| Message-ID | <sJcO6-6wi-19@gated-at.bofh.it> (permalink) |
| References | <sI7GN-4MS-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun 27-11-16 13:19:54, Mel Gorman wrote:
[...]
> @@ -2588,18 +2594,22 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
> struct page *page;
> bool cold = ((gfp_flags & __GFP_COLD) != 0);
>
> - if (likely(order == 0)) {
> + if (likely(order <= PAGE_ALLOC_COSTLY_ORDER)) {
> struct per_cpu_pages *pcp;
> struct list_head *list;
>
> local_irq_save(flags);
> do {
> + unsigned int pindex;
> +
> + pindex = order_to_pindex(migratetype, order);
> pcp = &this_cpu_ptr(zone->pageset)->pcp;
> - list = &pcp->lists[migratetype];
> + list = &pcp->lists[pindex];
> if (list_empty(list)) {
> - pcp->count += rmqueue_bulk(zone, 0,
> + int nr_pages = rmqueue_bulk(zone, order,
> pcp->batch, list,
> migratetype, cold);
> + pcp->count += (nr_pages << order);
> if (unlikely(list_empty(list)))
> goto failed;
just a nit, we can reorder the check and the count update because nobody
could have stolen pages allocated by rmqueue_bulk. I would also consider
nr_pages a bit misleading because we get a number or allocated elements.
Nothing to lose sleep over...
> }
But... Unless I am missing something this effectively means that we do
not exercise high order atomic reserves. Shouldn't we fallback to
the locked __rmqueue_smallest(zone, order, MIGRATE_HIGHATOMIC) for
order > 0 && ALLOC_HARDER ? Or is this just hidden in some other code
path which I am not seeing?
Other than that the patch looks reasonable to me. Keeping some portion
of !costly pages on pcp lists sounds useful from the fragmentation
point of view as well AFAICS because it would be normally dissolved for
order-0 requests while we push on the reclaim more right now.
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Mel Gorman <mgorman@techsingularity.net> - 2016-11-27 14:30 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Vlastimil Babka <vbabka@suse.cz> - 2016-11-28 12:10 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Mel Gorman <mgorman@techsingularity.net> - 2016-11-28 12:50 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Mel Gorman <mgorman@techsingularity.net> - 2016-11-30 10:00 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Christoph Lameter <cl@linux.com> - 2016-11-28 16:50 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Mel Gorman <mgorman@techsingularity.net> - 2016-11-28 17:30 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Christoph Lameter <cl@linux.com> - 2016-11-28 17:40 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Mel Gorman <mgorman@techsingularity.net> - 2016-11-28 19:50 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Christoph Lameter <cl@linux.com> - 2016-11-28 20:00 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Vlastimil Babka <vbabka@suse.cz> - 2016-11-28 22:10 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Johannes Weiner <hannes@cmpxchg.org> - 2016-11-28 21:00 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Jesper Dangaard Brouer <brouer@redhat.com> - 2016-11-30 13:50 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Mel Gorman <mgorman@techsingularity.net> - 2016-11-30 15:10 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Jesper Dangaard Brouer <brouer@redhat.com> - 2016-11-30 16:10 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Mel Gorman <mgorman@techsingularity.net> - 2016-11-30 17:40 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Jesper Dangaard Brouer <brouer@redhat.com> - 2016-12-01 18:40 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Paolo Abeni <pabeni@redhat.com> - 2016-12-01 23:20 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Jesper Dangaard Brouer <brouer@redhat.com> - 2016-12-02 16:40 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Paolo Abeni <pabeni@redhat.com> - 2016-12-02 16:50 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Michal Hocko <mhocko@kernel.org> - 2016-11-30 14:10 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Mel Gorman <mgorman@techsingularity.net> - 2016-11-30 15:20 +0100
Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 Michal Hocko <mhocko@kernel.org> - 2016-11-30 16:10 +0100
csiph-web