Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751830AbbEJR3F (ORCPT ); Sun, 10 May 2015 13:29:05 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:32892 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751479AbbEJR3D (ORCPT ); Sun, 10 May 2015 13:29:03 -0400 MIME-Version: 1.0 In-Reply-To: <20150510094619.GA15198@gmail.com> References: <554BA748.9030804@linux.intel.com> <20150507191107.GB22952@gmail.com> <554CBE17.4070904@redhat.com> <20150508140556.GA2185@gmail.com> <21836.51957.715473.780762@quad.stoffel.home> <554CEB5D.90209@redhat.com> <20150509084510.GA10587@gmail.com> <20150510094619.GA15198@gmail.com> Date: Sun, 10 May 2015 10:29:01 -0700 Message-ID: Subject: Re: "Directly mapped persistent memory page cache" From: Dan Williams To: Ingo Molnar Cc: Rik van Riel , Linus Torvalds , John Stoffel , Dave Hansen , Linux Kernel Mailing List , Boaz Harrosh , Jan Kara , Mike Snitzer , Neil Brown , Benjamin Herrenschmidt , Heiko Carstens , Chris Mason , Paul Mackerras , "H. Peter Anvin" , Christoph Hellwig , Alasdair Kergon , "linux-nvdimm@lists.01.org" , Mel Gorman , Matthew Wilcox , Ross Zwisler , Martin Schwidefsky , Jens Axboe , "Theodore Ts'o" , "Martin K. Petersen" , Julia Lawall , Tejun Heo , linux-fsdevel , Andrew Morton 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: 1696 Lines: 34 On Sun, May 10, 2015 at 2:46 AM, Ingo Molnar wrote: > > * Dan Williams wrote: > >> > "Directly mapped pmem integrated into the page cache": >> > ------------------------------------------------------ > >> Nice, I think it makes sense as an area that gets reserved at file >> system creation time. You are not proposing that this gets >> automatically reserved at the device level, right? [...] > > Well, it's most practical if the device does it automatically (the > layout is determined prior filesystem creation), and the filesystem > does not necessarily have to be aware of it - but obviously as a user > opt-in. > Hmm, my only hesitation is that the raw size of a pmem device is visible outside of Linux (UEFI/BIOS other OSes, etc). What about a simple layered block-device that fronts a raw pmem device? It can store a small superblock signature and then reserve / init the struct page space. This is where we can use the __pfn_t flags that Linus suggested. Whereas the raw device ->direct_access() returns __pfn_t values with a 'PFN_DEV' flag indicating originating from device-memory, a ->direct_access() on this struct-page-provider-device yields __pfn_t's with 'PFN_DEV | PFN_MAPPED' indicating that __pfn_t_to_page() can attempt to lookup the page in a device-specific manner (similar to how kmap_atomic_pfn_t is implemented in the 'evacuate struct page from the block layer' patch set). -- 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/