qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Ryan Harper <ryanh@us.ibm.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] Re: [PATCH 2/2] lsi, scsi-disk: check for reentrance via tag matching
Date: Fri, 23 Jan 2009 09:23:59 -0600	[thread overview]
Message-ID: <20090123152359.GK13481@us.ibm.com> (raw)
In-Reply-To: <4979DBA8.8080609@codemonkey.ws>

* Anthony Liguori <anthony@codemonkey.ws> [2009-01-23 09:09]:
> 
> By virtue of the fact that we do bdrv_aio_read() here, it *has* to be 
> safe to run the scsi_command_completes from a bottom half because 
> scsi_read_complete is going to get invoked from a bottom half anyway in 
> this path.
> 
> Am I missing something?

Just moving scsi_command_complete to a bottom half won't be sufficent
since lsi_command_complete() is also re-entrent via calls to
lsi_resume_script() which can invoke lsi_do_command().  The issue of
bottom halves for lsi is something I've thought about, but haven't
figured out how to only execute enough lsi scripts to complete the
current command.  Having the device stop executing scripts after sending
back the command completion to the OS was my first though on how to
prevent this loop, but so far, just stopping after just sending
the completion back to the OS isn't something that the OS driver
handles well.

I suppose once we figure out how to stop executing scripts after
sending command completion in a way that the OS drivers understand,
moving that to a bottom half will work fine.


-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com

  reply	other threads:[~2009-01-23 15:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 14:21 [Qemu-devel] [PATCH 0/2] LSI53C895A and scsi-disk fixes Ryan Harper
2009-01-23 14:21 ` [Qemu-devel] [PATCH 1/2] lsi: add ISTAT1 register read Ryan Harper
2009-01-23 14:21 ` [Qemu-devel] [PATCH 2/2] lsi, scsi-disk: check for reentrance via tag matching Ryan Harper
2009-01-23 15:00   ` [Qemu-devel] " Anthony Liguori
2009-01-23 15:23     ` Ryan Harper [this message]
2009-01-23 15:42       ` Anthony Liguori

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=20090123152359.GK13481@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).