Re: [PATCH v8 10/11] virt/steal_governor: Implement steal_governor policy loop

Shrikanth Hegde <[email protected]> Wed, 22 Jul 2026 15:57:44 +0530
Newsgroups dev.linux.lists.virtualization,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

On 7/22/26 1:09 PM, Yury Norov wrote:
> On Wed, Jul 22, 2026 at 12:44:03PM +0530, Shrikanth Hegde wrote:
>> Hi Yury.
> 
> ...
> 
>>>> +	schedule_delayed_work(&sg_core_ctx.work,
>>>> +			      msecs_to_jiffies(sg_core_ctx.interval_ms));
>>>
>>> If you need jiffies, why don't you have them in the structure, instead of
>>> milliseconds?
>>>
>>> 	schedule_delayed_work(&sg_core_ctx.work, sg_core_ctx.delay);
>>>
>>
>> I would prefer milliseconds as jiffies is very difficult for users to understand.
>> It depends on HZ value and one has to query from configs.
>>
>> HZ can very from 100 to 1000 today. Again I will have to play tricks to schedule
>> the governor at fixed intervals.
>>
>> So i think it is better to use milliseconds here.
>> Correct me if i am not making sense.
> 
> 
> User provides milliseconds, then in init() you convert them into
> jiffies and save in sg.delay. That's it.

Ah ok. That's simpler. Will add a delay filed to the struct.