public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Neil Conway <nconway.list@ukaea.org.uk>
To: Martin Dalecki <dalecki@evision-ventures.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.15 IDE 61
Date: Tue, 14 May 2002 11:12:22 +0100	[thread overview]
Message-ID: <3CE0E306.6171045B@ukaea.org.uk> (raw)
In-Reply-To: <3CE0DDBE.F9EC80AC@ukaea.org.uk> <3CE0D067.6010302@evision-ventures.com>

Martin Dalecki wrote:
> 
> Uz.ytkownik Neil Conway napisa?:
> > The hwgroup was serialized so that in certain cases, it can contain BOTH
> > channels, and thus only one channel is active at a time (e.g. cmd640).
> > With this patch, you are now serializing only channels, not hwgroups
> > (which makes hwgroup totally redundant, yes?), and I can't see which bit
> > of your patch protects the chipsets that need both channels to be
> > serialized.
> >
> > I think I see where you're going with the cleanup (and this isn't
> > unrelated to the conversation about IDE-62) but as it stands, this patch
> > will IMHO totally fsck any machines with dodgy chipsets.
> 
> No it will not, since we act serialized on ide_lock anyway.
> However I have right now per channel (or serialization group)
> lock running right now / modulo locking order problems.

One of us is missing the point (and I'm the newbie so blame me ;-)), so
here goes:

Only the calls from the block layer to the request_fn are serialized by
ide_lock. Not the actual data transfers.  Here's the scenario: 

Firstly, an I/O request is queued by ide_do_request(), and then it
returns.  Let's assume that DMA is now in progress.  Once
ide_do_request() returns, the lock is released by the block layer.  Now
the corruption scenario: another request can come in for the other
channel while our first I/O is in flight, and since the ide_lock isn't
held, and the second channel isn't BUSY, ide_do_request() will be happy
to try and start an I/O on that channel too.  BOOM.

Or is there a dumb mistake in my logic?

Neil
PS: I appreciate that your code is in a transition phase but I think
it's desirable to avoid badly broken 2.5's all the same.

  reply	other threads:[~2002-05-14 10:12 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-14  9:49 [PATCH] 2.5.15 IDE 61 Neil Conway
2002-05-14  8:52 ` Martin Dalecki
2002-05-14 10:12   ` Neil Conway [this message]
2002-05-14  9:30     ` Martin Dalecki
2002-05-14 11:10       ` Neil Conway
2002-05-14 10:21         ` Martin Dalecki
2002-05-14 11:38           ` Russell King
2002-05-14 10:49             ` Martin Dalecki
2002-05-14 12:10             ` Alan Cox
2002-05-14 11:11               ` Martin Dalecki
2002-05-14 12:47                 ` Alan Cox
2002-05-14 12:30                   ` Martin Dalecki
2002-05-15 14:43                 ` Pavel Machek
2002-05-14 12:00               ` Russell King
2002-05-14 11:03                 ` Martin Dalecki
2002-05-14 13:03               ` Neil Conway
2002-05-14 13:27                 ` Andre Hedrick
2002-05-14 14:45                 ` Alan Cox
2002-05-14 14:30                   ` Martin Dalecki
2002-05-14 16:20                     ` Neil Conway
2002-05-14 16:32                       ` Jens Axboe
2002-05-14 16:47                         ` Neil Conway
2002-05-14 16:51                           ` Jens Axboe
2002-05-15 11:37                             ` Neil Conway
2002-05-14 22:51                           ` Mike Fedyk
2002-05-14 16:26                     ` Jens Axboe
2002-05-14 19:34                     ` Anton Altaparmakov
2002-05-15  6:16                       ` Jens Axboe
2002-05-15  8:32                         ` Anton Altaparmakov
2002-05-15  9:42                           ` Martin Dalecki
2002-05-15  9:32                       ` Martin Dalecki
2002-05-15 11:44                         ` Neil Conway
2002-05-15 11:02                           ` Martin Dalecki
2002-05-15 13:10                             ` Alan Cox
2002-05-15 13:34                               ` Neil Conway
2002-05-15 13:04                                 ` Martin Dalecki
2002-05-15 14:08                               ` benh
2002-05-15 16:40                         ` Denis Vlasenko
2002-05-15 11:55                           ` Neil Conway
2002-05-17  7:07                             ` Mike Fedyk
2002-05-17 11:06                               ` Neil Conway
2002-05-17 10:12                                 ` Martin Dalecki
2002-05-14 16:03                   ` Neil Conway
2002-05-14 16:46                     ` Alan Cox
2002-05-14 12:52       ` Daniela Engert
  -- strict thread matches above, loose matches on Subject: below --
2002-05-06  3:53 Linux-2.5.14 Linus Torvalds
2002-05-13  9:48 ` [PATCH] 2.5.15 IDE 61 Martin Dalecki

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=3CE0E306.6171045B@ukaea.org.uk \
    --to=nconway.list@ukaea.org.uk \
    --cc=dalecki@evision-ventures.com \
    --cc=linux-kernel@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