[pve-devel] applied: [PATCH V2 pve-common] add get_pressure_stat

aderumier at odiso.com aderumier at odiso.com
Tue Feb 9 17:43:57 CET 2021


Hi,

Le lundi 08 février 2021 à 16:07 +0100, Thomas Lamprecht a écrit :
> On 07.02.21 14:36, Alexandre Derumier wrote:
> > Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> > ---
> >  src/PVE/CGroup.pm | 42 ++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 42 insertions(+)
> > 
> > 
> 
> I now actually applied this patch, but followed up with two commits:
> 
> * unify parsing from host and cgroup pressure stats into a common sub
>   in ProcFSTools
> 
Great, I was planning to do it after this commit apply.

> * return undef for the v1 controller case and the zeroed default $res
>   if no path is found (i.e., vm/ct not running)
> 

it shouldn't return v1 , because of undef in:
my ($path, $ver) = $self->get_path(undef, 1);

(I have done this, because pressure stats are already available in v2
path, even if other cpu,mem,disk accounting stats are still in v1 path)
But no problem, better to have a check if v1 could be return.




> hope that works for you and I made no dumb error anywhere.
> 

Thanks again !




More information about the pve-devel mailing list