From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751581AbbCZECp (ORCPT ); Thu, 26 Mar 2015 00:02:45 -0400 Received: from g9t5009.houston.hp.com ([15.240.92.67]:55377 "EHLO g9t5009.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751325AbbCZECn (ORCPT ); Thu, 26 Mar 2015 00:02:43 -0400 X-Greylist: delayed 103509 seconds by postgrey-1.27 at vger.kernel.org; Thu, 26 Mar 2015 00:02:43 EDT From: "Elliott, Robert (Server Storage)" To: Andy Lutomirski , Boaz Harrosh CC: Matthew Wilcox , Ross Zwisler , X86 ML , Thomas Gleixner , Dan Williams , Ingo Molnar , "Roger C. Pao" , linux-nvdimm , linux-kernel , "H. Peter Anvin" , Christoph Hellwig , "Kani, Toshimitsu" , Christoph Hellwig Subject: RE: [PATCH 1/8] pmem: Initial version of persistent memory driver Thread-Topic: [PATCH 1/8] pmem: Initial version of persistent memory driver Thread-Index: AQHQVztKIkCY55Bt/UyVG+LIAdCtP50OgqIAgAWV0wCADoWsAIALo7SQ Date: Thu, 26 Mar 2015 04:00:57 +0000 Message-ID: <94D0CD8314A33A4D9D801C0FE68B40295A84453E@G9W0745.americas.hpqcorp.net> References: <54F82CE0.4040502@plexistor.com> <54F830D4.7030205@plexistor.com> <54F84420.40209@plexistor.com> <54FD901A.3030905@plexistor.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.210.48.26] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t2Q42nRo029547 > -----Original Message----- > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- > owner@vger.kernel.org] On Behalf Of Andy Lutomirski > Sent: Wednesday, March 18, 2015 1:07 PM > To: Boaz Harrosh > Cc: Matthew Wilcox; Ross Zwisler; X86 ML; Thomas Gleixner; Dan Williams; > Ingo Molnar; Roger C. Pao; linux-nvdimm; linux-kernel; H. Peter Anvin; > Christoph Hellwig > Subject: Re: [PATCH 1/8] pmem: Initial version of persistent memory driver > > On Mar 9, 2015 8:20 AM, "Boaz Harrosh" wrote: > > > > On 03/06/2015 01:03 AM, Andy Lutomirski wrote: > > <> > > > > > > I think it would be nice to have control over the caching mode. > > > Depending on the application, WT or UC could make more sense. > > > > > > > Patches are welcome. say > > map=sss@aaa:WT,sss@aaa:CA, ... > > > > But for us, with direct_access(), all benchmarks show a slight advantage > > for the cached mode. > > I'm sure cached is faster. The question is: who flushes the cache? > > --Andy Nobody. Therefore, pmem as currently proposed (mapping the memory with ioremap_cache, which uses _PAGE_CACHE_MODE_WB) is unsafe unless the system is doing something special to ensure L1, L2, and L3 caches are flushed on power loss. I think pmem needs to map the memory as UC or WT by default, providing WB and WC only as an option for users confident that those attributes are safe to use in their system. Even using UC or WT presumes that ADR is in place. {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I