Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Hyman
在 2021/12/7 10:57, Peter Xu 写道: On Mon, Dec 06, 2021 at 11:19:21PM +0800, Hyman wrote: +if (has_cpu_index) { +info = dirtylimit_query_vcpu(cpu_index); +QAPI_LIST_APPEND(tail, info); +} else { +CPUState *cpu; +CPU_FOREACH(cpu) { +if

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Hyman
在 2021/12/7 10:24, Peter Xu 写道: On Mon, Dec 06, 2021 at 10:56:00PM +0800, Hyman wrote: I found that it'll be challenging for any human being to identify "whether he/she has turned throttle off for all vcpus".. I think that could be useful when we finally decided to cancel current migration.

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Peter Xu
On Mon, Dec 06, 2021 at 11:19:21PM +0800, Hyman wrote: > > > +if (has_cpu_index) { > > > +info = dirtylimit_query_vcpu(cpu_index); > > > +QAPI_LIST_APPEND(tail, info); > > > +} else { > > > +CPUState *cpu; > > > +CPU_FOREACH(cpu) { > > > +if

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Peter Xu
On Mon, Dec 06, 2021 at 10:56:00PM +0800, Hyman wrote: > > I found that it'll be challenging for any human being to identify "whether > > he/she has turned throttle off for all vcpus".. I think that could be > > useful > > when we finally decided to cancel current migration. > That's question,

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Hyman
在 2021/12/6 16:39, Peter Xu 写道: On Fri, Dec 03, 2021 at 09:39:47AM +0800, huang...@chinatelecom.cn wrote: +void dirtylimit_setup(int max_cpus) +{ +if (!kvm_enabled() || !kvm_dirty_ring_enabled()) { +return; +} + +dirtylimit_calc_state_init(max_cpus); +

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Hyman
在 2021/12/6 16:36, Peter Xu 写道: On Fri, Dec 03, 2021 at 09:39:47AM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it reachs the quota dirty page rate given by user. Introduce qmp

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Hyman
在 2021/12/6 16:28, Peter Xu 写道: On Sat, Dec 04, 2021 at 08:00:19PM +0800, Hyman Huang wrote: 在 2021/12/3 20:34, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Peter Xu
On Fri, Dec 03, 2021 at 09:39:47AM +0800, huang...@chinatelecom.cn wrote: > +void dirtylimit_setup(int max_cpus) > +{ > +if (!kvm_enabled() || !kvm_dirty_ring_enabled()) { > +return; > +} > + > +dirtylimit_calc_state_init(max_cpus); > +dirtylimit_state_init(max_cpus); > +}

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Peter Xu
On Fri, Dec 03, 2021 at 09:39:47AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Implement dirtyrate calculation periodically basing on > dirty-ring and throttle vCPU until it reachs the quota > dirty page rate given by user. > > Introduce qmp commands "vcpu-dirty-limit",

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Peter Xu
On Sat, Dec 04, 2021 at 08:00:19PM +0800, Hyman Huang wrote: > > > 在 2021/12/3 20:34, Markus Armbruster 写道: > > huang...@chinatelecom.cn writes: > > > > > From: Hyman Huang(黄勇) > > > > > > Implement dirtyrate calculation periodically basing on > > > dirty-ring and throttle vCPU until it

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-04 Thread Hyman Huang
在 2021/12/3 20:34, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "vcpu-dirty-limit",

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-03 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Implement dirtyrate calculation periodically basing on > dirty-ring and throttle vCPU until it reachs the quota > dirty page rate given by user. > > Introduce qmp commands "vcpu-dirty-limit", "query-vcpu-dirty-limit" > to enable,

[PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-02 Thread huangy81
From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "vcpu-dirty-limit", "query-vcpu-dirty-limit" to enable, disable, query dirty page limit for virtual CPU.