RE: [PATCH, RFC] scsi: use host wide tags by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: linux-scsi-owner@xxxxxxxxxxxxxxx [mailto:linux-scsi-
> owner@xxxxxxxxxxxxxxx] On Behalf Of James Bottomley
> Sent: Friday, April 17, 2015 4:43 PM
> To: Christoph Hellwig
> Cc: linux-scsi@xxxxxxxxxxxxxxx; axboe@xxxxxxxxx
> Subject: Re: [PATCH, RFC] scsi: use host wide tags by default
> 
> On Fri, 2015-04-17 at 22:11 +0200, Christoph Hellwig wrote:
...
> > +		spin_lock_irqsave(sdev->request_queue->queue_lock, flags);
> > +		sdev->queue_depth = depth;
> > +		spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
> 
> This lock/unlock is a nasty global sync point which can be eliminated:
> we can rely on the architectural atomicity of 32 bit writes (might need
> to make sdev->queue_depth a u32 because I seem to remember 16 bit writes
> had to be done as two byte stores on some architectures).

If such a change is made, consider using atomic_set (for an int) or
atomic64_set (for a 64-bit value) plus a barrier when needed.  That
communicates the need for atomicity but reduces to a plain store if
the architecture always handles that width atomically.

I don't think there is an atomic_set_short for a short, though.

---
Robert Elliott, HP Server Storage
��.n��������+%������w��{.n�����{������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux