From: Hari Bathini <hbathini@linux.vnet.ibm.com>
To: Liu ping fan <kernelfans@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org, Pingfan Liu <piliu@redhat.com>
Subject: Re: [PATCH] powerpc/pseries hotplug: prevent the reserved mem from removing
Date: Wed, 3 May 2017 00:07:48 +0530 [thread overview]
Message-ID: <d8b0db80-9962-03e1-bf9b-d30d5623a0b7@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAFgQCTuCeCMdC-kJDXP69yoHOVG8+pPhJ5EVgyH1hdQrSWYaPA@mail.gmail.com>
On Friday 28 April 2017 09:59 AM, Liu ping fan wrote:
> On Fri, Apr 28, 2017 at 2:06 AM, Hari Bathini
> <hbathini@linux.vnet.ibm.com> wrote:
>> Hi Pingfan,
>>
>>
>> On Thursday 27 April 2017 01:13 PM, Pingfan Liu wrote:
>>> E.g after fadump reserves mem regions, these regions should not be removed
>>> before fadump explicitly free them.
>>> Signed-off-by: Pingfan Liu <piliu@redhat.com>
>>> ---
>>> arch/powerpc/platforms/pseries/hotplug-memory.c | 5 +++--
>>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c
>>> b/arch/powerpc/platforms/pseries/hotplug-memory.c
>>> index e104c71..201be23 100644
>>> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
>>> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
>>> @@ -346,6 +346,8 @@ static int pseries_remove_memblock(unsigned long base,
>>> unsigned int memblock_siz
>>>
>>> if (!pfn_valid(start_pfn))
>>> goto out;
>>> + if (memblock_is_reserved(base))
>>> + return -EINVAL;
>>
>> I think memblock reserved regions are not hot removed even without this
>> patch.
>> So, can you elaborate on when/why this patch is needed?
>>
> I have not found code to prevent the reserved regions from free. Do I
> miss anything?
IIUC, during hot-remove, while trying to offline reserved pages, it
reports -EBUSY
thus failing to remove a lmb that has reserved memory. I was wondering
if there would
be a case where that doesn't happen and this patch is necessary..
Thanks
Hari
next prev parent reply other threads:[~2017-05-02 18:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 7:43 [PATCH] powerpc/pseries hotplug: prevent the reserved mem from removing Pingfan Liu
2017-04-27 18:06 ` Hari Bathini
2017-04-28 4:29 ` Liu ping fan
2017-05-02 18:37 ` Hari Bathini [this message]
2017-04-28 10:18 ` kbuild test robot
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=d8b0db80-9962-03e1-bf9b-d30d5623a0b7@linux.vnet.ibm.com \
--to=hbathini@linux.vnet.ibm.com \
--cc=kernelfans@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=piliu@redhat.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).