Re: [PATCH v2] nd_blk: add support for "read flush" DSM flag

From: Dan Williams
Date: Sat Aug 22 2015 - 22:00:17 EST


On Thu, Aug 20, 2015 at 2:15 PM, Ross Zwisler
<ross.zwisler@xxxxxxxxxxxxxxx> wrote:
> On Thu, 2015-08-20 at 13:27 -0700, Dan Williams wrote:
> [...]
>> With regards to the fencing, since we already take care to flush
>> writes we don't need to fence at all for the flush, right? All we
>> care about is that reads see valid data.
>
> We were careful to flush writes, but we could still have (now stale) data in
> the cache either due to a previous read or because of prefetching. So we
> need to flush, and we need to fence to make sure that our flushing stays
> correctly ordered with respect to our reads.

Hmm, so clflushopt does not guarantee that a read in program order
after a clflushopt sees the invalidate? It seems like we're not
getting any advantage of using clfushopt vs clflush.

Let's go with this for now, but anything further should be guided by
performance numbers.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/