linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Brice Goglin <Brice.Goglin@inria.fr>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "Dave Hansen" <dave.hansen@intel.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Tom Lendacky" <thomas.lendacky@amd.com>,
	"Michal Hocko" <mhocko@suse.com>,
	linux-nvdimm <linux-nvdimm@lists.01.org>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Ross Zwisler" <zwisler@kernel.org>,
	"Linux MM" <linux-mm@kvack.org>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Fengguang Wu" <fengguang.wu@intel.com>,
	"Yaowei Bai" <baiyaowei@cmss.chinamobile.com>,
	"Huang, Ying" <ying.huang@intel.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Borislav Petkov" <bp@suse.de>
Subject: Re: [PATCH 5/5] dax: "Hotplug" persistent memory for use like normal RAM
Date: Wed, 13 Feb 2019 14:06:59 +0100	[thread overview]
Message-ID: <eb58cb96-1f61-2dd2-b1ab-5a7d4df78297@inria.fr> (raw)
In-Reply-To: <057ad938-e745-02f7-edce-e19bd326da6a@inria.fr>


Le 13/02/2019 à 09:43, Brice Goglin a écrit :
> Le 13/02/2019 à 09:24, Dan Williams a écrit :
>> On Wed, Feb 13, 2019 at 12:12 AM Brice Goglin <Brice.Goglin@inria.fr> wrote:
>>> Le 13/02/2019 à 01:30, Dan Williams a écrit :
>>>> On Tue, Feb 12, 2019 at 11:59 AM Brice Goglin <Brice.Goglin@inria.fr> wrote:
>>>>> # ndctl disable-region all
>>>>> # ndctl zero-labels all
>>>>> # ndctl enable-region region0
>>>>> # ndctl create-namespace -r region0 -t pmem -m devdax
>>>>> {
>>>>>   "dev":"namespace0.0",
>>>>>   "mode":"devdax",
>>>>>   "map":"dev",
>>>>>   "size":"1488.37 GiB (1598.13 GB)",
>>>>>   "uuid":"ad0096d7-3fe7-4402-b529-ad64ed0bf789",
>>>>>   "daxregion":{
>>>>>     "id":0,
>>>>>     "size":"1488.37 GiB (1598.13 GB)",
>>>>>     "align":2097152,
>>>>>     "devices":[
>>>>>       {
>>>>>         "chardev":"dax0.0",
>>>>>         "size":"1488.37 GiB (1598.13 GB)"
>>>>>       }
>>>>>     ]
>>>>>   },
>>>>>   "align":2097152
>>>>> }
>>>>> # ndctl enable-namespace namespace0.0
>>>>> # echo -n dax0.0 > /sys/bus/dax/drivers/device_dax/remove_id
>>>>> <hang>
>>>>>
>>>>> I tried with and without dax_pmem_compat loaded, but it doesn't help.
>>>> I think this is due to:
>>>>
>>>>   a9f1ffdb6a20 device-dax: Auto-bind device after successful new_id
>>>>
>>>> I missed that this path is also called in the remove_id path. Thanks
>>>> for the bug report! I'll get this fixed up.
>>> Now that remove_id is fixed, things fails later in Dave's procedure:
>>>
>>> # echo -n dax0.0 > /sys/bus/dax/drivers/device_dax/remove_id
>>> # echo -n dax0.0 > /sys/bus/dax/drivers/device_dax/unbind
>>> # echo -n dax0.0 > /sys/bus/dax/drivers/kmem/new_id
>> In the current version of the code the bind is not necessary, so the
>> lack of error messages here means the bind succeeded.


It looks like "unbind" is required to make the PMEM appear as a new
node. If I remove_id from devdax and new_id to kmem without "unbind" in
the middle, nothing appears.

Writing to "kmem/bind" didn't seem necessary.

Brice



>>
>>> # echo -n dax0.0 > /sys/bus/dax/drivers/kmem/bind
>>> -bash: echo: write error: No such device
>> This also happens when the device is already bound.
>>
>>> (And nothing seems to have changed in /sys/devices/system/memory/*/state)
>> What does "cat /proc/iomem" say?
>
> 3060000000-1aa5fffffff : Persistent Memory
>   3060000000-36481fffff : namespace0.0
>   3680000000-1a9ffffffff : dax0.0
>     3680000000-1a9ffffffff : System RAM
> (the last line wasn't here before attaching to kmem)
>
> I said nothing changed in memory/*/state, I actually meant that nothing
> was offline. But things are actually working!
>
> First, node4 appeared, all memory is already attached to it without
> having to write to memory/*/state
>
> Node 4 MemTotal:       1558183936 kB
> Node 4 MemFree:        1558068564 kB
> Node 4 MemUsed:          115372 kB
>
> I wasn't expecting node4 to appear because the machine has no
> /sys/firmware/acpi/tables/HMAT when running in 1LM (there's one in 2LM).
> I thought you said in the past that no HMAT would mean memory would be
> added to the existing DDR node?
>
> Thanks!
>
> Brice
>
>


  reply	other threads:[~2019-02-13 13:07 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 23:14 [PATCH 0/5] [v4] Allow persistent memory to be used " Dave Hansen
2019-01-24 23:14 ` Dave Hansen
2019-01-24 23:14 ` [PATCH 1/5] mm/resource: return real error codes from walk failures Dave Hansen
2019-01-24 23:14   ` Dave Hansen
2019-01-25 21:02   ` Bjorn Helgaas
2019-01-25 21:02     ` Bjorn Helgaas
2019-01-25 21:09     ` Dave Hansen
2019-01-25 21:19       ` Bjorn Helgaas
2019-01-25 21:19         ` Bjorn Helgaas
2019-01-29  1:18       ` Michael Ellerman
2019-01-24 23:14 ` [PATCH 2/5] mm/resource: move HMM pr_debug() deeper into resource code Dave Hansen
2019-01-24 23:14   ` Dave Hansen
2019-01-25 19:07   ` Jerome Glisse
2019-01-25 21:18   ` Bjorn Helgaas
2019-01-25 21:18     ` Bjorn Helgaas
2019-01-25 21:24     ` Dave Hansen
2019-01-29  1:34       ` Michael Ellerman
2019-01-24 23:14 ` [PATCH 3/5] mm/memory-hotplug: allow memory resources to be children Dave Hansen
2019-01-24 23:14   ` Dave Hansen
2019-01-24 23:14 ` [PATCH 4/5] dax/kmem: let walk_system_ram_range() search child resources Dave Hansen
2019-01-24 23:14   ` Dave Hansen
2019-01-24 23:14 ` [PATCH 5/5] dax: "Hotplug" persistent memory for use like normal RAM Dave Hansen
2019-01-24 23:14   ` Dave Hansen
2019-01-25  6:13   ` Jane Chu
2019-01-25  6:27     ` Dan Williams
2019-01-25  6:27       ` Dan Williams
2019-01-25  8:20       ` Du, Fan
2019-01-25 17:18         ` Dan Williams
2019-01-25 18:20           ` Verma, Vishal L
2019-01-25 19:10             ` Jane Chu
2019-01-25 19:15               ` Dan Williams
2019-01-25 19:15                 ` Dan Williams
2019-01-25 23:30                 ` Jane Chu
2019-01-28  9:25                 ` Michal Hocko
2019-01-28 16:34                   ` Dan Williams
2019-01-28 16:34                     ` Dan Williams
2019-02-09 11:00   ` Brice Goglin
2019-02-11 16:22     ` Dave Hansen
2019-02-12 19:59       ` Brice Goglin
2019-02-13  0:30         ` Dan Williams
2019-02-13  8:12           ` Brice Goglin
2019-02-13  8:24             ` Dan Williams
2019-02-13  8:43               ` Brice Goglin
2019-02-13 13:06                 ` Brice Goglin [this message]
2019-02-13 16:19                   ` Dan Williams
2019-01-25 19:08 ` [PATCH 0/5] [v4] Allow persistent memory to be used " Jerome Glisse
2019-01-28 11:09 ` Balbir Singh
2019-01-28 16:50   ` Dave Hansen
2019-01-28 16:50     ` Dave Hansen
2019-02-25 18:57 [PATCH 0/5] [v5] " Dave Hansen
2019-02-25 18:57 ` [PATCH 5/5] dax: "Hotplug" persistent memory for use " Dave Hansen
2019-02-25 22:56   ` Verma, Vishal L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb58cb96-1f61-2dd2-b1ab-5a7d4df78297@inria.fr \
    --to=brice.goglin@inria.fr \
    --cc=akpm@linux-foundation.org \
    --cc=baiyaowei@cmss.chinamobile.com \
    --cc=bhelgaas@google.com \
    --cc=bp@suse.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mhocko@suse.com \
    --cc=thomas.lendacky@amd.com \
    --cc=tiwai@suse.de \
    --cc=ying.huang@intel.com \
    --cc=zwisler@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox