LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chandan Vn <vn.chandan@gmail.com>
To: Laura Abbott <labbott@redhat.com>
Cc: CHANDAN VN <chandan.vn@samsung.com>,
	catalin.marinas@arm.com, will.deacon@arm.com,
	takahiro.akashi@linaro.org, james.morse@arm.com,
	robin.murphy@arm.com, steve.capper@arm.com,
	kristina.martsenko@arm.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, cpgs@samsung.com
Subject: Re: [PATCH 1/1] arm64: To remove initrd reserved area entry from memblock
Date: Sat, 7 Apr 2018 09:58:21 +0530	[thread overview]
Message-ID: <CADYJ94eQyN7dtnnVN_AF0VixaJh3x52068xYtq54hsS4BpdwFg@mail.gmail.com> (raw)
In-Reply-To: <ff125919-66f7-6658-e9b1-817188c1bdd9@redhat.com>

On Fri, Apr 6, 2018 at 9:47 PM, Laura Abbott <labbott@redhat.com> wrote:
> Does this have an impact on anything besides accounting
> in memblock?

Yes, the impact is only on accounting or debugging.

We were trying to reduce the reserved memory by removing initrd reserved area.
After disabling "keepinitrd", only way to check if it was removed or
not was to check
/sys/kernel/debug/memblock/reserved. We found the entry to be present
irrespective of
"keepinitrd" being enabled/disabled.
I hope that with the fix others wont face similar issue. Also we did
not find any such problem
with ARM32 ARCHITECTURE.

On Fri, Apr 6, 2018 at 9:47 PM, Laura Abbott <labbott@redhat.com> wrote:
> On 04/05/2018 09:53 PM, CHANDAN VN wrote:
>>
>> INITRD reserved area entry is not removed from memblock
>> even though initrd reserved area is freed. After freeing
>> the memory it is released from memblock. The same can be
>> checked from /sys/kernel/debug/memblock/reserved.
>>
>> The patch makes sure that the initrd entry is removed from
>> memblock when keepinitrd is not enabled.
>>
>
> Does this have an impact on anything besides accounting
> in memblock?
>
>
>> Signed-off-by: CHANDAN VN <chandan.vn@samsung.com>
>> ---
>>   arch/arm64/mm/init.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
>> index 9f3c47a..1b18b47 100644
>> --- a/arch/arm64/mm/init.c
>> +++ b/arch/arm64/mm/init.c
>> @@ -646,8 +646,10 @@ void free_initmem(void)
>>     void __init free_initrd_mem(unsigned long start, unsigned long end)
>>   {
>> -       if (!keep_initrd)
>> +       if (!keep_initrd) {
>>                 free_reserved_area((void *)start, (void *)end, 0,
>> "initrd");
>> +               memblock_free(__virt_to_phys(start), end - start);
>> +       }
>>   }
>>     static int __init keepinitrd_setup(char *__unused)
>>
>

  reply	other threads:[~2018-04-07  4:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180406045340epcas1p1ae6416dc25823212303c9109d125c018@epcas1p1.samsung.com>
2018-04-06  4:53 ` CHANDAN VN
2018-04-06 16:17   ` Laura Abbott
2018-04-07  4:28     ` Chandan Vn [this message]
2018-04-23  5:00       ` Chandan Vn
2018-04-27 16:55         ` Will Deacon
     [not found]   ` <CGME20180430042028epcas2p24418c10ebe7b2c656cdfc31e98ed540b@epcas2p2.samsung.com>
2018-04-30  4:20     ` [PATCHv2 " CHANDAN VN
2018-04-30 17:21       ` Laura Abbott

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=CADYJ94eQyN7dtnnVN_AF0VixaJh3x52068xYtq54hsS4BpdwFg@mail.gmail.com \
    --to=vn.chandan@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=chandan.vn@samsung.com \
    --cc=cpgs@samsung.com \
    --cc=james.morse@arm.com \
    --cc=kristina.martsenko@arm.com \
    --cc=labbott@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=steve.capper@arm.com \
    --cc=takahiro.akashi@linaro.org \
    --cc=will.deacon@arm.com \
    --subject='Re: [PATCH 1/1] arm64: To remove initrd reserved area entry from memblock' \
    /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

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).