Re: Perform uncached reads on SCSI drives?

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

 



Drew Winstel wrote:
Hello, Patrick, and thanks for the reply.


You could try setting read cache disable, I don't know if that setting
must be honored, or how ATA/SATA handle it. See mode page 8 for SCSI block
commands.


Hmm, that's definitely worth a shot.  I'll try it and let you know how it
works.


The sg utilities sg_modes can probably set it.


As would the new sdparm, I imagine.

Drew, sg_modes only reads mode pages. They can be changed with sginfo (or scsiinfo) and sg_wr_mode. The simplest is probably: sdparm --set=RCD /dev/sda

or, if you want the change to survive the next disk
power cycle:
  sdparm --set=RCD --save /dev/sda

If /dev/sda is really a ATA/SATA disk then I don't
think the read cache can be disabled (judging from
the SAT document).

BTW If the sd driver sees a disk with WCE=1 and RCD=1
it outputs: "driver cache: write back, no read (daft)".
IMO the "daft" bit is itself daft. It is logically valid
(i.e. a read of a block in the write cache will cause
that block to be written to the media, then read back)
and reserves the cache exclusively for writing. When
copying one disk (or partition) to another, caching
reads seems futile.

Doug Gilbert

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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