Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Claudio Fontana
On 5/22/20 1:18 PM, Alex Bennée wrote:
> 
> Claudio Fontana  writes:
> 
>> On 5/22/20 12:26 PM, Alex Bennée wrote:
>>>
>>> Claudio Fontana  writes:
>>>
 On 5/22/20 8:07 AM, Thomas Huth wrote:
>> From: "Claudio Fontana" 
>> Sent: Thursday, May 21, 2020 8:54:05 PM
>>
>> this is a first step in the refactoring of cpus.c.
>
> Could you maybe extend the commit message in the next version a little 
> bit? ... say something about *what* you are moving to a separate file 
> (and maybe why it is ok to move it), etc.?
>
>  Thanks,
>   Thomas
>
>

 Hello Thomas,

 thanks for taking a look, I will add an explanatory message.

 I was thinking something along the lines of:

 "
 move the vcpu throttling functionality into its own module.
 It contains the controls to adjust and inspect vcpu throttling settings, 
 start (set) and stop
 vcpu throttling, and the throttling function itself that is run 
 periodically on vcpus
 to make them take a nap.
 Execution of the throttling function on all vcpus is triggered by a timer,
 registered at module initialization.

 No functionality change.
 "
>>>
>>> Is vcpu throttling a TCG only feature?
>>>
>>
>> No, are you suggesting we only refactor code out of cpus.c based on
>> whether it's tcg or not?
> 
> No - but  we should make it clear in the commit message that it is used
> by both. I must admit I thought it was only a TCG feature which just
> goes to show what I know ;-)
> 

Ah, you are right thanks; I could mention its users,
currently migration convergence and on MacOS the cocoa UI.

Ciao,

Claudio 



Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Alex Bennée


Claudio Fontana  writes:

> On 5/22/20 12:26 PM, Alex Bennée wrote:
>> 
>> Claudio Fontana  writes:
>> 
>>> On 5/22/20 8:07 AM, Thomas Huth wrote:
> From: "Claudio Fontana" 
> Sent: Thursday, May 21, 2020 8:54:05 PM
>
> this is a first step in the refactoring of cpus.c.

 Could you maybe extend the commit message in the next version a little 
 bit? ... say something about *what* you are moving to a separate file (and 
 maybe why it is ok to move it), etc.?

  Thanks,
   Thomas


>>>
>>> Hello Thomas,
>>>
>>> thanks for taking a look, I will add an explanatory message.
>>>
>>> I was thinking something along the lines of:
>>>
>>> "
>>> move the vcpu throttling functionality into its own module.
>>> It contains the controls to adjust and inspect vcpu throttling settings, 
>>> start (set) and stop
>>> vcpu throttling, and the throttling function itself that is run 
>>> periodically on vcpus
>>> to make them take a nap.
>>> Execution of the throttling function on all vcpus is triggered by a timer,
>>> registered at module initialization.
>>>
>>> No functionality change.
>>> "
>> 
>> Is vcpu throttling a TCG only feature?
>> 
>
> No, are you suggesting we only refactor code out of cpus.c based on
> whether it's tcg or not?

No - but  we should make it clear in the commit message that it is used
by both. I must admit I thought it was only a TCG feature which just
goes to show what I know ;-)

>
> Ciao,
>
> Claudio


-- 
Alex Bennée



Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Claudio Fontana
On 5/22/20 12:26 PM, Alex Bennée wrote:
> 
> Claudio Fontana  writes:
> 
>> On 5/22/20 8:07 AM, Thomas Huth wrote:
 From: "Claudio Fontana" 
 Sent: Thursday, May 21, 2020 8:54:05 PM

 this is a first step in the refactoring of cpus.c.
>>>
>>> Could you maybe extend the commit message in the next version a little bit? 
>>> ... say something about *what* you are moving to a separate file (and maybe 
>>> why it is ok to move it), etc.?
>>>
>>>  Thanks,
>>>   Thomas
>>>
>>>
>>
>> Hello Thomas,
>>
>> thanks for taking a look, I will add an explanatory message.
>>
>> I was thinking something along the lines of:
>>
>> "
>> move the vcpu throttling functionality into its own module.
>> It contains the controls to adjust and inspect vcpu throttling settings, 
>> start (set) and stop
>> vcpu throttling, and the throttling function itself that is run periodically 
>> on vcpus
>> to make them take a nap.
>> Execution of the throttling function on all vcpus is triggered by a timer,
>> registered at module initialization.
>>
>> No functionality change.
>> "
> 
> Is vcpu throttling a TCG only feature?
> 

No, are you suggesting we only refactor code out of cpus.c based on whether 
it's tcg or not?

Ciao,

Claudio



Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Alex Bennée


Claudio Fontana  writes:

> On 5/22/20 8:07 AM, Thomas Huth wrote:
>>> From: "Claudio Fontana" 
>>> Sent: Thursday, May 21, 2020 8:54:05 PM
>>>
>>> this is a first step in the refactoring of cpus.c.
>> 
>> Could you maybe extend the commit message in the next version a little bit? 
>> ... say something about *what* you are moving to a separate file (and maybe 
>> why it is ok to move it), etc.?
>> 
>>  Thanks,
>>   Thomas
>> 
>> 
>
> Hello Thomas,
>
> thanks for taking a look, I will add an explanatory message.
>
> I was thinking something along the lines of:
>
> "
> move the vcpu throttling functionality into its own module.
> It contains the controls to adjust and inspect vcpu throttling settings, 
> start (set) and stop
> vcpu throttling, and the throttling function itself that is run periodically 
> on vcpus
> to make them take a nap.
> Execution of the throttling function on all vcpus is triggered by a timer,
> registered at module initialization.
>
> No functionality change.
> "

Is vcpu throttling a TCG only feature?

-- 
Alex Bennée



Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-22 Thread Claudio Fontana
On 5/22/20 8:07 AM, Thomas Huth wrote:
>> From: "Claudio Fontana" 
>> Sent: Thursday, May 21, 2020 8:54:05 PM
>>
>> this is a first step in the refactoring of cpus.c.
> 
> Could you maybe extend the commit message in the next version a little bit? 
> ... say something about *what* you are moving to a separate file (and maybe 
> why it is ok to move it), etc.?
> 
>  Thanks,
>   Thomas
> 
> 

Hello Thomas,

thanks for taking a look, I will add an explanatory message.

I was thinking something along the lines of:

"
move the vcpu throttling functionality into its own module.
It contains the controls to adjust and inspect vcpu throttling settings, start 
(set) and stop
vcpu throttling, and the throttling function itself that is run periodically on 
vcpus
to make them take a nap.
Execution of the throttling function on all vcpus is triggered by a timer,
registered at module initialization.

No functionality change.
"

Thanks,

Claudio








Re: [RFC 1/3] cpu-throttle: new module, extracted from cpus.c

2020-05-21 Thread Thomas Huth
> From: "Claudio Fontana" 
> Sent: Thursday, May 21, 2020 8:54:05 PM
> 
> this is a first step in the refactoring of cpus.c.

Could you maybe extend the commit message in the next version a little bit? ... 
say something about *what* you are moving to a separate file (and maybe why it 
is ok to move it), etc.?

 Thanks,
  Thomas