lkml.org 
[lkml]   [2020]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectAllow use of fua to be disabled on per-device basis?
Hi,

I have a few Samsung NVMe SSDs where FUA (i.e. REQ_FUA) is a slower than
full device cache flushes (i.e. REQ_PREFLUSH). I would like to be able
to disable use of FUA for those.

As a first step, would it make sense to add write support to
/sys/block/*/queue/fua?

The biggest issue with that is that it seems like it'd be preferrable to
only allow enabling fua if the underlying device supports that, and that
that information isn't currently stored anywhere but QUEUE_FLAG_FUA.

The easiest way to deal with that would be to split QUEUE_FLAG_FUA into
QUEUE_FLAG_FUA_HW and QUEUE_FLAG_FUA_ENABLED, and have
blk_queue_write_cache() set QUEUE_FLAG_FUA_ENABLED to
QUEUE_FLAG_FUA_HW. Then the new blk-sysfs.c queue_fua_set() would only
allow setting QUEUE_FLAG_FUA_ENABLED if QUEUE_FLAG_FUA_HW is availabl.e

Does that roughly make sense?


In a second step it could be reasonable to add an nvme quirks indicating
slow FUA for those devices? But I'll leave that for later...

Greetings,

Andres Freund

\
 
 \ /
  Last update: 2020-12-15 20:15    [W:0.056 / U:2.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site