[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161205031013.GB1378@js1304-P5Q-DELUXE>
Date: Mon, 5 Dec 2016 12:10:14 +0900
From: Joonsoo Kim <iamjoonsoo.kim@....com>
To: Michal Hocko <mhocko@...nel.org>
Cc: Mel Gorman <mgorman@...hsingularity.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux.com>,
Vlastimil Babka <vbabka@...e.cz>,
Johannes Weiner <hannes@...xchg.org>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Linux-MM <linux-mm@...ck.org>,
Linux-Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] mm: page_alloc: High-order per-cpu page allocator v5
On Fri, Dec 02, 2016 at 09:21:08AM +0100, Michal Hocko wrote:
> On Fri 02-12-16 15:03:46, Joonsoo Kim wrote:
> [...]
> > > o pcp accounting during free is now confined to free_pcppages_bulk as it's
> > > impossible for the caller to know exactly how many pages were freed.
> > > Due to the high-order caches, the number of pages drained for a request
> > > is no longer precise.
> > >
> > > o The high watermark for per-cpu pages is increased to reduce the probability
> > > that a single refill causes a drain on the next free.
> [...]
> > I guess that this patch would cause following problems.
> >
> > 1. If pcp->batch is too small, high order page will not be freed
> > easily and survive longer. Think about following situation.
> >
> > Batch count: 7
> > MIGRATE_UNMOVABLE -> MIGRATE_MOVABLE -> MIGRATE_RECLAIMABLE -> order 1
> > -> order 2...
> >
> > free count: 1 + 1 + 1 + 2 + 4 = 9
> > so order 3 would not be freed.
>
> I guess the second paragraph above in the changelog tries to clarify
> that...
It doesn't perfectly clarify my concern. This is a different problem.
>
> > 2. And, It seems that this logic penalties high order pages. One free
> > to high order page means 1 << order pages free rather than just
> > one page free. This logic do round-robin to choose the target page so
> > amount of freed page will be different by the order.
>
> Yes this is indeed possible. The first paragraph above mentions this
> problem.
Yes, it is mentioned simply but we cannot easily notice that the above
penalty for high order page is there.
Thanks.
Powered by blists - more mailing lists