Re: [PATCH v9 2/3] cpu-throttle: implement vCPU throttle

2021-12-08 Thread Hyman
在 2021/12/8 23:36, Hyman 写道: 在 2021/12/6 18:10, Peter Xu 写道: On Fri, Dec 03, 2021 at 09:39:46AM +0800, huang...@chinatelecom.cn wrote: +static uint64_t dirtylimit_pct(unsigned int last_pct, +   uint64_t quota, +   uint64_t current) +{

Re: [PATCH v9 2/3] cpu-throttle: implement vCPU throttle

2021-12-08 Thread Hyman
在 2021/12/6 18:10, Peter Xu 写道: On Fri, Dec 03, 2021 at 09:39:46AM +0800, huang...@chinatelecom.cn wrote: +static uint64_t dirtylimit_pct(unsigned int last_pct, + uint64_t quota, + uint64_t current) +{ +uint64_t limit_pct = 0; +

Re: [PATCH v9 2/3] cpu-throttle: implement vCPU throttle

2021-12-06 Thread Peter Xu
On Fri, Dec 03, 2021 at 09:39:46AM +0800, huang...@chinatelecom.cn wrote: > +static uint64_t dirtylimit_pct(unsigned int last_pct, > + uint64_t quota, > + uint64_t current) > +{ > +uint64_t limit_pct = 0; > +RestrainPolicy policy;

[PATCH v9 2/3] cpu-throttle: implement vCPU throttle

2021-12-02 Thread huangy81
From: Hyman Huang(黄勇) Impose dirty restraint on vCPU by kicking it and sleep as the auto-converge does during migration, but just kick the specified vCPU instead, not all vCPUs of vm. Start a thread to track the dirtylimit status and adjust the throttle pencentage dynamically depend on current a