From: James Bottomley <James.Bottomley@suse.de>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Jeff Garzik <jeff@garzik.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] scsi: Convert scsi_host->cmd_serial_number to odd numbered atomic_t counter
Date: Thu, 11 Nov 2010 09:53:03 -0600 [thread overview]
Message-ID: <1289490783.2982.33.camel@mulgrave.site> (raw)
In-Reply-To: <1289472405-31003-1-git-send-email-nab@linux-iscsi.org>
On Thu, 2010-11-11 at 02:46 -0800, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> This patch converts struct scsi_host->cmd_serial_number to a 'odd incremented by 2'
> atomic_t counter in scsi_cmd_get_serial(), and moves the host_lock held call in
> jgarzik's DEF_SCSI_QCMD() wrapper back into it's original location in scsi_dispatch_cmd().
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
next prev parent reply other threads:[~2010-11-11 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 10:46 Nicholas A. Bellinger
2010-11-11 15:53 ` James Bottomley [this message]
2010-11-11 21:37 ` Nicholas A. Bellinger
2010-11-11 21:55 ` James Bottomley
2010-11-11 22:08 ` Nicholas A. Bellinger
2010-11-11 22:36 ` Mike Anderson
2010-11-17 16:10 ` James Bottomley
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=1289490783.2982.33.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=hch@lst.de \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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
all inboxes | Powered by JetHome®