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]
Message-ID: <4C93B2BC.8000404@garzik.org>
Date:	Fri, 17 Sep 2010 14:26:04 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
CC:	Tim Chen <tim.c.chen@...ux.intel.com>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Vasu Dev <vasu.dev@...ux.intel.com>,
	Andi Kleen <ak@...ux.intel.com>,
	Matthew Wilcox <willy@...ux.intel.com>,
	James Bottomley <James.Bottomley@...e.de>,
	Mike Christie <michaelc@...wisc.edu>,
	James Smart <james.smart@...lex.com>,
	Andrew Vasquez <andrew.vasquez@...gic.com>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Hannes Reinecke <hare@...e.de>,
	Joe Eykholt <jeykholt@...co.com>,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH 0/8] Drop host_lock around LLD SHT->queuecommand() caller

On 09/16/2010 09:31 PM, Nicholas A. Bellinger wrote:
> On Thu, 2010-09-16 at 18:29 -0700, Tim Chen wrote:
>> On Thu, 2010-09-16 at 15:35 -0700, Nicholas A. Bellinger wrote:
>>> From: Nicholas Bellinger<nab@...ux-iscsi.org>
>>>
>>> Greetings all,
>>>
>>> This series contains the first round of a whole-sale conversion for droping
>>> struct Scsi_Host->host_lock around struct Scsi_Host->queuecommand() within
>>> scsi_dispatch_cmd().  So with this first patch the only part of scsi_dispatch_cmd()
>>> that is protected by host_lock is scsi_cmd_get_serial)_.
>>>
>>
>> Maybe we can change the host->cmd_serial_number to atomic and totally
>> avoid the need to take host_lock.
>
> Hmmmm good point, then we would also need an atomic_t for signaling
> (shost_state == SHOST_DEL) in scsi_dispatch_cmd() to be able to
> completly drop host_lock usage within scsi_dispatch_cmd().
>
> I can take a look at doing this specific part, if you would be willing
> to have a look at the host->cmd_serial_number conversion piece.  ;)

But that raises the familiar tale of:  using multiple atomics (w/ their 
locked instructions) may cost more than a spinlock.

	Jeff



--
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