linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <bsingharora@gmail.com>
To: "Stephen  Bates" <sbates@raithlin.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"Logan Gunthorpe" <logang@deltatee.com>
Subject: Re: lpar issue for ZONE_DEVICE p2pmem in 4.14-rc
Date: Mon, 23 Oct 2017 13:53:38 +1100	[thread overview]
Message-ID: <20171023135338.58d0ab31@MiWiFi-R3-srv> (raw)
In-Reply-To: <AF0CC512-DC7D-45EB-B1AB-7132B48C38E1@raithlin.com>

On Sat, 21 Oct 2017 15:03:29 +0000
"Stephen  Bates" <sbates@raithlin.com> wrote:

> > I am guessing that the hotplug of ZONE_DEVICE memory was done
> > incorrectly as it lead to HPT resizing (the system thinking this is
> > normal memory). Ideally one would expect that the driver would online
> > ZONE_DEVICE memory and not go through the HOTPLUG path. Are you using
> > devm_memremap_pages() path to add these pages?
> >  
> 
> Thanks for the response Balbir. Yes we use devm_memremap_pages() to add these pages and it does call arch_add_memory(). We do have an alternate set of patches which still calls devm_memremap_pages() but can take a flag to indicate the memory being added is io memory and uses io_remap() rather than arch_add_memory() for that type of memory [1]. Would that be a better approach for this arch? I can try and apply this patch but __add_pages() has gone through some changes recently so it will take me a few days to get to that. 

I just double checked, for pmem you do need to come in via arch_add_memory(). I was confused
by what we do for HMM, which is call __add_pages(), but we do need a section mapping so
the interface is correct.

The following

[    3.537780] lpar: Attempting to resize HPT to shift 21
[    3.539251] Unable to resize hash page table to target order 21: -1
[    3.541079] Unable to create mapping for hot added memory 0xc000210000000000..0xc000210004000000: -2

Needs to be debugged further. For #1 above please check if your qemu supports
H_RESIZE_HPT_* hcalls? For create mapping failures, the rc is -ENOENT. Can
you help debug this further? We could do hcall tracing or enable debugging.

Balbir Singh.

  reply	other threads:[~2017-10-23  2:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 20:38 lpar issue for ZONE_DEVICE p2pmem in 4.14-rc Stephen  Bates
2017-10-17 21:29 ` Balbir Singh
2017-10-21 15:03   ` Stephen  Bates
2017-10-23  2:53     ` Balbir Singh [this message]
2017-10-23 20:17       ` Stephen  Bates
2017-10-25 14:34         ` Oliver
2017-10-27  8:07           ` Oliver
2017-10-28 20:54             ` Stephen  Bates

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=20171023135338.58d0ab31@MiWiFi-R3-srv \
    --to=bsingharora@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=logang@deltatee.com \
    --cc=sbates@raithlin.com \
    /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;
as well as URLs for NNTP newsgroup(s).