public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: ajay.opensrc <ajay.opensrc@micron.com>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
	"john@jagalactic.com" <john@jagalactic.com>,
	Eishan Mirakhur <emirakhur@micron.com>,
	Ajay Joshi <ajayjoshi@micron.com>,
	Srinivasulu Thanneeru <sthanneeru@micron.com>,
	Ravis OpenSrc <Ravis.OpenSrc@micron.com>,
	Aravind Ramesh <arramesh@micron.com>,
	"Tushar M Mulgund ." <tmmulgund@micron.com>
Subject: Re: [EXT] Re: [PATCH] hw/cxl: Add support for abort of background operation
Date: Thu, 15 Aug 2024 18:04:03 +0100	[thread overview]
Message-ID: <20240815180403.000025f0@Huawei.com> (raw)
In-Reply-To: <6erdnad5ql6xtzpwc6ay4mibud44u56kzd7r6nk5labxsmkkbi@e7lw2v7bffue>

On Mon, 12 Aug 2024 13:04:36 -0700
Davidlohr Bueso <dave@stgolabs.net> wrote:

> On Wed, 07 Aug 2024, ajay.opensrc wrote:\n
> >>From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
> >>So to my reading if you elect not to stop because it's very
> >>nearly done, or indeed it raced and the command is done,
> >>the specification doesn't tell us what to return.
> >>That operation supports abort, we just didn't.
> >>
> >>What do you think should happen here?  
> 
> I had interpreted this case to return success for the req abort
> command, but the caller had to check the Mailbox Status register
> to see if result had actually canceled the on going bg op.
> And I don't think there's a race between checking the status
> register and the on-going bg command completing. Aborting
> means percentage complete < 100 && bg field cleared.
I'm fine with it returning success, but I'm didn't read the spec
as actually saying it would. Maybe I missed something as these
cases where a call is a noop are classic corner cases where it
might return
a) you are crazy, why did you call that?
b) sure I'll do nothing.

> 
> Jonathan, would you want the patch to have an arbitrary "don't
> abort the bg op over 85% done"? I see this useful as it allows
> the cancel a bit more versatility, albeit potentially getting
> in the way of testing. What do you think?
I'd not bother - I think we will cancel very rarely in reality.
This is mostly a route around possible really long delays, not
a tool for normal operation.
> 
> >
> >IMHO, device should ignore the abort command and
> >most likely return "Unsupported" code (since, the spec is not
> >clear on what should be the return code in case the command
> >is ignored). Does it make sense?  
> 
> I don't think so. This is not an error imo. This case is about
> supporting the request abort command, but the actual command
> not actually triggering the desired cancel.
> 
> >
> >Agree that it's a spec hole and may need to be clarified.  
> 
> Yes, it would be nice to have this case be explicitly stated.
> And it is not even a corner case, the way the spec describes
> it, this case can perfectly happen.
Absolutely. I'll poke the relevant person.,

Jonathan

> 
> Thanks,
> Davidlohr


  reply	other threads:[~2024-08-15 17:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 10:20 [PATCH] hw/cxl: Add support for abort of background operation ajay.opensrc
2024-07-30  6:07 ` Davidlohr Bueso
2024-08-02 13:04   ` [EXT] " ajay.opensrc
2024-08-04 16:16     ` Jonathan Cameron
2024-08-07  9:04       ` ajay.opensrc
2024-08-12 20:04         ` Davidlohr Bueso
2024-08-15 17:04           ` Jonathan Cameron [this message]
2024-08-20 20:11             ` Jonathan Cameron

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=20240815180403.000025f0@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=Ravis.OpenSrc@micron.com \
    --cc=ajay.opensrc@micron.com \
    --cc=ajayjoshi@micron.com \
    --cc=arramesh@micron.com \
    --cc=dave@stgolabs.net \
    --cc=emirakhur@micron.com \
    --cc=john@jagalactic.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=sthanneeru@micron.com \
    --cc=tmmulgund@micron.com \
    /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