From: "Ranjan, Vikash" <Vikash.Ranjan@harman.com>
To: David Hildenbrand <david@redhat.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: RE: [EXTERNAL] Re: memory_block_size reduction in memory hot plug, can we reduced it to 1GB, currently it is 4GB
Date: Mon, 10 Jan 2022 16:07:59 +0000 [thread overview]
Message-ID: <0106b4c9c9e740d5927cf805712ebe3f@HIBDWSMB03.ad.harman.com> (raw)
In-Reply-To: <4821e34b-b7b5-a281-588d-fe8242856b6b@redhat.com>
Hi David,
You were right , in my source code
arch/arm64/include/asm/sparsemem.h:#define SECTION_SIZE_BITS 30 arch/arm64/include/asm/sparsemem.h:#define SECTION_SIZE_BITS 27
I need your input on below.
1) currently due to code ( if (phys_addr & ((pages_per_block << PAGE_SHIFT) - 1)) return -EINVAL;) as of now we could give start addr in the increasing step of 40000000 such as 940000000,980000000,9C0000000. However we cannot give 95000000,990000000,9d0000000. Can we give start address which is not in step of 40000000
2) You were right MIN_MEMORY_BLOCK_SIZE is 1 GB, can we further reduce memory region length to 128 MB or it will be good if we can make it customizable( even smaller then 128 MB). Like in our system I want to hot-plug memory which is starting from 9e0000000 to 9e3000000, As we can see memory region is dependent on MIN_MEMORY_BLOCK_SIZE in below code.
ret = __add_memory(nid, phys_addr,
MIN_MEMORY_BLOCK_SIZE * sections_per_block);
My ask for above is due to non-availability of non -reserved memory in continuous bigger chunk in our system.
Please let me know your input if we can do the same.
Thanks,
Vikash
-----Original Message-----
From: David Hildenbrand <david@redhat.com>
Sent: Sunday, January 9, 2022 5:56 PM
To: Ranjan, Vikash <Vikash.Ranjan@harman.com>; linux-mm@kvack.org
Subject: [EXTERNAL] Re: memory_block_size reduction in memory hot plug, can we reduced it to 1GB, currently it is 4GB
[EXTERNAL EMAIL]
Hi
>
> We are trying to enable memory hot plug for our device's based on
> arm64, is it possible to reduce memory_block_size to 1 GB or lesser as
> currently it is 4GB.
... are you sure it's 4GB? I never heard that magic number on arm64 before. The section size is 512 MiB on arm64 with 64k and 128 MiB with 4k.
Vikash--- yes David you were right.
>
> If you have any info on updated patch or any other way we can do this,
> please let us know.
>
> After applying attached test patch (for reduction of
> memory_block_size to 1 GB),we are getting below error. Probe is working fine in case of 4GB.
>
I think I am missing something important.
#define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS)
arch/arm64/include/asm/sparsemem.h:#define SECTION_SIZE_BITS 29 arch/arm64/include/asm/sparsemem.h:#define SECTION_SIZE_BITS 27
-> 512 MiB / 128 MiB
arm64 does not override memory_block_size_bytes(), so it matches exactly these numbers.
1)
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2022-01-10 16:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 7:04 memory_block_size reduction in memory hot plug, can we reduced it to 1GB,currently " Ranjan, Vikash
2022-01-09 12:25 ` David Hildenbrand
2022-01-10 16:07 ` Ranjan, Vikash [this message]
2022-01-10 16:22 ` [EXTERNAL] Re: memory_block_size reduction in memory hot plug, can we reduced it to 1GB, currently " David Hildenbrand
2022-01-11 3:53 ` Ranjan, Vikash
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=0106b4c9c9e740d5927cf805712ebe3f@HIBDWSMB03.ad.harman.com \
--to=vikash.ranjan@harman.com \
--cc=david@redhat.com \
--cc=linux-mm@kvack.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