linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ian Munsie <imunsie@au1.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christophe Lombard <clombard@linux.vnet.ibm.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] cxl: Fix number of allocated pages in SPA
Date: Wed, 07 Oct 2015 14:24:46 +1100	[thread overview]
Message-ID: <1444187065-sup-7898@delenn.ozlabs.ibm.com> (raw)
In-Reply-To: <1444112342.16578.1.camel@ellerman.id.au>

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

  parent reply	other threads:[~2015-10-07  3:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 14:01 [PATCH] cxl: Fix number of allocated pages in SPA Christophe Lombard
2015-10-06  0:23 ` Ian Munsie
2015-10-06  6:19 ` Michael Ellerman
2015-10-06  9:21   ` christophe lombard
2015-10-07  3:24   ` Ian Munsie [this message]
2015-10-07  4:09 [PATCH v2] " Michael Ellerman
2015-10-07  5:07 ` [PATCH] " Ian Munsie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444187065-sup-7898@delenn.ozlabs.ibm.com \
    --to=imunsie@au1.ibm.com \
    --cc=clombard@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).