Re: [PATCH 2/3] mm: add find_alloc_contig_pages() interface
From: Michal Hocko <mhocko@kernel.org>
Date: 2018-04-24 13:37:50
Also in:
linux-mm, lkml
From: Michal Hocko <mhocko@kernel.org>
Date: 2018-04-24 13:37:50
Also in:
linux-mm, lkml
On Sun 22-04-18 21:22:07, Mike Kravetz wrote:
On 04/22/2018 05:09 PM, Michal Hocko wrote:
[...
quoted
Also do we want to check other usual suspects? E.g. PageReserved? And generally migrateable pages if page count > 0. Or do we want to leave everything to the alloc_contig_range?I think you proposed something like the above with limited checking at some time in the past. In my testing, allocations were more likely to succeed if we did limited testing here and let alloc_contig_range take a shot at migration/allocation. There really are two ways to approach this, do as much checking up front or let it be handled by alloc_contig_range.
OK, it would be great to have a comment mentioning that. The discrepancy will just hit eyes [...]
Unless I am missing something, calls to alloc_contig range need to have a size that is a multiple of page block. This is because isolation needs to take place at a page block level. We can easily 'round up' and release excess pages.
I am not sure but can we simply leave a part of the page block behind? I mean it might have a misleading migrate type but that shouldn't matter much, no? Thanks! -- Michal Hocko SUSE Labs