RE: [EXTERNAL] Re: memory_block_size reduction in memory hot plug, can we reduced it to 1GB, currently it is 4GB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 
Sent: Sunday, January 9, 2022 5:56 PM
To: Ranjan, Vikash <Vikash.Ranjan@xxxxxxxxxx>; linux-mm@xxxxxxxxx
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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux