summaryrefslogtreecommitdiff
path: root/drivers/phy/motorola
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2020-11-12 14:38:02 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-12-18 16:14:26 -0500
commit98ff9f9411860073f952f1e62a05afb9f6a9e77e (patch)
tree1b58ab38f4b2c9de9165c34bf1134e281061f695 /drivers/phy/motorola
parent1d33c2caa8cbdc0f093a8cdad5a4c153ef9cbe8f (diff)
virtio-mem: generalize handling when memory is getting onlined deferred
We don't want to add too much memory when it's not getting onlined immediately, to avoid running OOM. Generalize the handling, to avoid making use of memory block states. Use a threshold of 1 GiB for now. Properly adjust the offline size when adding/removing memory. As we are not always protected by a lock when touching the offline size, use an atomic64_t. We don't care about races (e.g., someone offlining memory while we are adding more), only about consistent values. (1 GiB needs a memmap of ~16MiB - which sounds reasonable even for setups with little boot memory and (possibly) one virtio-mem device per node) We don't want to retrigger when onlining is caused immediately by our action (e.g., adding memory which immediately gets onlined), so use a flag to indicate if the workqueue is active and use that as an indicator whether to trigger a retry. This will also be especially relevant for Big Block Mode (BBM), whereby we might re-online memory in case offlining of another memory block failed. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com> Signed-off-by: David Hildenbrand <david@redhat.com> Link: https://lore.kernel.org/r/20201112133815.13332-17-david@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/phy/motorola')
0 files changed, 0 insertions, 0 deletions