On 12/11/18 15:31, Mirela Simonovic wrote:
> Hi Jan,
>
> On Mon, Nov 12, 2018 at 4:23 PM Jan Beulich <jbeul...@suse.com> wrote:
>>>>> On 12.11.18 at 16:17, <mirela.simono...@aggios.com> wrote:
>>> Hi Jan,
>>>
>>> On Mon, Nov 12, 2018 at 12:47 PM Jan Beulich <jbeul...@suse.com> wrote:
>>>>>>> On 12.11.18 at 12:30, <mirela.simono...@aggios.com> wrote:
>>>>> --- a/xen/include/xen/timer.h
>>>>> +++ b/xen/include/xen/timer.h
>>>>> @@ -18,6 +18,9 @@ struct timer {
>>>>>      /* System time expiry value (nanoseconds since boot). */
>>>>>      s_time_t expires;
>>>>>
>>>>> +    /* Suspend timestamp value (nanoseconds since boot). */
>>>>> +    s_time_t suspended;
>>>> I can't see how this becomes a universally useful field, so I
>>>> don't think it belongs here. For your purpose deriving a new
>>>> structure containing struct timer and this one field should
>>>> work.
>>> Each 'expires' value needs to be coupled with 'suspended' value to be
>>> able to deal with watchdogs when suspending a domain. This is specific
>>> to a watchdog.
>>> If we add a derived structure to contain this field we still need to
>>> associate such a structure with each watchdog of a domain, which is
>>> also domain generic info and requires a lot more (in my opinion
>>> unnecessary) changes. Please let me know if I misinterpreted your
>>> proposal.
>> You add the field to all timer instances, yet you need it only for
>> very few. Why not have a struct watchdog_timer, and use it
>> for struct domain's watchdog_timer[]? I'm afraid I don't see the
>> difficulties you appear to see.
>>
> Thanks, now it's clear. We need to change the type for watchdog_timer
> to be the derived structure of timer that additionally contains
> 'suspended' variable. That makes sense, we'll do so.

Why do you need a suspended variable?  Stash the frequency the guest
requested on the last hypercall, and fully kill/re-create the timer on
suspend/resume.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to