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

Support memory hotplugged removable #791

Closed
BetaXOi opened this issue Sep 27, 2018 · 5 comments
Closed

Support memory hotplugged removable #791

BetaXOi opened this issue Sep 27, 2018 · 5 comments

Comments

@BetaXOi
Copy link

BetaXOi commented Sep 27, 2018

Since kata support hotplug memory by update(#624),it's easy to increase memory but not support to reduce.
I modify some code to support remove the memory hotplugged.

But the feature maybe conflict with udev rules in VM(the kata container image build by osbuilder):

  • centos
    There is a memory udev rules(/usr/lib/udev/rules.d/40-redhat.rules) in VM already, it will cause the memory hotplugged maybe mapped in ZONE_DMA32 instead of ZONE_Movable.
  • clearlinux
    There is no any memory udev rules in VM, the memory hotplugged will be mapped in ZONE_Movable, so you can remove the memory safly in the case.
  • other
    no test yet

I have no good solution how to fix the conflict, suggestions anyone?

@jcvenegas
Copy link
Member

@BetaXOi hey thanks for create the issue I am trying to follow a different aprouch here using virtio-balloon see #790

@jcvenegas
Copy link
Member

@BetaXOi correct me if I am wrong but, one thing that is difficult is that even if we request to the OS, sometimes is not possible to remove the slot because memory is fragmented and if it is possible this may be slow because the kernel has to move pages to only one slot before allow hotplug the device.

@jcvenegas
Copy link
Member

@BetaXOi Take a look to #790

@BetaXOi
Copy link
Author

BetaXOi commented Sep 28, 2018

@BetaXOi correct me if I am wrong but, one thing that is difficult is that even if we request to the OS, sometimes is not possible to remove the slot because memory is fragmented and if it is possible this may be slow because the kernel has to move pages to only one slot before allow hotplug the device.

I'm not sure which one is better for kata container,hava a look at this paper

@jcvenegas
Copy link
Member

@BetaXOi interesting! I will read it tomorrow morning, seems that we will need some measures to compare this the two options. I was worried that memory can not being hot removed (I've tried was slow and sometimes not possible)but in theory your PR kata-containers/agent#386 will help to this. I will test your patches tomorrow. If you find additional benefits please feel free to add it.

Something my first idea was combination of both hotplug when we needed more memory and balloon to reduce the memory. But now seeeing that is possible to hot remove I want to evaluate both.

@BetaXOi BetaXOi closed this as completed Nov 9, 2018
egernst pushed a commit to egernst/runtime that referenced this issue Feb 9, 2021
With this change, a container is not longer given access to
the underlying nvdimm root partition.
This is done by explicitly adding the nvdimm root partition
to the device cgroup of the container.

Fixes kata-containers#791

Signed-off-by: Archana Shinde <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants