linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org
Subject: Re: [RFC]extension of the anchor API
Date: Mon, 12 Apr 2021 11:58:16 +0200	[thread overview]
Message-ID: <8c11f03b08a0bdfd2761a74f5a7964067dc4b98b.camel@suse.com> (raw)
In-Reply-To: <20210408150725.GC1296449@rowland.harvard.edu>

Am Donnerstag, den 08.04.2021, 11:07 -0400 schrieb Alan Stern:
> On Thu, Apr 08, 2021 at 11:23:05AM +0200, Oliver Neukum wrote:
> > Am Donnerstag, den 25.03.2021, 14:38 -0400 schrieb Alan Stern:

> > Yes. If the URBs themselves, as opposed to their payloads, are
> > different, this will happen. Yet I am afraid we are looking at a
> > necessary race condition here. If you cancel a non-atomic operation,
> > you will need to deal with all possible intermediate stages of
> > completion.
> 
> That's not the point.  The point is that the description you wrote is 
> incorrect.
> 
> I can imagine someone who doesn't understand the details of the 
> anchor/mooring API creating an array of pointers to URBs, then filling 
> in those URBs in the array's order.  That would mess things up if a 
> previous kill caused the order of the anchor list to be different from 
> the array order.

OK, I will fix the description.

> How about instead of moving URBs to the end of the list when they 
> complete, you have the anchor maintain a pointer to the most recently 
> submitted URB?

That presumes that the URBs will finish in order. I don't think such
an assumption can be made.

	Regards
		Oliver



  reply	other threads:[~2021-04-12 10:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 11:03 [RFC]extension of the anchor API Oliver Neukum
2021-03-25 15:06 ` Alan Stern
2021-03-25 16:04   ` Oliver Neukum
2021-03-25 18:38     ` Alan Stern
2021-04-08  9:23       ` Oliver Neukum
2021-04-08 15:07         ` Alan Stern
2021-04-12  9:58           ` Oliver Neukum [this message]
2021-04-12 15:06             ` Alan Stern
2021-04-14  8:12               ` Oliver Neukum
2021-04-14 14:56                 ` Alan Stern
2021-04-15 11:23                   ` Oliver Neukum
2021-04-15 15:18                     ` Alan Stern

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=8c11f03b08a0bdfd2761a74f5a7964067dc4b98b.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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).