Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 May 2001 07:55:46 +1000
From:      "Jan Mikkelsen" <janm@transactionware.com>
To:        "Doug Russell" <drussell@saturn-tech.com>, "freebsd-stable" <freebsd-stable@FreeBSD.ORG>
Subject:   Re: soft update should be default 
Message-ID:  <004801c0d677$4e67c650$0901a8c0@haym.transactionsite.com>

next in thread | raw e-mail | index | archive | help
Doug Russell <drussell@saturn-tech.com> wrote:

>Consider block X, which the OS is waiting to write.  Block X is then
>modified again.  If block X were written to the drive right away, WCE or
>not, we still have to send that block all the way to the disk, then write
>it again.  If the first block X was still dirty in the cache when the
>second write came, hopefully the drive is smart enough just to update what
>should be written to block X (if WCE is enabled), but not necessarily.  On
>the other hand, if the OS only writes block X out once, because it knew it
>had changed before it decided it should be written to disk (hopefully
>because it was passing by anyway).


Well, there is the issue of whether the host thinks the write is complete or
not.  If the host is writing a block, and it doesn't believe that the
operation is complete, will it issue another write?  I don't expect so,
because of the potential for the drive to reorder the writes.  TCQ in effect
ensures that the writes are serialised on the disk.

>IDE disks will show a larger performance boost with WCE because they
>usually can't write a continuous stream of data to the disk without
>wasting at least part of a rotation due to the small maximum transfer
>sizes and huge cylinders.  They attempt to interleave these drives
>correctly, but with such a huge variety of possible applications these
>days, I have a feeling it doesn't really work very well.
>
>I'd still argue that your data is basically just as unsafe all the time on
>one of these drives, when not battery backed, regardless of whether
>softupdates is enabled.


The real issue is notification of a completed write.  With WCE, the host
doesn't get notification that the write has been completed to the physical
disk;  it only knows when the data has been received by the drive.  With
tagged command queueing, the data goes to the same buffer and is written to
disk.  The difference is that the host gets told when the write is complete.
This allows faster write performance by giving the drive more data to work
with, so avoiding rotational latency issues.  This also should make the data
just as safe as no TCQ and no WCE.

This is why I asked the question about the softupdates disk protocol.  My
understanding is that some writes must be ordered (ie: one must complete
before the next one is issued for a given "transaction").  If this is the
case, for that transaction only, tagged command queueing doesn't help.
However, if there are multiple concurrent transactions, there can be
multiple outstanding writes to the drive, and the drive can notify the host
as they complete.

I guess I should go and read the papers/source to see what is really going
on.


Jan Mikkelsen



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004801c0d677$4e67c650$0901a8c0>