On Thu, 2010-11-11 at 02:46 -0800, Nicholas A. Bellinger wrote:
Actually, no ... this isn't really a good idea; you're lengthening our
critical path here (an atomic costs a lot more than a simple add under
spinlock).
There are only a few drivers left that actually make use of a serial
number. Of those, the only modern ones are qla4, lpfc, mpt2sas and
megaraid.
So the next logical step seems to be eliminate the overloading of the
serial number zero value, which removes the last mid-layer use (dpt_i2o
seems to abuse this unnecessarily as well), then the serial number code
can be pushed down into the queuecommand routines of only those drivers
that actually use it. None of the modern ones seems to have a
legitimate use, so I think their uses can mostly be eliminated. Thus,
we might be able to get away with a simple queuecommand push down and
never bother with atomics for this (since it's unlikely the legacy users
would convert away from a lock wrapping their queuecommand routines).
James
--