linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
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 13:20:11 -0400	[thread overview]
Message-ID: <20140723172011.GF7103@htj.dyndns.org> (raw)
In-Reply-To: <2111455.4B0otWTvWT@amdc1032>

Hello,

On Wed, Jul 23, 2014 at 06:46:05PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Wednesday, July 23, 2014 12:36:01 PM Tejun Heo wrote:
> 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. :)

ATA_TAG_INTERNAL will soon be replaced by a qc flag so this should all
go away pretty soon.  ata_qc_new() is quite badly implemented tho.  It
has no reason to do atomic test_and_set_bit() and there are far more
efficient ways to implement what it does.  If anybody is interested in
improving it, please go ahead.

Thanks.

-- 
tejun

  reply	other threads:[~2014-07-23 17:20 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
2014-07-23 17:20               ` Tejun Heo [this message]
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=20140723172011.GF7103@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=aik@ozlabs.ru \
    --cc=b.zolnierkie@samsung.com \
    --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=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;
as well as URLs for NNTP newsgroup(s).