From: Anton Blanchard <anton@ozlabs.org>
To: Reza Arbab <arbab@linux.vnet.ibm.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
mikey@neuling.org, npiggin@gmail.com, paulus@samba.org,
bharata@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
cyrilbur@gmail.com,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix
Date: Fri, 8 Sep 2017 11:15:47 +1000 [thread overview]
Message-ID: <20170908111547.0f30e1a5@kryten> (raw)
In-Reply-To: <20170907155902.kpzhgqqsxbwxwce5@arbab-laptop.localdomain>
Hi Reza,
> I may be misunderstanding this, but what if we did something like x86
> does? When trying to unplug a region smaller than the mapping, they
> fill that part of the pagetable with 0xFD instead of freeing the
> whole thing. Once the whole thing is 0xFD, free it.
>
> See arch/x86/mm/init_64.c:remove_{pte,pmd,pud}_table()
>
> ---%<---
> memset((void *)addr, PAGE_INUSE, next - addr);
>
> page_addr = page_address(pte_page(*pte));
> if (!memchr_inv(page_addr, PAGE_INUSE, PAGE_SIZE)) {
> ...
> pte_clear(&init_mm, addr, pte);
> ...
> }
> ---%<---
But you only have 1GB ptes at this point, you'd need to start
instantiating a new level in the tree, and populate 2MB ptes.
That is what Ben is suggesting. I'm happy to go any way (fix hotplug
to handle this, or increase the memblock size on PowerNV to 1GB), I just
need a solution.
Anton
next prev parent reply other threads:[~2017-09-08 1:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 5:05 [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix Anton Blanchard
2017-09-07 5:09 ` Aneesh Kumar K.V
2017-09-07 5:17 ` Anton Blanchard
2017-09-07 7:21 ` Benjamin Herrenschmidt
2017-09-08 21:51 ` Balbir Singh
2017-09-07 15:59 ` Reza Arbab
2017-09-08 1:15 ` Anton Blanchard [this message]
2017-09-09 21:30 ` Michael Ellerman
2017-10-06 11:10 ` Michael Ellerman
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=20170908111547.0f30e1a5@kryten \
--to=anton@ozlabs.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arbab@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bharata@linux.vnet.ibm.com \
--cc=cyrilbur@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=npiggin@gmail.com \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).