Linux CXL
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Dan Williams <dan.j.williams@intel.com>
Cc: <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH 3/3] cxl/region: Fix state transitions after reset failure
Date: Sun, 25 Jun 2023 13:42:04 -0700	[thread overview]
Message-ID: <6498a69cbfeaa_1dff29448@dwillia2-mobl3.amr.corp.intel.com.notmuch> (raw)
In-Reply-To: <20230622101802.00003556@Huawei.com>

Jonathan Cameron wrote:
> On Fri, 16 Jun 2023 18:24:39 -0700
> Dan Williams <dan.j.williams@intel.com> wrote:
> 
> > Jonathan reports that failed attempts to reset a region (teardown its
> > HDM decoder configuration) mistakenly advance the state of the region
> > to "not committed". Revert to the previous state of the region on reset
> > failure so that the reset can be re-attempted.
> > 
> > Reported-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
> > Closes: http://lore.kernel.org/r/20230316171441.0000205b@Huawei.com
> > Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware")
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> LGTM - though maybe even nicer if we can be pretty sure this will succeed
> before trying it.. (same comment as previous patch)

I had the same reaction, but satisfied myself that this is something
that userspace can manage. I.e. tooling can effectively predict when the
kernel will complain about this ordering situation and prevent it. In
other words, the only way this happens in practice is if userspace makes
a mistake.

It is already the case that partially committed decoders need to be
tolerated by the platform since setup and teardown are not atomic. So I
think 'cxl destroy-region' is where this follow-on smarts belongs.

> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Thanks for the collaboration as always.

      reply	other threads:[~2023-06-25 20:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-17  1:24 [PATCH 0/3] cxl/region: Cache management and region decode reset fixes Dan Williams
2023-06-17  1:24 ` [PATCH 1/3] cxl/region: Move cache invalidation before region teardown, and before setup Dan Williams
2023-06-21  0:00   ` Dave Jiang
2023-06-22  9:00   ` Jonathan Cameron
2023-06-17  1:24 ` [PATCH 2/3] cxl/region: Flag partially torn down regions as unusable Dan Williams
2023-06-21  0:04   ` Dave Jiang
2023-06-22  9:14   ` Jonathan Cameron
2023-06-17  1:24 ` [PATCH 3/3] cxl/region: Fix state transitions after reset failure Dan Williams
2023-06-21  0:06   ` Dave Jiang
2023-06-22  9:18   ` Jonathan Cameron
2023-06-25 20:42     ` Dan Williams [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=6498a69cbfeaa_1dff29448@dwillia2-mobl3.amr.corp.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    /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