public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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	wheninactive
Date: Mon, 10 Sep 2007 10:27:28 +0300	[thread overview]
Message-ID: <46E4F1E0.8090805@qumranet.com> (raw)
In-Reply-To: <37E52D09333DE2469A03574C88DBF40FA9C21D-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3207 bytes --]

He, Qing wrote:
> resended, due to wrong attachment
>
>   

Patch looks good, but needs a changelog comment and a signoff.
>> -----Original Message-----
>> From: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>> [mailto:kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of He, Qing
>> Sent: 2007年9月10日 13:59
>> To: Avi Kivity
>> Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>> Subject: Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration wheninactive
>>
>> Avi,
>> 	This is the updated patch, which avoids inactive hrtimers from unintended
>> migrations.
>>
>> save/restore timer logic is not included because it does not call hrtimer_cancel
>> (hrtimer_active is different). It has relatively small impact, for it only affects save/restore
>> at maybe guest BIOS time, maybe we can defer it to some later time
>>
>>     
>>> -----Original Message-----
>>> From: Avi Kivity [mailto:avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org]
>>> Sent: 2007年9月9日 15:39
>>> To: He, Qing
>>> Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>>> Subject: Re: [kvm-devel] [PATCH 2/3] KVM: fix apic timer save/migration when inactive
>>>
>>> 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
>>>       
>>> ------------------------------------------------------------------------
>>>
>>> -------------------------------------------------------------------------
>>> 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/
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> kvm-devel mailing list
>>> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>>> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>>>       


-- 
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

  parent reply	other threads:[~2007-09-10  7:27 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
     [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 [this message]
     [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=46E4F1E0.8090805@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