From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jesse Brandeburg <jesse.brandeburg@gmail.com>,
Mike Qiu <qiudayu@linux.vnet.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org, wenxiong@linux.vnet.ibm.com,
brking@linux.vnet.ibm.com, zhenghch@cn.ibm.com,
haokexin@gmail.com, Peter Hurley <peter@hurleysoftware.com>,
Peter Zijlstra <peterz@infradead.org>,
Alexey Kardashevskiy <aik@ozlabs.ru>
Subject: Re: [PATCH libata/for-3.16-fixes] libata: introduce ata_host->n_tags to avoid oops on SAS controllers
Date: Wed, 23 Jul 2014 18:46:05 +0200 [thread overview]
Message-ID: <2111455.4B0otWTvWT@amdc1032> (raw)
In-Reply-To: <20140723163601.GE7103@htj.dyndns.org>
On Wednesday, July 23, 2014 12:36:01 PM Tejun Heo wrote:
> Hello,
>
> On Wed, Jul 23, 2014 at 06:31:58PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > Hmmm, wasn't ATA_MAX_QUEUE used before not ATA_MAX_QUEUE - 1?
> >
> > It seems that after your patch the loop in the ata_qc_new() will use
> > only 30 tags and not 31 ones?
>
> It was always 31 (ATA_MAX_QUEUE - 1) with the tag 31 reserved for EH
> commands. The previous patch just used limit value which is one too
> high. I'm planning to change that but this is the way it has always
> been.
I see, thanks for explaining this.
BTW:
/* the last tag is reserved for internal command. */
if (tag == ATA_TAG_INTERNAL)
continue;
in ata_qc_new()'s loop now becomes a dead code (loop will be done
maximum ATA_MAX_QUEUE - 2 times and ATA_TAG_INTERNAL is defined
as ATA_MAX_QUEUE - 1). Compiler can probably optimize it away so
as a bonus of your patch we may get one condition check less in
a hot-path. :)
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
next prev parent reply other threads:[~2014-07-23 16:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 14:51 [PATCH 2/2] libata: Fix NULL pointer of scsi_host in ata_port Mike Qiu
2014-07-22 14:58 ` Mike Qiu
[not found] ` <CAEuXFExJAq5hpYe8R_De7hOtGN1Jrx6HCQt0tQBAKnDTKEpaBA@mail.gmail.com>
2014-07-22 20:11 ` Tejun Heo
2014-07-23 2:29 ` Mike Qiu
2014-07-23 9:03 ` Alexey Kardashevskiy
2014-07-24 22:29 ` Jesse Brandeburg
2014-07-23 14:46 ` [PATCH libata/for-3.16-fixes] libata: introduce ata_host->n_tags to avoid oops on SAS controllers Tejun Heo
2014-07-23 16:31 ` Bartlomiej Zolnierkiewicz
2014-07-23 16:36 ` Tejun Heo
2014-07-23 16:46 ` Bartlomiej Zolnierkiewicz [this message]
2014-07-23 17:20 ` Tejun Heo
2014-07-22 19:47 ` [PATCH 2/2] libata: Fix NULL pointer of scsi_host in ata_port Peter Hurley
2014-07-23 2:37 ` Mike Qiu
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=2111455.4B0otWTvWT@amdc1032 \
--to=b.zolnierkie@samsung.com \
--cc=aik@ozlabs.ru \
--cc=brking@linux.vnet.ibm.com \
--cc=haokexin@gmail.com \
--cc=jesse.brandeburg@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=peterz@infradead.org \
--cc=qiudayu@linux.vnet.ibm.com \
--cc=tj@kernel.org \
--cc=wenxiong@linux.vnet.ibm.com \
--cc=zhenghch@cn.ibm.com \
/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