From: Jens Axboe <axboe@suse.de>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [SCSI] fix wrong context bugs in SCSI
Date: Wed, 8 Feb 2006 16:52:43 +0100 [thread overview]
Message-ID: <20060208155242.GO4338@suse.de> (raw)
In-Reply-To: <1139412662.3003.5.camel@mulgrave.il.steeleye.com>
On Wed, Feb 08 2006, James Bottomley wrote:
> On Wed, 2006-02-08 at 09:56 +0100, Jens Axboe wrote:
> > Hmm, this (and further up) could fail, yet you don't check.
>
> By and large, you have process context, so this isn't going to be a
> problem.
>
> > I don't think this API is very nice to be honest, there's no good way to
> > handle failures - you can't just sleep and loop retry the execute if you
> > are in_interrupt(). I'd prefer passing in a work_queue_work (with a
> > better name :-) that has been allocated at a reliable time during
> > initialization.
>
> Yes, I agree ... however, the failure is less prevalent in the new code
> than the old. The problem is that we may need to execute multiple puts
> for a single target from irq contex, so under this scheme you need a wqw
> (potentially) for every get.
>
> I could solve this by binding the API more tightly into the device
> model, so the generic device contains the wqw and it is told that the
> release function of the final put must be called in process context, but
> that's an awful lot of code changes.
Yeah it does get a lot more complicated. I guess I'm fine with the
current change, but please just keep it in SCSI then. It's not the sort
of thing you'd want to advertise as an exported API.
--
Jens Axboe
next prev parent reply other threads:[~2006-02-08 15:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-07 20:00 [PATCH] add execute_in_process_context() API James Bottomley
2006-02-07 20:08 ` [SCSI] fix wrong context bugs in SCSI James Bottomley
2006-02-07 22:05 ` Brian King
2006-02-07 23:26 ` James Bottomley
2006-02-08 8:56 ` Jens Axboe
2006-02-08 15:31 ` James Bottomley
2006-02-08 15:52 ` Jens Axboe [this message]
2006-02-14 16:42 ` James Bottomley
2006-02-14 16:48 ` James Bottomley
2006-02-07 20:26 ` [PATCH] add execute_in_process_context() API Dave Jones
2006-02-07 20:34 ` Andrew Morton
2006-02-08 12:51 ` Stefan Richter
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=20060208155242.GO4338@suse.de \
--to=axboe@suse.de \
--cc=James.Bottomley@SteelEye.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.