Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

agent: get content of a file in sandbox #354

@cedriccchen

Description

@cedriccchen

Description of problem

In kata-containers/runtime#624, we have such problems:

  1. 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.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions