From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753382AbbCWU76 (ORCPT ); Mon, 23 Mar 2015 16:59:58 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:35630 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752565AbbCWU7y (ORCPT ); Mon, 23 Mar 2015 16:59:54 -0400 MIME-Version: 1.0 In-Reply-To: <54F84538.8080500@plexistor.com> References: <54F82CE0.4040502@plexistor.com> <54F830D4.7030205@plexistor.com> <54F84538.8080500@plexistor.com> Date: Mon, 23 Mar 2015 13:59:53 -0700 Message-ID: Subject: Re: [PATCH 7/8] pmem: Add support for page structs From: Dan Williams To: Boaz Harrosh Cc: Ingo Molnar , X86 ML , linux-kernel , "Roger C. Pao" , Thomas Gleixner , linux-nvdimm , "H. Peter Anvin" , Matthew Wilcox , Andy Lutomirski , Christoph Hellwig , Ross Zwisler Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 5, 2015 at 3:59 AM, Boaz Harrosh wrote: > > One of the current shortcomings of the NVDIMM/PMEM > support is that this memory does not have a page-struct(s) > associated with its memory and therefor cannot be passed > to a block-device or network or DMAed in any way through > another device in the system. > > The use of add_persistent_memory() fixes all this. After this patch > an FS can do: > bdev_direct_access(,&pfn,); Hmm, can we do this mapping on demand per direct access mapping rather than unconditionally for each range that pmem is handling? Going forward I don't think we want to be tied to guaranteeing that plain bdev_direct_access() always yields pfn_to_page()-capable pfns. Perhaps a DAX_MAP_PFN flag or something along those lines?