linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: SCSI Write Cache Enable in 2.4.20?
@ 2003-06-13 18:25 Cress, Andrew R
  2003-06-13 20:36 ` Matthias Andree
  2003-06-19 16:56 ` Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: Cress, Andrew R @ 2003-06-13 18:25 UTC (permalink / raw)
  To: 'Matthias Andree', Linux-Kernel mailing list


IMO, it isn't "necessary", but it is very desirable, and should be the
default, to disable write cache on SCSI disks for any system that is
concerned about reliability.

If reliability is less important than performance, and you have more
sequential writes than random writes, then you would get a performance
boost, and those (limited) cases might want to turn write cache on.  Disk
benchmark apps are one example.

However, most environments have a lot more small random writes than
sequential writes, and so don't even see a performance improvement from
turning disk write cache on.  

The OS type or version shouldn't affect this, in principle.

Andy

-----Original Message-----
From: Matthias Andree [mailto:matthias.andree@gmx.de] 
Sent: Thursday, June 12, 2003 5:25 AM
To: Linux-Kernel mailing list
Subject: SCSI Write Cache Enable in 2.4.20?


Hi,

I haven't followed the status of write barrier patches recently, I am
wondering if it's still "necessary" (to avoid file system corruption) to
disable the write cache of a SCSI disk drive when the machine doesn't
have an uninterruptible power supply or if instead the file systems and
driver know how to use ordered tags.  (Fujitsu MAP drive: 8 MB cache,
AIC7880 adapter, SuSE Linux 8.2 patched 2.4.20 kernel with ext3 and xfs)

TIA,

-- 
Matthias Andree
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SCSI Write Cache Enable in 2.4.20?
  2003-06-13 18:25 SCSI Write Cache Enable in 2.4.20? Cress, Andrew R
@ 2003-06-13 20:36 ` Matthias Andree
  2003-06-19 16:56 ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Matthias Andree @ 2003-06-13 20:36 UTC (permalink / raw)
  To: Linux-Kernel mailing list

On Fri, 13 Jun 2003, Cress, Andrew R wrote:

> IMO, it isn't "necessary", but it is very desirable, and should be the
> default, to disable write cache on SCSI disks for any system that is
> concerned about reliability.

The question was if Linux was up to using ordered tags between the
requests, which would allow to use the write cache safely.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SCSI Write Cache Enable in 2.4.20?
  2003-06-13 18:25 SCSI Write Cache Enable in 2.4.20? Cress, Andrew R
  2003-06-13 20:36 ` Matthias Andree
@ 2003-06-19 16:56 ` Jeff Garzik
  2003-06-19 20:58   ` Matthias Andree
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2003-06-19 16:56 UTC (permalink / raw)
  To: Cress, Andrew R; +Cc: 'Matthias Andree', Linux-Kernel mailing list

Cress, Andrew R wrote:
> IMO, it isn't "necessary", but it is very desirable, and should be the
> default, to disable write cache on SCSI disks for any system that is
> concerned about reliability.


This sounds like a bug, either in an application, or in Linux kernel's 
scsi disk implementation.

Data is only guaranteed to be written onto disk following an 
fsync(2)-like operation in the application.  And in turn, it is the 
Linux kernel's responsibility to ensure that such a flush is propagated 
all the down to the low-level driver, in my opinion.  Sophisticated 
hosts can have barriers, and "dumb" hosts can simply call the drive's 
flush-cache / sync-cache command.

	Jeff




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SCSI Write Cache Enable in 2.4.20?
  2003-06-19 16:56 ` Jeff Garzik
@ 2003-06-19 20:58   ` Matthias Andree
  0 siblings, 0 replies; 5+ messages in thread
From: Matthias Andree @ 2003-06-19 20:58 UTC (permalink / raw)
  To: Linux-Kernel mailing list

On Thu, 19 Jun 2003, Jeff Garzik wrote:

> This sounds like a bug, either in an application, or in Linux kernel's 
> scsi disk implementation.
> 
> Data is only guaranteed to be written onto disk following an 
> fsync(2)-like operation in the application.  And in turn, it is the 
> Linux kernel's responsibility to ensure that such a flush is propagated 
> all the down to the low-level driver, in my opinion.  Sophisticated 

I think file systems also have certain write ordering requirements to
maintain on-disk consistency, these would also need to make sure the
order is correct. AFAICS, SuSE have patched the reiserfs in their
2.4.20 kernel (8.2) to use write barriers (however deep these are
anchored), but ext3 or xfs don't show related log entries at boot-up or
mount time.

Is this something that will be fixed in 2.6 or will 2.6 still require me
to turn off the write cache?

> hosts can have barriers, and "dumb" hosts can simply call the drive's 
> flush-cache / sync-cache command.

-- 
Matthias Andree

^ permalink raw reply	[flat|nested] 5+ messages in thread

* SCSI Write Cache Enable in 2.4.20?
@ 2003-06-12  9:24 Matthias Andree
  0 siblings, 0 replies; 5+ messages in thread
From: Matthias Andree @ 2003-06-12  9:24 UTC (permalink / raw)
  To: Linux-Kernel mailing list

Hi,

I haven't followed the status of write barrier patches recently, I am
wondering if it's still "necessary" (to avoid file system corruption) to
disable the write cache of a SCSI disk drive when the machine doesn't
have an uninterruptible power supply or if instead the file systems and
driver know how to use ordered tags.  (Fujitsu MAP drive: 8 MB cache,
AIC7880 adapter, SuSE Linux 8.2 patched 2.4.20 kernel with ext3 and xfs)

TIA,

-- 
Matthias Andree

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-06-19 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-13 18:25 SCSI Write Cache Enable in 2.4.20? Cress, Andrew R
2003-06-13 20:36 ` Matthias Andree
2003-06-19 16:56 ` Jeff Garzik
2003-06-19 20:58   ` Matthias Andree
  -- strict thread matches above, loose matches on Subject: below --
2003-06-12  9:24 Matthias Andree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).