[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb83fcd9-f331-4d54-1ab9-78db106ee66d@intel.com>
Date: Fri, 5 Aug 2022 07:41:38 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Vlastimil Babka <vbabka@...e.cz>,
David Hildenbrand <david@...hat.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...nel.org>,
Sean Christopherson <seanjc@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Joerg Roedel <jroedel@...e.de>,
Ard Biesheuvel <ardb@...nel.org>
Cc: Andi Kleen <ak@...ux.intel.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
David Rientjes <rientjes@...gle.com>,
Tom Lendacky <thomas.lendacky@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
Dario Faggioli <dfaggioli@...e.com>,
Mike Rapoport <rppt@...nel.org>, marcelo.cerri@...onical.com,
tim.gardner@...onical.com, khalid.elmously@...onical.com,
philip.cox@...onical.com, x86@...nel.org, linux-mm@...ck.org,
linux-coco@...ts.linux.dev, linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org, Mike Rapoport <rppt@...ux.ibm.com>,
Mel Gorman <mgorman@...hsingularity.net>
Subject: Re: [PATCHv7 02/14] mm: Add support for unaccepted memory
On 8/5/22 06:38, Vlastimil Babka wrote:
>> I'm sure we could optimize for the !unaccepted memory via static keys
>> also in this version with some checks at the right places if we find
>> this to hurt performance?
> It would be great if we would at least somehow hit the necessary code only
> when dealing with a >=pageblock size block. The bitmap approach and
> accepting everything smaller uprofront actually seems rather compatible. Yet
> in the current patch we e.g. check PageUnaccepted(buddy) on every buddy size
> while merging.
Needing to check PageUnaccepted() during the merge is fallout from
moving the acceptance to post_alloc_hook(). I _think_ an earlier
version of this did page acceptance under the zone lock, closer to where
the page comes off the 2M/4M lists.
But, page acceptance is horribly slow, so I asked Kirill to move it out
from under the zone lock. Doing it in post_alloc_hook() (after the zone
lock is dropped) makes a lot of sense since we do zeroing in there and
zeroing is also nice and slow.
But, post_alloc_hook() is long after the 2M page has been split and that
means that we have to deal with potentially unaccepted pages during merges.
I think there are three basic options:
1. This patch: Do acceptance after the zone lock is dropped and deal
with mixed-acceptance merges
2. Do acceptance under the zone lock as pages come off the 2M/4M lists,
but before the page is split.
3. Pull the page off the 2M/4M lists, drop the zone lock, accept it,
then put it back.
I'm not sure any of those other options are better.
Powered by blists - more mailing lists