public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Drew Winstel <DWinstel@Miltope.com>
Cc: Patrick Mansfield <patmans@us.ibm.com>,
	"Linux-scsi (E-mail)" <linux-scsi@vger.kernel.org>
Subject: Re: Perform uncached reads on SCSI drives?
Date: Fri, 20 May 2005 22:16:57 +1000	[thread overview]
Message-ID: <428DD539.8070901@torque.net> (raw)
In-Reply-To: <66F9227F7417874C8DB3CEB0577274170450FD@MILEX0.Miltope.local>

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


  reply	other threads:[~2005-05-20 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21 21:41 Perform uncached reads on SCSI drives? Drew Winstel
2005-05-20 12:16 ` Douglas Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-21 15:44 Drew Winstel
2005-04-21 16:14 ` Patrick Mansfield
2005-04-13 13:02 Drew Winstel

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=428DD539.8070901@torque.net \
    --to=dougg@torque.net \
    --cc=DWinstel@Miltope.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=patmans@us.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