lkml.org 
[lkml]   [2022]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/page_isolation: fix isolate_single_pageblock() isolation behavior
On Tue, 13 Sep 2022 22:39:13 -0400 Zi Yan <zi.yan@sent.com> wrote:

> set_migratetype_isolate() does not allow isolating MIGRATE_CMA pageblocks
> unless it is used for CMA allocation. isolate_single_pageblock() did not
> have the same behavior when it is used together with
> set_migratetype_isolate() in start_isolate_page_range(). This allows
> alloc_contig_range() with migratetype other than MIGRATE_CMA, like
> MIGRATE_MOVABLE (used by alloc_contig_pages()), to isolate first and last
> pageblock but fail the rest. The failure leads to changing migratetype
> of the first and last pageblock to MIGRATE_MOVABLE from MIGRATE_CMA,
> corrupting the CMA region. This can happen during gigantic page
> allocations.

How does this bug manifest itself as far as the user is concerned?

> Fix it by passing migratetype into isolate_single_pageblock(), so that
> set_migratetype_isolate() used by isolate_single_pageblock() will prevent
> the isolation happening.

\
 
 \ /
  Last update: 2022-09-15 00:42    [W:0.044 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site