tech-kern archive

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

Re: WAPBL/cache flush and mfi(4)



On Fri, Aug 24, 2012 at 07:35:04PM +0200, Manuel Bouyer wrote:
> On Fri, Aug 24, 2012 at 12:49:11PM -0400, Thor Lancelot Simon wrote:
> > If the controller has a nonvolatile cache, it should ignore the
> > flush.
> 
> I can see why a paranoid admin would want to keep the flush:
> if you have a power failure longer than the BBU's capacity.
> That's why I suggested to make it user-settable.
> 
> > If you have the awkward cache where the controller cache
> > is NV but the disks have volatile caches which are switched on,
> > then the disks' caches must be flushed but the controller's
> > should not.
> 
> I think in this case you have to flush both: if you flush only the
> disks, the data you want to be on stable storage may still be in the
> controller's cache.

That doesn't make sense to me.  If you consider the controller cache
to be stable storage, then you clearly need to flush only the disks'
caches for all the data expected to be in stable storage to actually
be in stable storage.

With disks supporting tagged queueing, and reasonably smart controller
firmware, there should be little advantage to running the disks with
the write caches enabled anyway.

Most controllers switch the cache to write-through mode themselves
if they detect the battery has failed.

Thor


Home | Main Index | Thread Index | Old Index