Cmd - comp write

Learner Study learner.study at gmail.com
Thu Apr 24 10:03:30 PDT 2014


Thanks. So its not really used to optimize SSD write operation
per-se...correct? Its only used for locking purpose mainly. I'm not
too familiar with the upper application layers...is "locking" a very
common operation used in storage work? I would think so - for eg. to
coordinate writes to namespaces and its accesses, this could be
used...is that understanding correct?

Thanks!
PS: Apologize if this is not the right forum, but would appreciate any
insights from experts..

On Thu, Apr 24, 2014 at 6:58 AM, Matthew Wilcox <willy at linux.intel.com> wrote:
> On Wed, Apr 23, 2014 at 08:37:39PM -0700, Learner wrote:
>> Hello
>>
>> How frequently is Fused command - compare-write used?
>> Is it for avoiding writes for SSDs if thee is no change? Ie read and compare the block to be written and don't write if there is no change..
>
> Compare-and-Write is a building block for an (unspecified, advisory)
> locking protocol.  If two entities wish to gain exclusive access to a
> range of LBAs, they can agree on a block to use as their lock, and agree
> on a bit-pattern to be found in that block to indicate 'unlocked'.
>
> If anyone is using it, they're doing so through ioctls; there's no way
> to submit a BIO that maps to a compare-and-write.



More information about the Linux-nvme mailing list