All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakob Oestergaard <jakob@unthought.net>
To: Xavier Bestel <xavier.bestel@free.fr>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Jeff Garzik <jgarzik@pobox.com>,
	Bernd Eckenfels <ecki-news2004-05@lina.inka.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux SATA RAID FAQ
Date: Sun, 15 Aug 2004 23:42:48 +0200	[thread overview]
Message-ID: <20040815214247.GU27443@unthought.net> (raw)
In-Reply-To: <1092603242.7421.6.camel@nomade>

On Sun, Aug 15, 2004 at 10:54:02PM +0200, Xavier Bestel wrote:
> Le sam 14/08/2004 à 23:49, Alan Cox a écrit :
> > > > * Caching
> > 
> > Is it battery backed ? If it is battery backed then its useful, if not
> > then it becomes less useful although not always. The i2o drivers have
> > some ioctls so you can turn on writeback caching even without battery
> > backup. While this is suicidal for filesytems its just great for swap..
> 
> Isn't sufficient to have it do ordered writes ? If you power your
> machine off, you'll have things half-written anyway, the only thing
> important with journaled filesystems (and raid5 arrays) is to have
> writes staying between barriers.

On a RAID controller with battery backed write-back cache, it can
complete a "sync" operation as soon as the data is in the controller
cache.   This gives a significant performance speedup.

If the cache is not battery backed and power is lost after such a "sync"
operation, then data that the kernel/userspace thought was sync'ed to
disk is actually lost.

This *will* break journalling filesystems and databases.  They work from
the assumption that 'sync' means 'sync' - and if it doesn't, then all
hell breaks lose.

It is common to enforce ordering of writes by issuing a 'sync' of some
data and after the sync completes then starting the writeout of the
'next' data.  On a controller with write-back cache without battery
backup, you could actually risk that your 'next' data were written
before the data you just issued a 'sync' for.

In other words;  write-back cache without battery backup is absolutely
insane, except for some few isolated cases, such as swap-space that Alan
pointed out.

-- 

 / jakob


  parent reply	other threads:[~2004-08-15 21:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-12  6:33 Linux SATA RAID FAQ Jeff Garzik
2004-08-12  7:18 ` Michael Knigge
2004-08-12 11:17   ` Paul Ionescu
2004-08-12 11:17     ` Paul Ionescu
2004-08-12 11:34 ` Willy Tarreau
2004-08-12 13:38   ` Bernd Eckenfels
2004-08-12 12:56     ` Alan Cox
2004-08-12 17:23       ` Jeff Garzik
2004-08-12 17:30         ` Jeff Garzik
2004-08-14 21:49           ` Alan Cox
2004-08-14 22:56             ` Jeff Garzik
2004-08-15 20:54             ` Xavier Bestel
2004-08-15 20:51               ` Alan Cox
2004-08-15 22:02                 ` Bernd Eckenfels
2004-08-15 21:42               ` Jakob Oestergaard [this message]
2004-08-16 22:06       ` Andrew Morton
2004-08-16 21:58         ` Alan Cox
2004-08-16 22:10         ` Christoph Hellwig
2004-08-12 14:01     ` Alistair John Strachan
2004-08-14  0:31   ` J. Ryan Earl
2004-08-14  3:17     ` Mark Lord
2004-08-14  6:37       ` age huisman
2004-08-14 11:03         ` Mark Lord
2004-08-14 15:21     ` Alan Cox
2004-08-14 22:28       ` J. Ryan Earl
2004-08-12 18:09 ` Martin Schlemmer
  -- strict thread matches above, loose matches on Subject: below --
2004-08-12 13:46 Dieter Stueken

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=20040815214247.GU27443@unthought.net \
    --to=jakob@unthought.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ecki-news2004-05@lina.inka.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xavier.bestel@free.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.