From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "He, Qing" <qing.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 2/3] KVM: fix apic timer save/migration when inactive
Date: Sun, 09 Sep 2007 10:39:10 +0300 [thread overview]
Message-ID: <46E3A31E.7060107@qumranet.com> (raw)
In-Reply-To: <37E52D09333DE2469A03574C88DBF40FA9C20B-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]
He, Qing wrote:
>
>>>> + if (atomic_read(&apic->timer.active))
>>>>
>>>>
>>> Or here?
>>>
>>>
>>>> + hrtimer_start(timer, timer->expires,
>>>> + HRTIMER_MODE_ABS);
>>>> }
>>>> EXPORT_SYMBOL_GPL(kvm_migrate_apic_timer);
>>>>
>>>>
>>>>
>> I think you could use the return value of hrtimer_cancel() here:
>>
>> if (hrtimer_cancel(...))
>> hrtimer_start(...);
>>
>
> Thanks for commenting, previously I have thought of something like:
> if (hrtimer_active(...)) {
> hrtimer_cancel(...);
> hrtimer_start(...);
> }
>
> But it is not able to handle pending state this way. Seems the return value of hrtimer_cancel is fine. Another question is, when the hrtimer function returns HRTIMER_NORESTART, does the state finally turn to HRTIMER_STATE_INACTIVE?
>
>From my reading of the hrtimer code, yes. But I would view any code
which depends on the state with suspicion.
--
error compiling committee.c: too many arguments to function
[-- Attachment #2: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- Attachment #3: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
next prev parent reply other threads:[~2007-09-09 7:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 8:38 [PATCH 2/3] KVM: fix apic timer save/migration when inactive He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C208-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-09-06 9:15 ` Avi Kivity
[not found] ` <46DFC523.7090806-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-06 9:47 ` Avi Kivity
[not found] ` <46DFCCAE.3040507-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-07 3:26 ` He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C20B-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-09-09 7:39 ` Avi Kivity [this message]
[not found] ` <46E3A31E.7060107-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-10 5:58 ` He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C21C-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-09-10 6:01 ` [PATCH 2/3] KVM: fix apic timer save/migration wheninactive He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40FA9C21D-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-09-10 7:27 ` Avi Kivity
[not found] ` <46E4F1E0.8090805-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-10 7:50 ` He, Qing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46E3A31E.7060107@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=qing.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox