From: Michael Ellerman <mpe@ellerman.id.au>
To: Reza Arbab <arbab@linux.vnet.ibm.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Dan Williams <dan.j.williams@intel.com>,
Balbir Singh <bsingharora@gmail.com>,
Gavin Shan <gwshan@linux.vnet.ibm.com>,
David Gibson <david@gibson.dropbear.id.au>,
Vasant Hegde <hegdevasant@linux.vnet.ibm.com>,
Scott Wood <scottwood@freescale.com>,
Oliver O'Halloran <oohall@gmail.com>,
Nathan Fontenot <nfont@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix
Date: Tue, 28 Jun 2016 21:21:05 +1000 [thread overview]
Message-ID: <1467112865.16036.4.camel@ellerman.id.au> (raw)
In-Reply-To: <20160623193739.GA19202@arbab-laptop.austin.ibm.com>
On Thu, 2016-06-23 at 14:37 -0500, Reza Arbab wrote:
> On Thu, Jun 23, 2016 at 10:47:20PM +0530, Aneesh Kumar K.V wrote:
> > Reza Arbab <arbab@linux.vnet.ibm.com> writes:
> > > These functions are making direct calls to the hash table APIs,
> > > leading to a BUG() on systems using radix.
> > >
> > > Switch them to the vmemmap_{create,remove}_mapping() wrappers, and
> > > move to the __meminit section.
> >
> > They are really not the same. They can possibly end up using different
> > base page size. Also vmemmap is available only with SPARSEMEM_VMEMMAP
> > enabled. Does hotplug depend on sparsemem vmemmap ?
>
> I'm not sure. Maybe it's best if I back up a step and explain what lead
> me to this patch. During hotplug, you get
>
> ...
> arch_add_memory
> create_section_mapping
> htab_bolt_mapping
> BUG_ON(!ppc_md.hpte_insert);
>
> So it seemed to me that I needed a radix equivalent of
> create_section_mapping().
>
> After some digging, I found hash__vmemmap_create_mapping() and
> radix__vmemmap_create_mapping() did what I needed. I did not notice the
> #ifdef SPARSEMEM_VMEMMAP around them.
I think that's more by luck than design. The vmemmap routines use
mmu_vmemmap_psize which is probably but not definitely the same as
mmu_linear_psize.
> Could it be that the functions just need to be renamed
> hash__create_mapping()/radix__create_mapping() and moved out of #ifdef
> SPARSEMEM_VMEMMAP?
No, you need to use mmu_linear_psize for the hotplug case.
But you can probably factor out a common routine that both cases use, and hide
the hash vs radix check in that.
And probably send me a patch to make MEMORY_HOTPLUG depend on !RADIX for v4.7?
cheers
next prev parent reply other threads:[~2016-06-28 11:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 16:39 [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix Reza Arbab
2016-06-23 17:17 ` Aneesh Kumar K.V
2016-06-23 17:27 ` Nathan Fontenot
2016-06-23 19:37 ` Reza Arbab
2016-06-23 19:52 ` Reza Arbab
2016-06-28 11:21 ` Michael Ellerman [this message]
2016-06-28 14:03 ` Aneesh Kumar K.V
2016-06-29 15:37 ` Reza Arbab
2016-06-24 3:22 ` Balbir Singh
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=1467112865.16036.4.camel@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arbab@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=david@gibson.dropbear.id.au \
--cc=gwshan@linux.vnet.ibm.com \
--cc=hegdevasant@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nfont@linux.vnet.ibm.com \
--cc=oohall@gmail.com \
--cc=paulus@samba.org \
--cc=scottwood@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.