Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1224217imm; Wed, 6 Jun 2018 12:25:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKFeZh+HfmeyzANwbF2V+8FWR3vZjHxbH8Ib+pv7+Tgh066As5QoJ085lx0Gc0ZsTyT4emC X-Received: by 2002:a17:902:2bc5:: with SMTP id l63-v6mr4395607plb.299.1528313111489; Wed, 06 Jun 2018 12:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528313111; cv=none; d=google.com; s=arc-20160816; b=YjZulv7B7ptrdUh8CJCSTh4dL9TIPDLdPYZJVzrj0ZI+YMK2EpVu3SSgnHOdHkfG3H CerhCYFJ84lSaPLWUdEVJ/5rB+DDEzP1jcRgEZ2N+ydUEdLTCBoiK+Y65Enz1AnCXskj vZ4lz6Bg02pD4bE7GFgkd3xAZktc7LeuOIksV2Q6xJ5gnXCESd4q4zYex52F9bv6NC75 129Wo7YPbvDfBSvWaHhLHn8thf4ZQu62z6wA80T6ZcAIvSEucF0oQICpoS5Hxn4xOPgs t3Lni3+bq1dRBQaDuop73yiVZutUZZs0GYX0lS0QTLk/phPifMbqShp05A+oXE5Lcvmt xDMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=C7yQwxB1VnbqsiyZIhcq14e08013emjH9+bmpn81nGI=; b=UhjYiG9o7Gq7ZIbvT0lU6EmqDC/rprMIy5n/+jmT4qTVP91pkXJjFm1mb5GOMBJZCG Ddrdl6UbxJmuu+nUCFvj+8YGni8idXu19aFXvkiF7yySFDzCBbnRj2exBG0OPIiYsKPe 12eP6CgfUd3nD+PStUiUT8Y9cmQe0APtNbwOTotaXMcxGc4GgBVHbpeMhVP1xuDhp9xl 5lFBmuCsgIEy59iHbCsuX6nAGDwyGspPtk768sVMY4UUw0tDmHPQHQ40vrSA/w9+idse 9VWW8vlT+/A/qJZ9zkaCVVoAgtN8xcVNoxKhqOkUmojNyQM2+2P8wS+Hl5+sruH5IZgG U2cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Z853GRSM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si53431219plu.564.2018.06.06.12.24.57; Wed, 06 Jun 2018 12:25:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Z853GRSM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752937AbeFFSgu (ORCPT + 99 others); Wed, 6 Jun 2018 14:36:50 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:37525 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752873AbeFFSgs (ORCPT ); Wed, 6 Jun 2018 14:36:48 -0400 Received: by mail-ot0-f195.google.com with SMTP id 101-v6so8451991oth.4 for ; Wed, 06 Jun 2018 11:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=C7yQwxB1VnbqsiyZIhcq14e08013emjH9+bmpn81nGI=; b=Z853GRSMdkquxKLqS96L11NCeCAdyVsBiniCHtuZWhR8ixg1Z2H057HVJATVeaK1SL 5vUo8nC4hMCFtwW+XkBTqMP9l+55J7LiZ60m6WJf55Us31pU/19Tn5JUHAMp8nLtMvT4 Wvi71Hkzmywfh0bbRGehAeyDraz7cBc5bUD63U5SdYNY0mkTL/81tlfHRqqBvx3pARqN kmhvideRfnD4Xv9zWu2smgN7t0d9jEVKfJCZirNYMiK5tlYm08OWbTqktAJD4F9nJVw/ u66NPA+0wanSbH0CPwd+1Kz40MDf/5jrcgX2NEMuOg6xbdnfbGJLINWDh6UOriBTGK6s wR2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=C7yQwxB1VnbqsiyZIhcq14e08013emjH9+bmpn81nGI=; b=f1noEWC1V90AXEabPS1eAU5mBiyfu7X1+rW415IX/NUQ8Qpx9Svt3r8uLAm0bl+ni1 zBKgAv0hrJOoc/toGaujkZ4Kvh8eiHWpLpSo9CBT+RtrRxveZu5Y4FwbWOO+yhiu3u06 uHWQne/7fpOaW+sUSGWnoECtHUKWpF/bKtqww2+fYWC26X8YbwaxA23nWKZ4g7PDxONK aOIb90t++9CK3JOFh0WakvnLp2UKol+btbuS1UgwXSqhgJsaoEwm1Kc0vjLL27qcGV4K fuhzAYFACDyg9aDilkbCKNrrXnnz0CHNVajAxpGOi2seZD2jtMdfhWECKqaM8c94t8kQ prdQ== X-Gm-Message-State: APt69E3QgshwgtpPonvan92wtZW0jwQmspdjr3TFvvrU/Aj6jGuO/krB JJb8DdOdHhSW17WKue1kye6SHgh5hBdEFo+tbxRrVQ== X-Received: by 2002:a9d:de3:: with SMTP id 90-v6mr2852459ots.117.1528310208331; Wed, 06 Jun 2018 11:36:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2ea9:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 11:36:47 -0700 (PDT) In-Reply-To: <20180606181619.GA13076@linux.intel.com> References: <20180606164515.25677-1-ross.zwisler@linux.intel.com> <20180606164515.25677-2-ross.zwisler@linux.intel.com> <20180606181619.GA13076@linux.intel.com> From: Dan Williams Date: Wed, 6 Jun 2018 11:36:47 -0700 Message-ID: Subject: Re: [PATCH v3 2/4] libnvdimm: unconditionally deep flush on *sync To: Ross Zwisler Cc: Linux Kernel Mailing List , Dave Jiang , linux-nvdimm Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 6, 2018 at 11:16 AM, Ross Zwisler wrote: > On Wed, Jun 06, 2018 at 10:57:59AM -0700, Dan Williams wrote: >> On Wed, Jun 6, 2018 at 9:45 AM, Ross Zwisler >> wrote: >> > Prior to this commit we would only do a "deep flush" (have nvdimm_flush() >> > write to each of the flush hints for a region) in response to an >> > msync/fsync/sync call if the nvdimm_has_cache() returned true at the time >> > we were setting up the request queue. This happens due to the write cache >> > value passed in to blk_queue_write_cache(), which then causes the block >> > layer to send down BIOs with REQ_FUA and REQ_PREFLUSH set. We do have a >> > "write_cache" sysfs entry for namespaces, i.e.: >> > >> > /sys/bus/nd/devices/pfn0.1/block/pmem0/dax/write_cache >> > >> > which can be used to control whether or not the kernel thinks a given >> > namespace has a write cache, but this didn't modify the deep flush behavior >> > that we set up when the driver was initialized. Instead, it only modified >> > whether or not DAX would flush CPU caches via dax_flush() in response to >> > *sync calls. >> > >> > Simplify this by making the *sync deep flush always happen, regardless of >> > the write cache setting of a namespace. The DAX CPU cache flushing will >> > still be controlled the write_cache setting of the namespace. >> > >> > Signed-off-by: Ross Zwisler >> > Suggested-by: Dan Williams >> >> Looks, good. I believe we want this one and ["PATCH v3 4/4] libnvdimm: >> don't flush power-fail protected CPU caches" marked for -stable and >> tagged with: >> >> Fixes: 5fdf8e5ba566 ("libnvdimm: re-enable deep flush for pmem devices >> via fsync()") >> >> ...any concerns with that? > > Nope, sounds good. Can you fix that up when you apply, or would it be helpful > for me to send another revision with those tags? I'll fix it up, thanks Ross.