Re: [PATCH] New QStor SATA/RAID Driver for 2.6.9-rc2

From: James Bottomley
Date: Tue Sep 14 2004 - 13:47:17 EST


On Tue, 2004-09-14 at 13:00, Jeff Garzik wrote:
> 9) use of do_sleep paradigm is dubious: you should instead try to keep
> your locked code regions as small as possible. in general, this code
> has far too many unlock-doit-lock sections.
>
> Experience has shown that too much unlock-doit-lock leads to bugs and
> increases the pain when analyzing your locking.
>
> In particular, releasing the lock and sleeping would be very wrong in
> the ->queuecommand and error handling paths (alas... I would love to
> sleep in the fine-grained eh hooks)

Actually, its only wrong in queuecommand because that can be called in
softirq context.

Sleeping in the eh paths is fine (as long as you drop the locks that the
EH thread has uselessly taken for you). Indeed it's often required
since the return is supposed to tell the eh thread whether the action
was successful or not.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/