[2/2] cxl: Fix allocating a minimum of 2 pages for the SPA

Michael Ellerman mpe at ellerman.id.au
Mon Jul 11 20:19:22 AEST 2016


On Wed, 2016-29-06 at 12:16:26 UTC, Ian Munsie wrote:
> From: Ian Munsie <imunsie at au1.ibm.com>
> 
> The Scheduled Process Area is allocated dynamically with enough pages to
> fit at least as many processes as the AFU descriptor indicated. Since
> the calculation is non-trivial, it does this by calculating how many
> processes could fit in an allocation of a given order, and increasing
> that order until it can fit enough processes or hits the maximum
> supported size.
> 
> Currently, it will start this search using a SPA of 2 pages instead of
> 1. This can waste a page of memory if the AFU's maximum number of
> supported processes was small enough to fit in one page.
> 
> Fix the algorithm to start the search at 1 page.
> 
> Signed-off-by: Ian Munsie <imunsie at au1.ibm.com>
> Reviewed-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
> Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/2224b6719b09052a9fbf29422a

cheers


More information about the Linuxppc-dev mailing list