Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422801AbbENVwX (ORCPT ); Thu, 14 May 2015 17:52:23 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33497 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161024AbbENVwT (ORCPT ); Thu, 14 May 2015 17:52:19 -0400 MIME-Version: 1.0 In-Reply-To: <1431551151-19124-11-git-send-email-toshi.kani@hp.com> References: <1431551151-19124-1-git-send-email-toshi.kani@hp.com> <1431551151-19124-11-git-send-email-toshi.kani@hp.com> Date: Thu, 14 May 2015 14:52:18 -0700 Message-ID: Subject: Re: [PATCH v9 10/10] drivers/block/pmem: Map NVDIMM with ioremap_wt() From: Dan Williams To: Toshi Kani Cc: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Andrew Morton , Arnd Bergmann , jgross@suse.com, Konrad Rzeszutek Wilk , "linux-nvdimm@lists.01.org" , mcgrof@suse.com, X86 ML , "linux-kernel@vger.kernel.org" , stefan.bader@canonical.com, Andy Lutomirski , linux-mm@kvack.org, hmh@hmh.eng.br, Christoph Hellwig , Matthew Wilcox Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 20 On Wed, May 13, 2015 at 2:05 PM, Toshi Kani wrote: > The pmem driver maps NVDIMM with ioremap_nocache() as we cannot > write back the contents of the CPU caches in case of a crash. > > This patch changes to use ioremap_wt(), which provides uncached > writes but cached reads, for improving read performance. I'm thinking that for the libnd integration we don't want the pmem driver hard coding the cache-policy decision. This is something that should be specified to nd_pmem_region_create(). Especially considering that platform firmware tables (NFIT) may specify the cache policy for the range. As Matthew Wilcox mentioned offline we also must match the DAX-to-mmap cache policy with the policy for the driver mapping for architectures that are not capable of multiple mappings of the same physical address with different policies. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/