Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2463018imu; Thu, 17 Jan 2019 14:51:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN6QR81fQkjjZ3aIpSLkrgcPVnb0RffZINDzYcIH85Qxdji06S4ySzKggbRXujHQWP7IaWJ8 X-Received: by 2002:a63:4a4d:: with SMTP id j13mr15359957pgl.127.1547765514418; Thu, 17 Jan 2019 14:51:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547765514; cv=none; d=google.com; s=arc-20160816; b=edF0zBwxU4KivKrJmJWo3QxCM+wytq1SJb6BxOsMqzbkeOpE+7qMfh9MCFNGS/Ir0/ wpO+MCXcbcPOgKm+Uya/qxaQmr5nR4GhrezxgExQUFNI6aZ/dX4wfWAEcZRlLI4ewj4X wKnscHLdJ9gxU8td3PQM9jMaxDMdO03i4iP1BjwSDyC14X8SPdl5R4yCkuO1YQSr5518 D+RmYUaXdYDgP4UG1xrOGi/Tj6gOyGcHhzk+CcfMqEPbEjrisupwgdCAARjxWJR5+IDR 9WAlbfogdvJpnPPb/Hei1tp40nUNK05DrcSPMw/i+T9itpYOzvkYnlOH0HyYdBgqPa+c emyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Ea/YMWC1nHYMLdnzmU96/XKZp2/SY+yjPYHWkg2Gd4I=; b=SBPsx7kYRxgD1EqsxWGGlIXqf19BS8eFBHVsm0fY1QUNSuy8jx5kQZruPh587xeuBX AvZI+9AVNYqCK0z6p7lgmeRBp6KbtCA3aETl1sqTw+HZLpifqCJ+Bt7H3IycENelI2KA Ct2Y3PJu+wwb9WBxm4hj4+4pORoINruvWdPc0r/fIgiTZkw9QzEuGcZx/c+z2MpCq0OQ bNN//0Cai4EhaNX7uw924BjMUozDVzROQjgVNJhldOrdC+V2hRVEadJ6ldSEwFffQyle wcW6EUr5SOLGgiMrrCHNGoBREA6lcs9K2LdXuRh/Y+ouGfHTfe/1CRe5kv5EOQVf+wz+ wWXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si2791333pgj.177.2019.01.17.14.51.34; Thu, 17 Jan 2019 14:51:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726185AbfAQWuR (ORCPT + 99 others); Thu, 17 Jan 2019 17:50:17 -0500 Received: from www.sr71.net ([198.145.64.142]:58060 "EHLO blackbird.sr71.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1725947AbfAQWuR (ORCPT ); Thu, 17 Jan 2019 17:50:17 -0500 X-Greylist: delayed 378 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 Jan 2019 17:50:17 EST Received: from [0.0.0.0] (50-39-110-205.bvtn.or.frontiernet.net [50.39.110.205]) (Authenticated sender: dave) by blackbird.sr71.net (Postfix) with ESMTPSA id 6C3E3FA866; Thu, 17 Jan 2019 14:43:57 -0800 (PST) Subject: Re: [PATCH 0/4] Allow persistent memory to be used like normal RAM To: Jeff Moyer , Dave Hansen Cc: thomas.lendacky@amd.com, mhocko@suse.com, linux-nvdimm@lists.01.org, tiwai@suse.de, ying.huang@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, bp@suse.de, baiyaowei@cmss.chinamobile.com, zwisler@kernel.org, bhelgaas@google.com, fengguang.wu@intel.com, akpm@linux-foundation.org References: <20190116181859.D1504459@viggo.jf.intel.com> From: Dave Hansen Message-ID: <360f77dc-fe8e-c7c4-84a0-852ef3c4a152@sr71.net> Date: Thu, 17 Jan 2019 14:43:56 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/17/19 8:29 AM, Jeff Moyer wrote: >> Persistent memory is cool. But, currently, you have to rewrite >> your applications to use it. Wouldn't it be cool if you could >> just have it show up in your system like normal RAM and get to >> it like a slow blob of memory? Well... have I got the patch >> series for you! > So, isn't that what memory mode is for? > https://itpeernetwork.intel.com/intel-optane-dc-persistent-memory-operating-modes/ > > Why do we need this code in the kernel? So, my bad for not mentioning memory mode. This patch set existed before we could talk about it publicly, so it simply ignores its existence. It's a pretty glaring omissions at this point, sorry. I'll add this to the patches, but here are a few reasons you might want this instead of memory mode: 1. Memory mode is all-or-nothing. Either 100% of your persistent memory is used for memory mode, or nothing is. With this set, you can (theoretically) have very granular (128MB) assignment of PMEM to either volatile or persistent uses. We have a few practical matters to fix to get us down to that 128MB value, but we can get there. 2. The capacity of memory mode is the size of your persistent memory. DRAM capacity is "lost" because it is used for cache. With this, you get PMEM+DRAM capacity for memory. 3. DRAM acts as a cache with memory mode, and caches can lead to unpredictable latencies. Since memory mode is all-or-nothing, your entire memory space is exposed to these unpredictable latencies. This solution lets you guarantee DRAM latencies if you need them. 4. The new "tier" of memory is exposed to software. That means that you can build tiered applications or infrastructure. A cloud provider could sell cheaper VMs that use more PMEM and more expensive ones that use DRAM. That's impossible with memory mode. Don't take this as criticism of memory mode. Memory mode is awesome, and doesn't strictly require *any* software changes (we have software changes proposed for optimizing it though). It has tons of other advantages over *this* approach. Basically, they are complementary enough that we think both can live side-by-side.