Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1035224AbdDUE7t (ORCPT ); Fri, 21 Apr 2017 00:59:49 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32799 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1035205AbdDUE7p (ORCPT ); Fri, 21 Apr 2017 00:59:45 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170418164557.GA7181@obsidianresearch.com> <20170418190138.GH7181@obsidianresearch.com> <20170418210339.GA24257@obsidianresearch.com> <1492564806.25766.124.camel@kernel.crashing.org> <20170419155557.GA8497@obsidianresearch.com> <4899b011-bdfb-18d8-ef00-33a1516216a6@deltatee.com> <20170419173225.GA11255@redhat.com> From: Dan Williams Date: Thu, 20 Apr 2017 21:59:42 -0700 X-Google-Sender-Auth: yn5G_NwOJrqxSdA-DtLNLGGXg_8 Message-ID: Subject: Re: [RFC 0/8] Copy Offload with Peer-to-Peer PCI Memory To: Stephen Bates Cc: Jens Axboe , Keith Busch , "James E.J. Bottomley" , "Martin K. Petersen" , "linux-rdma@vger.kernel.org" , Benjamin Herrenschmidt , Steve Wise , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , Jason Gunthorpe , Jerome Glisse , Bjorn Helgaas , "linux-pci@vger.kernel.org" , linux-nvdimm , Max Gurtovoy , linux-scsi , Christoph Hellwig 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-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v3L4xtVl017326 Content-Length: 1448 Lines: 32 On Thu, Apr 20, 2017 at 4:07 PM, Stephen Bates wrote: >>> Yes, this makes sense I think we really just want to distinguish host >>> memory or not in terms of the dev_pagemap type. >> >>> I would like to see mutually exclusive flags for host memory (or not) and persistence (or not). >>> >> >> Why persistence? It has zero meaning to the mm. > > I like the idea of having properties of the memory in one place. We do have memory type data in the global iomem_resource tree, see IORES_DESC_PERSISTENT_MEMORY. > While mm might not use persistence today it may make use certain things that > persistence implies (like finite endurance and/or higher write latency) in the future. A persistence flag does not convey endurance or latency information. > Also the persistence of the memory must have issues for mm security? Not for the mm, data at rest security might be a property of the device, but that's not the mm's concern. >Again not addressed today but useful in the future. Maybe, but to me "Useful for the future" == "don't add it to the kernel until that future arrives". > In addition I am not sure where else would be an appropriate place to put something like a persistence property flag. I know the NVDIMM section of the kernel uses things like NFIT to describe properties of the memory but we don’t yet (to my knowledge) have something similar for IO memory. Do the IORES_DESC flags give you what you need?