public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: William Chow <lilbilchow@yahoo.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: is it ok to receive SIGIO in the same context calling SG code?
Date: Tue, 20 May 2003 14:49:22 +1000	[thread overview]
Message-ID: <3EC9B3D2.9070009@torque.net> (raw)
In-Reply-To: <20030505194408.31127.qmail@web13808.mail.yahoo.com>

William Chow wrote:
> The documentation associated with the UNH target
> emulator project indicates that the thread which
> receives the SIGIO cannot also be the context which
> calls SG, e.g. for submitting the async I/O. It states
> that "there are certain sections of the SCSI generic
> code that do not expect to receive signals". Does
> anyone have any information, implementational or even
> empirical, that would confirm/refute this?

William,
Well I found the reference but I'm not sure exactly what
was meant by that. The reference was dated 2001 so things
may have improved since then (but I do not remember addressing
any problem in that area).

In a followup post to me you asked about async completion
callbacks. After looking at Jonathan Corbet's article about
async I/O in the lk 2.5 series, it should be relatively
simple to add a aio_write() entry point in sg. It would
have the same semantics as sg's normal write(). When the
response to the command is received the associated
aio_complete() could be called. The SCSI status byte could
even be placed in 'res2'.


[Aside: the SG_IO ioctl is synchronous. The asynchronous
interface offered by the sg driver (via write()/read())
does have its uses (and users).]

Doug Gilbert



      reply	other threads:[~2003-05-20  4:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-05 19:44 is it ok to receive SIGIO in the same context calling SG code? William Chow
2003-05-20  4:49 ` Douglas Gilbert [this message]

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=3EC9B3D2.9070009@torque.net \
    --to=dougg@torque.net \
    --cc=lilbilchow@yahoo.com \
    --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