From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754487AbbJ1WvR (ORCPT ); Wed, 28 Oct 2015 18:51:17 -0400 Received: from mga09.intel.com ([134.134.136.24]:56182 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751234AbbJ1WvP (ORCPT ); Wed, 28 Oct 2015 18:51:15 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,211,1444719600"; d="scan'208";a="837920969" Date: Wed, 28 Oct 2015 16:51:12 -0600 From: Ross Zwisler To: Jeff Moyer Cc: Ross Zwisler , linux-kernel@vger.kernel.org, linux-nvdimm@ml01.01.org, Dave Chinner , x86@kernel.org, Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Jan Kara Subject: Re: [PATCH 0/2] "big hammer" for DAX msync/fsync correctness Message-ID: <20151028225112.GA30284@linux.intel.com> References: <1446070176-14568-1-git-send-email-ross.zwisler@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 28, 2015 at 06:24:29PM -0400, Jeff Moyer wrote: > Ross Zwisler writes: > > > This series implements the very slow but correct handling for > > blkdev_issue_flush() with DAX mappings, as discussed here: > > > > https://lkml.org/lkml/2015/10/26/116 > > > > I don't think that we can actually do the > > > > on_each_cpu(sync_cache, ...); > > > > ...where sync_cache is something like: > > > > cache_disable(); > > wbinvd(); > > pcommit(); > > cache_enable(); > > > > solution as proposed by Dan because WBINVD + PCOMMIT doesn't guarantee that > > your writes actually make it durably onto the DIMMs. I believe you really do > > need to loop through the cache lines, flush them with CLWB, then fence and > > PCOMMIT. > > *blink* > *blink* > > So much for not violating the principal of least surprise. I suppose > you've asked the hardware folks, and they've sent you down this path? Sadly, yes, this was the guidance from the hardware folks.