lkml.org 
[lkml]   [2017]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v3 13/14] filesystem-dax: gate calls to dax_flush() on QUEUE_FLAG_WC
    On Wed, Jun 14, 2017 at 3:46 AM, Jan Kara <jack@suse.cz> wrote:
    > On Fri 09-06-17 13:24:56, Dan Williams wrote:
    >> Some platforms arrange for cpu caches to be flushed on power-fail. On
    >> those platforms there is no requirement that the kernel track and flush
    >> potentially dirty cache lines. Given that we still insert entries into
    >> the radix for locking purposes this patch only disables the cache flush
    >> loop, not the dirty tracking.
    >>
    >> Userspace can override the default cache setting via the block device
    >> queue "write_cache" attribute in sysfs.
    >>
    >> Cc: Jan Kara <jack@suse.cz>
    >> Cc: Jeff Moyer <jmoyer@redhat.com>
    >> Cc: Christoph Hellwig <hch@lst.de>
    >> Cc: Matthew Wilcox <mawilcox@microsoft.com>
    >> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
    >> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    >
    > ...
    >
    >> - dax_flush(dax_dev, pgoff, kaddr, size);
    >> + if (test_bit(QUEUE_FLAG_WC, &bdev->bd_queue->queue_flags))
    >> + dax_flush(dax_dev, pgoff, kaddr, size);
    >
    > IMHO the check belongs into dax_flush() similarly as blkdev_issue_flush()
    > takes silently handles whether the flush is actually needed or not.

    Looks good, will do.

    \
     
     \ /
      Last update: 2017-06-14 18:51    [W:3.254 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site