Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758214AbaGWP2J (ORCPT ); Wed, 23 Jul 2014 11:28:09 -0400 Received: from zill.ext.symas.net ([69.43.206.106]:39070 "EHLO zill.ext.symas.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756125AbaGWP2I (ORCPT ); Wed, 23 Jul 2014 11:28:08 -0400 Message-ID: <53CFD483.2010106@symas.com> Date: Wed, 23 Jul 2014 08:28:03 -0700 From: Howard Chu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26a1 MIME-Version: 1.0 To: Matthew Wilcox CC: Linux Kernel Mailing List Subject: Re: [PATCH v8 00/22] Support ext4 on NV-DIMMs References: <00ad731b459e32ce965af8530bcd611a141e41b6.1406058387.git.matthew.r.wilcox@intel.com> <20140723121025.GE10317@node.dhcp.inet.fi> <20140723135514.GB6754@linux.intel.com> <53CFC258.6050803@symas.com> <20140723143453.GE6754@linux.intel.com> In-Reply-To: <20140723143453.GE6754@linux.intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox wrote: > On Wed, Jul 23, 2014 at 07:10:32AM -0700, Howard Chu wrote: >> Matthew Wilcox wrote: >>> One of the primary uses for NV-DIMMs is to expose them as a block device >>> and use a filesystem to store files on the NV-DIMM. While that works, >>> it currently wastes memory and CPU time buffering the files in the page >>> cache. We have support in ext2 for bypassing the page cache, but it >>> has some races which are unfixable in the current design. This series >>> of patches rewrite the underlying support, and add support for direct >>> access to ext4. >> >> This is an awful lot of work to go thru just to get a glorified ext4 >> RAMdisk. RAMdisks are one of the worst possible uses for RAM, requiring >> users to explicitly copy files to them before getting any benefit. Using RAM >> for a page cache instead brings benefits to all file accesses without >> requiring any user intervention. > > Perhaps you misunderstand the problem. There are many different kinds > of NV-DIMM out there today with different performance characteristics. > One that has been described to me has write times 1000x slower than read > times. In that situation, you can't possibly "just use it as page cache"; > you need to place the read-often; write-rarely files on that media. Thanks for the clarification. Yes, I was assuming "NVDIMM" to mean something with DRAM performance + persistence, like http://www.agigatech.com/ddr3.php or http://www.vikingtechnology.com/nvdimm-technology . That's also the definition in Wikipedia http://en.wikipedia.org/wiki/NVDIMM (NVDIMM) is a computer memory DRAM DIMM that retains data even when electrical power is removed What NVDIMM did you have in mind? It doesn't sound like Flash DIMM, which is nowhere near DRAM performance for reads or writes. Closest so far would be STT-MRAM but the capacity/density isn't really there yet. >> If the NVDIMM range was reserved for exclusive use of the page cache, then >> you would have an avenue to get persistence/safety for every filesystem >> mounted on a machine, not just a special case ext4. > > No you wouldn't; you'd also need to have a mechanism to store the state > of the page cache persistently. OK, so you have to arrange for the page cache manager to use the NVRAM for its own data structures as well. > And you have to make sure that the > filesystem does appropriate cache invalidations. By going the route > here, we can use the existing caching mechanisms (eg FS-Cache) which > have solved all the hard problems of making sure that local caches are > coherent with storage. OK. Thanks again for the explanation. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/ -- 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/