[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1802151638510.50948@chino.kir.corp.google.com>
Date: Thu, 15 Feb 2018 16:45:02 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Matthew Wilcox <willy@...radead.org>
cc: Christopher Lameter <cl@...ux.com>,
Michal Hocko <mhocko@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Vlastimil Babka <vbabka@...e.cz>, Mel Gorman <mgorman@...e.de>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-doc@...r.kernel.org
Subject: Re: [patch 1/2] mm, page_alloc: extend kernelcore and movablecore
for percent
On Thu, 15 Feb 2018, Matthew Wilcox wrote:
> What I was proposing was an intermediate page allocator where slab would
> request 2MB for its own uses all at once, then allocate pages from that to
> individual slabs, so allocating a kmalloc-32 object and a dentry object
> would result in 510 pages of memory still being available for any slab
> that needed it.
>
A type of memory arena built between the page allocator and slab
allocator.
The issue that I see with this is eventually there's going to be low on
memory situations where memory needs to be reclaimed from these arena
pages. We can free individual pages back to the buddy allocator, but have
no control over whether an entire pageblock can be freed back. So now we
have MIGRATE_MOVABLE or MIGRATE_UNMOVABLE pageblocks with some user pages
and some slab pages, and we've reached the same fragmentation issue in a
different way. After that, it will become more difficult for the slab
allocator to request a page of pageblock_order.
Other than the stranding issue of MIGRATE_UNMOVABLE pages on pcps, the
page allocator currently does well in falling back to other migratetypes
but there isn't any type of slab reclaim or defragmentation done in the
background to try to free up as much memory from that
now-MIGRATE_UNMOVABLE pageblock as possible. We have patches that do
that, but as I mentioned before it can affect the performance of the page
allocator because it drains pcps on fallback and it does kcompactd
compaction in the background even if you don't need order-9 memory later
(or you've defragmented needlessly when more slab is just going to be
allocated anyway).
Powered by blists - more mailing lists