[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f62c9623-bf5c-6fdb-afa5-9ff04c8fde70@redhat.com>
Date: Thu, 4 Jun 2020 17:27:45 +0200
From: David Hildenbrand <david@...hat.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: Miles Chen <miles.chen@...iatek.com>, wsd_upstream@...iatek.com,
Joerg Roedel <joro@...tes.org>, linux-kernel@...r.kernel.org,
Chao Hao <chao.hao@...iatek.com>,
iommu@...ts.linux-foundation.org,
linux-mediatek@...ts.infradead.org, Yong Wu <yong.wu@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
yingjoe.chen@...iatek.com, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] iommu/mediatek: Use totalram_pages to setup enable_4GB
On 04.06.20 17:06, Christoph Hellwig wrote:
> On Thu, Jun 04, 2020 at 01:32:40PM +0200, David Hildenbrand wrote:
>> Just a thought: If memory hotplug is applicable as well, you might
>> either want to always assume data->enable_4GB, or handle memory hotplug
>> events from the memory notifier, when new memory gets onlined (not sure
>> how tricky that is).
>
> We probably want a highest_pfn_possible() or similar API instead of
> having drivers poking into random VM internals.
Well, memory notifiers are a reasonable api used accross the kernel to
get notified when new memory is onlined to the buddy that could be used
for allocations.
highest_pfn_possible() would have to default to something linked to
MAX_PHYSMEM_BITS whenever memory hotplug is configured, I am not sure
how helpful that is (IOW, you can just default to enable_4GB=true in
that case instead in most cases).
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists