You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 12, 2021. It is now read-only.
Hot add memory should be aligned to memory section size, but the size of a memory section is architecture dependent. For example, power uses 16MB, ia64 uses 1GB, x86_64 uses 128MB, ppc64le uses 256MB.
Each memory block is described under /sys/devices/system/memory as /sys/devices/system/memory/memoryXXX (XXX is the memory block id.), which is the unit of memory online/offline. In sparse memory model, memory block size is a multiple of memory section size, reference. We can online a memory block only if we hotplug a memory-block-sized dimm, see pages_correctly_reserved in reference.
So we should get the size of guestos memory block by reading /sys/devices/system/memoryblock_size_bytes in sandbox, and make hot add memory to be aligned to memory block size of sandbox.
I think it's needed to add a ReadSandboxFile rpc to read file above in a common way.