Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-13 Thread Peter Xu
On Fri, Jan 14, 2022 at 09:30:39AM +0800, Hyman Huang wrote: > > > 在 2022/1/14 0:22, Markus Armbruster 写道: > > Peter Xu writes: > > > > > On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: > > > > > > +struct { > > > > > > +DirtyLimitState *states; > > > > > > +int max_cpus; >

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-13 Thread Hyman Huang
在 2022/1/14 0:22, Markus Armbruster 写道: Peter Xu writes: On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: +struct { +DirtyLimitState *states; +int max_cpus; +unsigned long *bmap; /* running thread bitmap */ +unsigned long nr; +QemuThread thread; +} *dirtylim

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-13 Thread Markus Armbruster
Peter Xu writes: > On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: >> > > +struct { >> > > +DirtyLimitState *states; >> > > +int max_cpus; >> > > +unsigned long *bmap; /* running thread bitmap */ >> > > +unsigned long nr; >> > > +QemuThread thread; >> > > +} *dirt

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-03 Thread Hyman Huang
在 2022/1/4 10:32, Peter Xu 写道: On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: +struct { +DirtyLimitState *states; +int max_cpus; +unsigned long *bmap; /* running thread bitmap */ +unsigned long nr; +QemuThread thread; +} *dirtylimit_state; + +static bool dirt

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-03 Thread Peter Xu
On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: > > > +struct { > > > +DirtyLimitState *states; > > > +int max_cpus; > > > +unsigned long *bmap; /* running thread bitmap */ > > > +unsigned long nr; > > > +QemuThread thread; > > > +} *dirtylimit_state; > > > + > > >

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2021-12-30 Thread Hyman Huang
在 2021/12/24 13:12, Peter Xu 写道: On Tue, Dec 14, 2021 at 07:07:33PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throt

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2021-12-23 Thread Peter Xu
On Tue, Dec 14, 2021 at 07:07:33PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Setup a negative feedback system when vCPU thread > handling KVM_EXIT_DIRTY_RING_FULL exit by introducing > throttle_us_per_full field in struct CPUState. Sleep > throttle_us_per_full microsecond

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2021-12-15 Thread Hyman Huang
在 2021/12/15 15:15, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2021-12-14 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Setup a negative feedback system when vCPU thread > handling KVM_EXIT_DIRTY_RING_FULL exit by introducing > throttle_us_per_full field in struct CPUState. Sleep > throttle_us_per_full microseconds to throttle vCPU > if dirtylimit is ena

[PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2021-12-14 Thread huangy81
From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to throttle vCPU if dirtylimit is enabled. Start a thread to track current dirty pa