Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2135138imu; Thu, 17 Jan 2019 08:57:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN4N1v9BYDQYJPuiGYMkgEbJieW6BcIdxHZLcJiarKR4dOU4s+jYdOEWlnRfnsHYOKdun2XZ X-Received: by 2002:a63:ec4b:: with SMTP id r11mr13937885pgj.44.1547744264222; Thu, 17 Jan 2019 08:57:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547744264; cv=none; d=google.com; s=arc-20160816; b=CfZpTEVg3JUYMmPLh0SgqbRxag3zUax/eq85LebuQO6Y1UgChNHqAQ+WO/gtRTUUL3 c0dPneZ9ne28qMrHJUbrzMtwG6yDGKFA7JPOa+MzlJgYqK84R4S/zt1eRqglXniQgKaF mZVM0xqzNplhPO4hXvp3RyvjuVEtglrwsj6gl3j01gSQU7oJxenVRBSfneGsNpcDN1Aj 7GkKnrI9eMIiS+wvhVSX70DGSEV8K1KZheE4JQ3aUNs/9F+G/+nqU+qgrLyv8wuVD1SH dyXgxl9HyrOHQ68izpK090fWv5bdV7wJrd1/vV/br6Z5BcB1MJnI+14v0sMnJsi/wSjE eQtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Rn9rsZuCSSjzYYPQ+62CJKuWjWxIhG5kt5EwxvzV0zY=; b=SFOmLlClJHeWfaRAy78ATJHdDJxN7rluVGgnUuUXHr+ZsnOl7ZojWiOq0dOjPoNRGL usaBofga0w1hqd95tbaU/KB1cur/4BDAcQND3Lry4pd+1DrCSY12LtO3Hn78its1Za1h o+Rzxn85R0qjvT47rMIvZp0aZO90tL4NbJhQ4LqvPBUSea/K9TWCCpCsOh3jAADAHpBu 5v401m93LhEH2qaZlkY1KOqzwgm+NbQR75DeidIsIuW2zE4k2Ka3xpox88wQ7iWSLFna ++Oxrko/uFOxW3inuOTtW2DTY0Qbf5qExKzQb/nzljS4cPILKqn7eOLtFKMjPabSLL6Q qg4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=cns3pxBj; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o32si2073127pld.407.2019.01.17.08.57.28; Thu, 17 Jan 2019 08:57:44 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=cns3pxBj; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729135AbfAQQ4U (ORCPT + 99 others); Thu, 17 Jan 2019 11:56:20 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:44992 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728515AbfAQQ4U (ORCPT ); Thu, 17 Jan 2019 11:56:20 -0500 Received: by mail-ot1-f67.google.com with SMTP id f18so11700664otl.11 for ; Thu, 17 Jan 2019 08:56:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Rn9rsZuCSSjzYYPQ+62CJKuWjWxIhG5kt5EwxvzV0zY=; b=cns3pxBjqz2aeJW7ho3ts/fvTC5/fMjksg2ZBn3RDRN6Ce1LFr/eaNkkar5bCU2hD1 AZTk8cC+zT9/gltc0y5w/xZH+fVckPgARXuwzx8/wGYnNNwcVBTYcGJcbrlCU9QoDODs OyLNR01z65fZ28+2QODVrb3NJ0PROp31Z30Oe4WEBUJaaCdonumn5bmrcBUF4/zDgV9c r2c7HwTUMf69pHmtSNr072Q6DiaLgp82NRO+Xnst8ocjX3vYAm1Gd72BlSqVptP538FK i9eMT6OKkSrShBWJ5zc9k4+rdybJnRVKJgDvlzSUqMPnwNFhYoQffmolStM0WYg57Spt 7Jog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rn9rsZuCSSjzYYPQ+62CJKuWjWxIhG5kt5EwxvzV0zY=; b=r9iMKW9+hJwO5yJtsSoap24vW02wPO2iI21htWy7/FFpJ6TmKJq6Tkr73r9tdqzMAl 6KbX0yx/l+q8Il2ZKx2RLb+Cqc4xLFzm1NiADhNuMyK+8983D5wK6MKezmxsKdueki8Q V69tB6nIlH8Z9+gywCr9GmvkQ1Ucz7LIZfO6OXfK5svdfC77s//jHqhFhXijVttXy+2s FewPndae54/AvYkAjWiEGSbUov+55NTXSEePTkQTYtzJXvODTn9Mxed4Zk0lf7SvYln1 J+IXl+WK8TGRqJ+5x6bOQ6fDUmsKrQP+inP7bRf6sI8Q/8hw1ywL/PTHtWjFcVIP+e4x EDmw== X-Gm-Message-State: AJcUukeywd0SSl8tS6axoDhIZ2mbIce7UApUtaHPaGO4l6hAYtjpSerK HuB+Pxa++tPuQBW6sXO/Q1MWkfNdc6PgDWo21sjY0w== X-Received: by 2002:a9d:5cc2:: with SMTP id r2mr9245443oti.367.1547744179510; Thu, 17 Jan 2019 08:56:19 -0800 (PST) MIME-Version: 1.0 References: <20190116181859.D1504459@viggo.jf.intel.com> <20190116181905.12E102B4@viggo.jf.intel.com> <5A90DA2E42F8AE43BC4A093BF06788482571FCB1@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <5A90DA2E42F8AE43BC4A093BF06788482571FCB1@SHSMSX103.ccr.corp.intel.com> From: Dan Williams Date: Thu, 17 Jan 2019 08:56:08 -0800 Message-ID: Subject: Re: [PATCH 4/4] dax: "Hotplug" persistent memory for use like normal RAM To: "Du, Fan" Cc: Dave Hansen , "dave@sr71.net" , "thomas.lendacky@amd.com" , "mhocko@suse.com" , "linux-nvdimm@lists.01.org" , "tiwai@suse.de" , "zwisler@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "Wu, Fengguang" , "baiyaowei@cmss.chinamobile.com" , "Huang, Ying" , "bhelgaas@google.com" , "akpm@linux-foundation.org" , "bp@suse.de" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 16, 2019 at 9:21 PM Du, Fan wrote: [..] > >From: Dave Hansen > > > >Currently, a persistent memory region is "owned" by a device driver, > >either the "Direct DAX" or "Filesystem DAX" drivers. These drivers > >allow applications to explicitly use persistent memory, generally > >by being modified to use special, new libraries. > > > >However, this limits persistent memory use to applications which > >*have* been modified. To make it more broadly usable, this driver > >"hotplugs" memory into the kernel, to be managed ad used just like > >normal RAM would be. > > > >To make this work, management software must remove the device from > >being controlled by the "Device DAX" infrastructure: > > > > echo -n dax0.0 > /sys/bus/dax/drivers/device_dax/remove_id > > echo -n dax0.0 > /sys/bus/dax/drivers/device_dax/unbind > > > >and then bind it to this new driver: > > > > echo -n dax0.0 > /sys/bus/dax/drivers/kmem/new_id > > echo -n dax0.0 > /sys/bus/dax/drivers/kmem/bind > > Is there any plan to introduce additional mode, e.g. "kmem" in the userspace > ndctl tool to do the configuration? > Yes, but not to ndctl. The daxctl tool will grow a helper for this. The policy of what device-dax instances should be hotplugged at system init will be managed by a persistent configuration file and udev rules.