lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Jul 2014 13:20:11 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc:	Jesse Brandeburg <jesse.brandeburg@...il.com>,
	Mike Qiu <qiudayu@...ux.vnet.ibm.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-ide@...r.kernel.org, wenxiong@...ux.vnet.ibm.com,
	brking@...ux.vnet.ibm.com, zhenghch@...ibm.com, haokexin@...il.com,
	Peter Hurley <peter@...leysoftware.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Alexey Kardashevskiy <aik@...abs.ru>
Subject: Re: [PATCH libata/for-3.16-fixes] libata: introduce ata_host->n_tags
 to avoid oops on SAS controllers

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ