tech-kern archive

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

Re: Exposing FUA as alternative to DIOCCACHESYNC for WAPBL



On Wed, Mar 01, 2017 at 10:37:00PM +0100, Jarom?r Dole?ek wrote:
 > I'm working on an interface for WAPBL to use Force Unit Access (FUA)
 > feature on compatible hardware (currently SCSI and NVMe), as a
 > replacement to full disk cache flushes. I'd also like to add support
 > for DPO (Disable Page Out), as that is trivial extension of FUA
 > support at least for SCSI.

Good, good :-)

Some quick thoughts, though:

(1) ultimately it's necessary to patch each driver to crosscheck the
flag, because otherwise eventually there'll be silent problems.

(2) it would be better not to expose hardware-specific flags in the
buffercache, so it would be better to come up with a name that
reflects the semantics, and a semantic guarantee that's at least
notionally not hardware-specific.

(3) as I recall (can you remind those of us not currently embedded in
this stuff what the semantics of FUA actually are?) FUA is *not* a
write barrier (as in, all writes before happen before all writes
after) and since write barriers are a natural expression of the
requirements for many fses, it would be well to make sure the
implementation of this doesn't conflict with that.

(3a) Also, past discussion of this stuff has centered around trying to
identify a single coherent interface for fs code to use, with the
expansion into whatever hardware semantics are available happening in
the bufferio layer. This would prevent needing conditional logic on
device features in every fs. However, AFAICR these discussions have
never reached any clear conclusion. Do you have any opinion on that?

We don't want to block improvements to wapbl while we figure out the
one true device interface, but on the other hand I'd rather not
acquire a new set of long-term hacks. Stuff like the "logic" wapbl
uses to intercept the synchronous writes issued by the FFS code is
very expensive to get rid of later.

(4) please update bufferio.9 :-)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index