[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Daniel Kiper
Subject: Re: [PATCH 19/19] RFC: Ignore REGION_CONSECUTIVE
Date: Wed, 10 Nov 2021 15:00:15 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Oct 12, 2021 at 06:30:08PM +1100, Daniel Axtens wrote:
> Looking into the region merging stuff, I started to wonder if we actually
> want to just try adding as much memory as we can (up to the limit requested),
> even if we cannot satisfy the full allocation (i.e. we are not CONSECUTIVE).
> On powerpc-ieee1275 this actually allows me to satisfy bigger allocations:
> while the FW cannot necessarily satisfy e.g. a 128MB allocation, it can
> satisfy e.g. a 32MB allocation, and that might merge with a region that's
> 100MB, and then we can satisfy our 128MB allocation.
> The way the call out to firmware operates in mm.c is that it preceeds a
> 'goto again;' - it kicks off a whole new round of attempting to satisfy
> allocation. mm.c doesn't fill the allocation only from the new memory from
> firmware.
> Perhaps an even better approach would be for the mm.c code to try going to
> firmware twice - once for the precise size of the allocation (rounded up etc)
> and then if that doesn't succeed go back and ask for 'anything you can give 
> me'?

I think this is good idea. Though maybe we should allow platforms to
choose mode of operation, i.e. try to allocate one memory region with
precise size first and if this does not work then fulfill my request
returning memory to the GRUB mm in chunks or vice versa or maybe some
platforms would want to use only one allocation strategy...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]