[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c34e3768-8a01-d155-1970-8eada8c80ba7@redhat.com>
Date: Wed, 17 May 2023 20:32:51 +0200
From: David Hildenbrand <david@...hat.com>
To: Khalid Aziz <khalid.aziz@...cle.com>, akpm@...ux-foundation.org
Cc: willy@...radead.org, steven.sistare@...cle.com,
ying.huang@...el.com, mgorman@...hsingularity.net,
khalid@...nel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] mm, compaction: Skip all non-migratable pages during
scan
On 17.05.23 18:15, Khalid Aziz wrote:
> Pages pinned in memory through extra refcounts can not be migrated.
> Currently as isolate_migratepages_block() scans pages for
> compaction, it skips any pinned anonymous pages. All non-migratable
> pages should be skipped and not just the anonymous pinned pages.
> This patch adds a check for extra refcounts on a page to determine
> if the page can be migrated. This was seen as a real issue on a
> customer workload where a large number of pages were pinned by vfio
> on the host and any attempts to allocate hugepages resulted in
> significant amount of cpu time spent in either direct compaction or
> in kcompactd scanning vfio pinned pages over and over again that can
> not be migrated.
How will this change affect alloc_contig_range(), such as used for CMA
allocations or virtio-mem? alloc_contig_range() ends up calling
isolate_migratepages_range() -> isolate_migratepages_block().
We don't want to fail early in case there is a short-term pin that might
go away any moment after we isolated ... that will make the situation
worse for these use cases, especially if MIGRATE_CMA or ZONE_MOVABLE is
involved.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists