All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH][linux 2.6.18] remove pointless error handling in scsiback
Date: Wed, 02 Jul 2014 09:08:13 +0200	[thread overview]
Message-ID: <53B3AFDD.2030004@suse.com> (raw)
In-Reply-To: <53B3C83A020000780001F4A9@mail.emea.novell.com>

On 07/02/2014 08:52 AM, Jan Beulich wrote:
>>>> On 01.07.14 at 20:51, <JGross@suse.com> wrote:
>> On 07/01/2014 05:39 PM, Jan Beulich wrote:
>>>>>> On 01.07.14 at 17:27, <"jgross@suse.com".non-mime.internet> wrote:
>>>> From: Juergen Gross <jgross@suse.com>
>>>>
>>>> It makes no sense to try repeating traversing the lun list in case of a
>>>> possible mismatch between the original counting of luns and the real
>>>> processing.
>>>
>>> Perhaps the retry logic isn't correct, but with the lock being dropped
>>> between the two loops I'm not sure the retry makes no sense. Can
>>> you explain?
>>
>> In theory the number of LUNs could have just changed between
>> counting them and evaluating them. The counting isn't redone,
>> so what's the point of retrying? What are the chances a matching
>> LUN will appear and disappear in just the correct timing?
>>
>> You could argue the counting should be included in the retry loop.
>> But then doing a limited number of retries is only decreasing the
>> chance of a problem, not eliminating it.
>>
>> The real fix would be to process the LUNs in the first run without
>> using an intermediate buffer by filling the domU's buffer directly.
>> This would avoid all race conditions.
>
> I did a little archaeology and managed to spot where the retry (which
> was added after the initial introduction of pvSCSI) came from. See
> http://lists.xenproject.org/archives/html/xen-devel/2008-07/msg00915.html
> - effectively you're requesting to revert changeset 610:3bcc901cbd7a,
> i.e. you would need to (a) say so in the description and (b) explain
> why the change (and the reasoning having led to it) was wrong. And
> _if_ we indeed decide to undo this, the file should then also be pruned
> of the VSCSI_REPORT_LUNS_RETRY definition.

Okay. I think the reasoning was wrong indeed. After thinking about this
some more time I came to the conclusion that multiple failures are not
completely unlikely when a target with many LUNs is added while the domU
is trying to probe the target (e.g. when the first LUN was detected).
The single LUNs will be added to the backend one after another, so the
count of matching LUNs will increase rather fast.

I'll respin the patch with a proper description.

Juergen

  reply	other threads:[~2014-07-02  7:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 15:27 [PATCH][linux 2.6.18] remove pointless error handling in scsiback jgross
2014-07-01 15:39 ` Jan Beulich
2014-07-01 18:51   ` Jürgen Groß
2014-07-02  6:52     ` Jan Beulich
2014-07-02  7:08       ` Juergen Gross [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-07-02  7:26 jgross
2014-07-02 11:57 ` Jan Beulich
2014-07-02 12:13   ` Jürgen Groß
2014-07-02 12:27     ` Jan Beulich
2014-07-02 12:33       ` Jan Beulich
2014-07-02 12:38         ` Jürgen Groß

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=53B3AFDD.2030004@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.