Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbdGFBTf (ORCPT ); Wed, 5 Jul 2017 21:19:35 -0400 Received: from g2t2354.austin.hpe.com ([15.233.44.27]:43818 "EHLO g2t2354.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440AbdGFBTd (ORCPT ); Wed, 5 Jul 2017 21:19:33 -0400 From: "Kani, Toshimitsu" To: "dan.j.williams@intel.com" CC: "linux-kernel@vger.kernel.org" , "hch@lst.de" , "viro@zeniv.linux.org.uk" , "x86@kernel.org" , "mawilcox@microsoft.com" , "linux-nvdimm@lists.01.org" , "Knippers, Linda" , "linux-fsdevel@vger.kernel.org" , "jack@suse.cz" Subject: Re: [PATCH v4 12/16] libnvdimm, nfit: enable support for volatile ranges Thread-Topic: [PATCH v4 12/16] libnvdimm, nfit: enable support for volatile ranges Thread-Index: AQHS8QGnKkts09hmeUykqHaORyWjLKI8N3yAgAAW54CAAAmYgIAACV8AgAAGVgCAAAR7gIAAAckAgAACPYCAAAHVAIAAAn8AgAAEW4CAACVlAIAJTuiAgAAIlICAABEOAA== Date: Thu, 6 Jul 2017 01:17:45 +0000 Message-ID: <1499303324.2042.7.camel@hpe.com> References: <149875877608.10031.17813337234536358002.stgit@dwillia2-desk3.amr.corp.intel.com> <149875884190.10031.6179599135820559644.stgit@dwillia2-desk3.amr.corp.intel.com> <595552F5.5040008@hpe.com> <59556E37.80808@hpe.com> <595580A6.9000004@hpe.com> <595589CF.5010605@hpe.com> <1499297819.2042.5.camel@hpe.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [15.203.227.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DF4PR84MB0075;7:DoyMmZ0yEt3eGoKxS9ymWZrJWVy2/JOzPClRkVIz9U4NK9/9KEq0wUcgrwZZ2L3JDj0jADdM8G6+LPwKj2AVKozulidCbn9FVnfHS7pe1LePoGFt4AMpFUeh1jdQUSDShxlzja1Oa/MVeaRIAz1Szt6A76cm7xTQjnVCXmrgR3Nt/6DGV0shrdTwxmLLyfbnUsgSI67ts0z8fmXDM7zk4g1smkM1LO2Q2Qd8R1+g+9HGT8BN4CC4OObfUnaulyRX79eOUGYuKVi+vawti5cj28brBAn8FCaFxRzjLFvFJhalrIpObqMlgUdpVRwtlexDo5+d9hz8psVf0ttX4K1B6w7koE+A6tCG/P9NJZHK+1tcMXFMfjwA2D7jS91n/PTBTWiuyWOzPVAW6p/Om1ngPGDfeBPUzfxdmchdTp1wm/Mu+uP/RhQZC/EQPac191nQyh021rvfRB8lMXBRUQ0LlnRwZiGNiraLqDKVjgV/RsdOw451fh0O78BhQKOoBMBscVH6+N+t9RqKn5FCxfBW0dAl3Mpsj28MOSZMeo3GqPxx9Ba/jc95xt0sNxFHKDbDW5qaKxZpG71qmQjtfermApCJRkGb9dzvMYwyn1ZAcP4ZavHI7XdPthnRq0yxByqTbK3b1/zdYAy4WQRl10kzzyRNCI/JGWG5ePViaPPnu0gzALCtylUZwFZnDrVHHF/NRFZgFD+AX0uagezqFmofWScUw+Cv/axllTX2dQVxwxb7bCOboAvn+L4onOXOvrQzFrmUmx2L0fXsmPm6XOyi8tAHEFqY1RhwD9M0cWtRI5M= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10019020)(6009001)(39850400002)(39860400002)(39410400002)(39400400002)(39840400002)(39450400003)(24454002)(377424004)(377454003)(2950100002)(38730400002)(305945005)(6916009)(2906002)(8936002)(7736002)(8676002)(81166006)(6246003)(110136004)(53936002)(4326008)(103116003)(53546010)(189998001)(6506006)(25786009)(36756003)(2900100001)(229853002)(6486002)(93886004)(86362001)(33646002)(2501003)(2351001)(77096006)(3660700001)(478600001)(66066001)(76176999)(3280700002)(50986999)(14454004)(54356999)(102836003)(6436002)(6116002)(8666007)(3846002)(5660300001)(6512007)(54906002)(5640700003);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0075;H:DF4PR84MB0105.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; x-ms-office365-filtering-correlation-id: abe6f33a-7dfd-4a2b-0bc9-08d4c40ccec1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DF4PR84MB0075; x-ms-traffictypediagnostic: DF4PR84MB0075: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(133145235818549)(236129657087228)(225559137633274)(247924648384137); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DF4PR84MB0075;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DF4PR84MB0075; x-forefront-prvs: 03607C04F0 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2017 01:17:45.2641 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0075 X-OriginatorOrg: hpe.com 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 v661Jg5U023937 Content-Length: 3515 Lines: 79 On Wed, 2017-07-05 at 17:07 -0700, Dan Williams wrote: > On Wed, Jul 5, 2017 at 4:46 PM, Kani, Toshimitsu > wrote: > > On Thu, 2017-06-29 at 18:28 -0700, Dan Williams wrote: : > > > > Sorry for being late to respond, but I agree with Linda that this > > naming policy is likely to confuse users.  I also care less about > > the current users who use memmap option.  This case is pmem- > > emulation and they know what they are doing. > > > > Assuming block device interface is needed (in addition to device- > > dax) for volatile range for use-cases like swap device, I wonder if > > user can actually specify a right pmem device for swap from OS- > > install GUI when both volatile and persistent block devices are > > listed as /dev/pmemN. Sometimes we are restricted with GUI > > menu.  Some users use GUI all the time like Windows as well. > > > > Can we differentiate the naming by adding 'v' like 'pmemNv' (if you > > can't go with 'vmemN')?  I don't think having 's' for BTT was that > > bad.  It's been helpful to tell users that these pmem devices are > > not byte-addressable.  I also think that BTT for volatile range > > makes no sense (unless emulated as persistent memory by memmap > > option). > > I'm more worried about sending the wrong signal the other way. That > users believe that the 'p' means definitely "persistent" when we have > no way to guarantee that. That's a valid point. But isn't it vendors' responsibility to guarantee it when their devices are described as persistent in one way or the other in FW? > If it was only memmap= that we had to worry about that would be one > thing, but we apparently have vendors that are shipping "e820-type-12 > memory" as their NVDIMM solution [1]. Type-12 is persistent memory in a non-standard FW interface. So, it makes sense to show it as pmem. > We've also been shipping the policy that 'pmem' may front a volatile > range ever since v4.8 (commit c2f32acdf848 "acpi, nfit: treat virtual > ramdisk SPA as pmem region"). At least now we have the "nd_volatile" > region type. Any change of the device name now is potentially a > regression for environments that are already expecting /dev/pmemX. Hmm... I thought this was for mapping ISO image for booting. Does it get listed as a regular pmem device and allow user to modify its content? I doubt this case being used today, though. (It was prototyped on an HPE box and I can check the status if needed.) > As far as I know there are no OS installers that understand pmem. It's actually the other way around. It was changed not to list pmem devices since OS cannot boot from a pmem yet... > When they do add support I think it would be straightforward to avoid > confusion and filter "volatile" hosted pmem devices from the install > target list. I don't see this being much different from the confusion > when users can not differentiate their 'sd' device between USB and > SATA. Right, such changes can be made. It was just an example that typical use-cases today do not require additional step to check persistence of block devices. > We have symlinks in /dev/disk/by* to make it easier to identify > storage devices, I think it makes sense to add udev rules for > identifying volatile pmem and not try to differentiate this in the > default kernel device name. I am not sure what might be a good way, but I am concerned because a single block device naming do not represent both volatile and persistent media today. Thanks, -Toshi