[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 11 Nov 2021 07:19:40 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Mike Rapoport <rppt@...nel.org>, x86@...nel.org
Cc: Andy Lutomirski <luto@...nel.org>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Mike Rapoport <rppt@...ux.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] x86/mm: replace GFP_ATOMIC with GFP_KERNEL for direct
map allocations
On 11/11/21 3:02 AM, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@...ux.ibm.com>
>
> The allocations of the direct map pages are mostly happen very early during
> the system boot and they use either the page table cache in brk area of bss
> or memblock.
>
> The few callers that effectively use page allocator for the direct map
> updates are gart_iommu_init() and memory hotplug. Neither of them happen in
> an atomic context so there is no reason to use GFP_ATOMIC for these
> allocations.
>
> Replace GFP_ATOMIC with GFP_KERNEL to avoid using atomic reserves for
> allocations that do not require that.
I usually think of the biggest downside of GFP_ATOMIC as being that it
fails more often. But, since we tend not to be low on memory in early
boot, GFP_ATOMIC and GFP_KERNEL end up being pretty close in actual
behavior.
These allocations also get exposed via init_extra_mapping_*(). But,
those are used via early_initcall()s where GFP_KERNEL is fine too.
Those are a bit worrying because they're in somewhat nice code, like the
Numascale APIC code. I'm not sure how much use it sees these days.
I guess if this goes wrong somehow, we'll get some nice splats to tell
us what happened.
Was this motivated by anything in particular? Or is it a pure cleanup?
Powered by blists - more mailing lists