[PATCH] cxl: Fix number of allocated pages in SPA

Ian Munsie imunsie at au1.ibm.com
Wed Oct 7 14:24:46 AEDT 2015


Excerpts from Michael Ellerman's message of 2015-10-06 17:19:02 +1100:
> On Fri, 2015-10-02 at 16:01 +0200, Christophe Lombard wrote:
> > This moves the initialisation of the num_procs to before the SPA
> > allocation.
> 
> Why? What does it fix? I can't tell from the diff or the change log.

This will mean we only ever allocate a fixed number of pages for the
scheduled process area (which in itself looks like it has a minor bug as
it will start trying at two pages instead of one), which will limit us
to 958 processes with 2 x 64K pages. If we actually try to use more
processes than that we'd probably overrun the buffer and corrupt memory
or crash.

The only reason we haven't hit this out in the field so far is any AFUs
the requires at least three interrupts per process is already limited to
less processes than that anyway (e.g. min of 4 interrupts limits it to
509 processes, and all the AFUs I'm aware of require at least that many
interrupts), but we could hit it on an AFU that requires 0, 1 or 2
interrupts per process, or when using 4K pages.

This fix should go to stable.

@Christophe, can you resend with this info in the commit message?

Cheers,
-Ian



More information about the Linuxppc-dev mailing list