[pve-devel] [PATCH] add hugepages option v5
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Jun 8 10:50:37 CEST 2016
> On June 8, 2016 at 7:13 AM Alexandre DERUMIER <aderumier at odiso.com> wrote:
>
>
> >>One possibility would be adding an inotify handler onto the qemu.slice
> >>to pvestatd...
>
> another way, simply wrote a
>
> /var/run/qemu-server/vmid.hugepages when vm is starting, with hugepages topology
>
> then in pvestatd, if vm is down and vmid.hugepages file is present, cleanup memory and remove file
>
>
> Like this we can avoid inotify (in case of pvestatd was stopped/hanging)
A suggestion from Dietmar:
How about pvestatd just regularly sets nr_hugepages to 0 while holding the lock?
The numbers you write to the file get capped by what's available and in-use.
Eg if nr_hugepages is 20, you have a VM using 8, and write 0 to it, then
it'll contain 8. If we do this while holding the same lock we hold when
starting a VM then this should work? Basically: allocate when starting, and
let pve-statd free it regularly.
More information about the pve-devel
mailing list