From: James Bottomley <James.Bottomley@SteelEye.com>
To: Andrew Morton <akpm@osdl.org>
Cc: "Ju, Seokmann" <Seokmann.Ju@lsil.com>,
Seokmann.Ju@engenio.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/1] megaraid_{mm,mbox}: fix a bug in reset handler
Date: Sat, 15 Apr 2006 09:00:23 -0500 [thread overview]
Message-ID: <1145109623.3573.7.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <20060412220011.2ddd6f63.akpm@osdl.org>
On Wed, 2006-04-12 at 22:00 -0700, Andrew Morton wrote:
> Oh my. That's an awfully long interrupts-off spin. 1.7e7 operations with
> an NMI watchdog timeout of five seconds - I'm surprised it doesn't trigger.
>
> Is that reading from a PCI register there? Or main memory?
It's a "mailbox" region, which is a piece of main memory shared between
the driver and the card (allocated using dma_alloc_coherent).
> I'm somewhat surprised that the compiler never "optimises" this into a
> lockup, actually. That's what `volatile' is for.
The rmb(); below ensures the compiler can't optimise. However, I do
agree; tagging the mailbox as volatile would show the compiler better
what the intent is.
> Is it not possible to do this with an interrupt?
I'd guess not. A lot of these types of driver have what's called a
doorbell/mailbox interface which means that as long as there's a command
slot you get access to the device (or wait for an interrupt to tell you
one's free) but you have to post the command to the device, so you wait
at the mailbox to see that it's taken (usually because the device has to
assign things like tracking numbers or indexes). The intent is for
there to be a fairly instantaneous response however firmware doesn't
always see it that way ...
> A `cpu_relax()' in that loop would help cool things down a bit.
Actually, I think a simple udelay(25) might help in a lot of these
loops.
James
next prev parent reply other threads:[~2006-04-15 14:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 13:09 Ju, Seokmann
2006-04-13 5:00 ` Andrew Morton
2006-04-13 5:05 ` Andrew Morton
2006-04-15 7:10 ` Andre Hedrick
2006-04-15 14:00 ` James Bottomley [this message]
2006-04-17 13:12 Ju, Seokmann
2006-04-18 14:50 Ju, Seokmann
2006-04-18 16:33 ` Andre Hedrick
2006-04-18 20:37 ` Andrew Morton
2006-04-18 17:28 Ju, Seokmann
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=1145109623.3573.7.camel@mulgrave.il.steeleye.com \
--to=james.bottomley@steeleye.com \
--cc=Seokmann.Ju@engenio.com \
--cc=Seokmann.Ju@lsil.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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
all inboxes | Powered by JetHome®