public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Ian Munsie <imunsie@au1•ibm.com>
Cc: Matt Ochs <mrochs@us•ibm.com>,
	linuxppc-dev <linuxppc-dev@ozlabs•org>, mikey <mikey@neuling•org>,
	linux-kernel <linux-kernel@vger•kernel.org>,
	Ian Munsie <imunsie@au1•ibm.com>
Subject: Re: cxl: Add alternate MMIO error handling
Date: Thu, 20 Aug 2015 09:14:16 +1000 (AEST)	[thread overview]
Message-ID: <20150819231416.858091409B7@ozlabs.org> (raw)
In-Reply-To: <1437633836-5051-1-git-send-email-imunsie@au.ibm.com>

On Thu, 2015-23-07 at 06:43:56 UTC, Ian Munsie wrote:
> From: Ian Munsie <imunsie@au1•ibm.com>
> 
> userspace programs using cxl currently have to use two strategies for
> dealing with MMIO errors simultaneously. They have to check every read
> for a return of all Fs in case the adapter has gone away and the kernel
> has not yet noticed, and they have to deal with SIGBUS in case the
> kernel has already noticed, invalidated the mapping and marked the
> context as failed.
> 
> In order to simplify things, this patch adds an alternative approach
> where the kernel will return a page filled with Fs instead of delivering
> a SIGBUS. This allows userspace to only need to deal with one of these
> two error paths, and is intended for use in libraries that use cxl
> transparently and may not be able to safely install a signal handler.
> 
> This approach will only work if certain constraints are met. Namely, if
> the application is both reading and writing to an address in the problem
> state area it cannot assume that a non-FF read is OK, as it may just be
> reading out a value it has previously written. Further - since only one
> page is used per context a write to a given offset would be visible when
> reading the same offset from a different page in the mapping (this only
> applies within a single context, not between contexts).
> 
> An application could deal with this by e.g. making sure it also reads
> from a read-only offset after any reads to a read/write offset.
> 
> Due to these constraints, this functionality must be explicitly
> requested by userspace when starting the context by passing in the
> CXL_START_WORK_ERR_FF flag.
> 
> Signed-off-by: Ian Munsie <imunsie@au1•ibm.com>
> Acked-by: Michael Neuling <mikey@neuling•org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/d9232a3da8683cd9c985

cheers

      parent reply	other threads:[~2015-08-19 23:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23  6:43 [PATCH] cxl: Add alternate MMIO error handling Ian Munsie
2015-08-07  3:19 ` Michael Neuling
2015-08-19 23:14 ` Michael Ellerman [this message]

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=20150819231416.858091409B7@ozlabs.org \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=imunsie@au1$(echo .)ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=mikey@neuling$(echo .)org \
    --cc=mrochs@us$(echo .)ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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