From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>,
linux-ide@vger.kernel.org, linux-m68k@vger.kernel.org,
Michael Schmitz <schmitz@debian.org>,
Stephen R Marenka <stephen@marenka.net>
Subject: Re: [RFC PATCH] falconide: remove needless ST-DMA locking
Date: Sun, 9 Nov 2008 20:01:05 +0100 [thread overview]
Message-ID: <200811092001.05628.bzolnier@gmail.com> (raw)
In-Reply-To: <200810181225.48329.bzolnier@gmail.com>
On Saturday 18 October 2008, Bartlomiej Zolnierkiewicz wrote:
> On Saturday 18 October 2008, Geert Uytterhoeven wrote:
> > On Sat, 18 Oct 2008, Michael Schmitz wrote:
> > > > While working on ide_do_request() improvements I stumbled upon
> > > > mismatched ide_get_lock() / ide_release_lock() calls.
> > > >
> > > > [ It seems to be known issue:
> > > > http://marc.info/?l=linux-m68k&m=121423752829622&w=2 ]
> > >
> > > It is a known issue, and I submitted a simple fix to Geert a month or so ago.
> > > It involves moving the ide_get_lock call inside the request loop instead of
> > > doing it once at the start of the function.
> >
> > See http://marc.info/?l=linux-ide&m=121473433631934&w=2
> >
> > In response to this patch, I wondered:
> >
> > > > If hwgroup->busy serves a similar purpose to falconide_intr_lock, what
> > > > about
> > > > moving the setting/clearing of hwgroup->busy into
> > > > ide_{get,release}_lock()
> > > > (and possibly renaming ide_{get,release}_lock() to e.g.
> > > > ide_hwgroup_{set,clear}_busy())?
> > > >
> > > > What about the other places where hwgroup->busy is set/cleared?
> >
> > And Michael responsed:
> >
> > > Uh - that's where it gets a bit sticky again. hwgroup->busy is set and
> > > cleared quite a lot 'preemptively' all over ide-io.c, f.e. in timeout
> > > handling. I'm not sure
> > > whether this would just reintroduce the bug message.
> > >
> > > The lock must be held as long as there are any interrupts to be expected
> > > from IDE. If the hwgroup->busy semantics reflects just that, it's worth
> > > a try.
> >
> > Bart, can you shed a light on the hwgroup->busy semantics?
>
> hwgroup->busy means that hwgroup is busy ;-)
>
> It protects against any access to the underlying hardware so it is
> also used when device is accessed in polling mode (without waiting
> for IRQ). However your proposal still sounds fine. We can treat
> hwgroup->busy as "waiting for IRQ" flag on Falcon and it would be
> correct (we will just hold the lock needlessly sometimes but we're
> already doing exactly that).
>
> [ The one thing that we have to watch out is not to leak IDE core
> specific things to <asm/ide.h> and host/platform specific ones to
> IDE core so some new abstraction level may be needed for handling
> ST-DMA lock itself (->[un]lock_host methods in struct ide_port_ops
> or something along the lines)... ]
Since there was no follow-ups on this I've just applied Michael's
patch for now (& will push it to Linus for .28)...
next prev parent reply other threads:[~2008-11-09 19:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-17 18:41 [RFC PATCH] falconide: remove needless ST-DMA locking Bartlomiej Zolnierkiewicz
2008-10-17 22:32 ` Michael Schmitz
2008-10-18 8:48 ` Geert Uytterhoeven
2008-10-18 10:25 ` Bartlomiej Zolnierkiewicz
2008-11-09 19:01 ` Bartlomiej Zolnierkiewicz [this message]
2008-11-16 11:07 ` Geert Uytterhoeven
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=200811092001.05628.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=schmitz@biophys.uni-duesseldorf.de \
--cc=schmitz@debian.org \
--cc=stephen@marenka.net \
/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).