[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zfpmyhvr.ffs@tglx>
Date: Thu, 08 Aug 2024 20:44:08 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Dan Williams <dan.j.williams@...el.com>, Dan Williams
<dan.j.williams@...el.com>, Max Ramanouski <max8rr8@...il.com>,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org
Cc: max8rr8@...il.com, linux-kernel@...r.kernel.org, x86@...nel.org, Dan
Williams <dan.j.williams@...el.com>
Subject: Re: [PATCH 1/1] x86/ioremap: Use is_vmalloc_addr in iounmap
On Thu, Aug 08 2024 at 09:39, Dan Williams wrote:
> Dan Williams wrote:
>> Apologies was trying to quickly reverse engineer how private memory
>> might be different than typical memremap_pages(), but it is indeed the
>> same in this aspect.
>>
>> So the real difference is that the private memory case tries to
>> allocate physical memory by searching for holes in the iomem_resource
>> starting from U64_MAX. That might explain why only the private memory
>> case is violating assumptions with respect to high_memory spilling into
>> vmalloc space.
>
> Not U64_MAX, but it starts searching for free physical address space
> starting at MAX_PHYSMEM_BITS, see gfr_start().
Wait. MAX_PHYSMEM_BITS is either 46 (4-level) or 52 (5-level), which is
fully covered by the identity map space.
So even if the search starts from top of that space, how do we end up
with high_memory > VMALLOC_START?
That does not make any sense at all.
> That aspect of private memory has always bothered me, but I am not
> sure that is the historical assumption violation you are referring to
> above.
The historical assumption about max_pfn and high_memory is that this is
the end of the actual memory space.
Thanks,
tglx
Powered by blists - more mailing lists