-
Notifications
You must be signed in to change notification settings - Fork 374
runtime: support memory hotplug via probe interface on aarch64 #1152
Conversation
5d4319f
to
49d52ac
Compare
@Pennyzct ping, any updates? Thx. Is this waiting for review? |
/zuul-recheck |
func (k *kataAgent) memHotplugByProbe(addr uint64, sizeMB uint32, memorySectionSizeMB uint32) error { | ||
// hot-added memory device should be sliced into the size of memory section, which is the basic unit for | ||
// memory hotplug | ||
numSection := uint64(sizeMB / memorySectionSizeMB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about returning an error if memorySectionSizeMB
is zero? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,yes,yes.;) definitely need to avoid divided by zero
, update asap. ;)
Hi @Pennyzct - is this PR still alive/valid ? |
Hi~ @grahamwhaley yes,yes,yes. So sorry for the long-time hanging up, I constantly got sidetracked.😭. since related agent/#443 commit has already been merged, i will |
9ae365b
to
b8621a8
Compare
Hi~ all. When I |
Hi @Pennyzct - yes, you need to |
PR raised - kata-containers/community#89. |
@Pennyzct, @jodh-intel just because of curiosity, why are you using |
@umarcor - at this point, it may be mostly due to historical reasons - the kata, and forerunner, code bases have been around a few years now... I think Now, if you'd like to propose a move to |
Yes - at the time we introduced it, |
@umarcor @grahamwhaley @jodh-intel I recently discussed this with @mcastelino and I think it is time for us to move to go modules. We need to open issues on every Kata repositories for this. And then let's start submit PRs. @umarcor is it something you're interested in helping with? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b8621a8
to
994ec50
Compare
/test |
Hi @Pennyzct - the CI's are failing on this:
It looks like you need to add a dummy implementation of |
994ec50
to
75c2b78
Compare
/test |
/retest |
Hi~ @grahamwhaley @jodh-intel metrix ci failed. Do we need to re-trigger or just skip it? |
Hi @Pennyzct any updates? Thx! |
In order to support memory hotplug via probe interface in kata-runtime, firstly, we need to verify whether guest kernel is capable of that. Fixes: kata-containers#1149 Signed-off-by: Penny Zheng <[email protected]>
If kata-runtime supports memory hotplug via probe interface, we need to reconstruct memoryDevice to store relevant status, which are addr and probe. addr specifies the physical address of the memory device, and probe determines it is hotplugged via acpi-driven or probe interface. Fixes: kata-containers#1149 Signed-off-by: Penny Zheng <[email protected]>
we need to notify guest kernel about memory hot-added event via probe interface. hot-added memory deivce should be sliced into the size of memory section. Fixes: kata-containers#1149 Signed-off-by: Penny Zheng <[email protected]>
We need to change the constraints of kata agent into the memory-hotplug related commit, to keep track of the revisons in kata agent. Fixes: kata-containers#1149 Signed-off-by: Penny Zheng <[email protected]>
/test |
Hi~ guys~ @kata-containers/runtime Do you remember this one? (I indeed totally forget it. 😓) I have already re-based. pls review~thanks. ;) |
Hi~ @grahamwhaley @jodh-intel @devimc vsock CI is failing.
FWIT, |
@chavafg - that vsock issue is pretty old - did we fix/bypass it? If so, I wonder why we hit it again here? |
@Pennyzct that error is not related to this pr, I'll take a look later, |
Description of problem
There are 2 phases in Memory Hotplug. 1) Physical Memory Hotplug phase. 2) Logical Memory Hotplug phase.
The First phase is to communicate hardware/firmware and make/erase environment for hotplugged memory.
If firmware supports notification of connection of new memory to OS, this phase is triggered automatically. ACPI can notify this event. This also what kata supports, memory hotplug via acpi-driven.
But if not, there is another option,
probe
operation by hand.And since memory hotplug via acpi is missing on qemu-system-aarch64, we hope to support the other
probe
solution.the whole detailed info about
probe
interface could be found here.This whole implementation of memory hotplug via probe interface is divided into two phases, the first is to check if guest kernel is capable of memory hot-add via probe interface, which is located at
/sys/devices/system/memory/probe
.The second is let kata-agent tell guest kernel the physical address of new memory block.
echo start_address_of_new_memory > /sys/devices/system/memory/probe
Expected result