From: Jan Kiszka <jan.kiszka@siemens.com>
To: Arthur Chunqi Li <yzt356@gmail.com>
Cc: kvm <kvm@vger.kernel.org>, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: About preemption timer
Date: Tue, 17 Dec 2013 13:43:08 +0100 [thread overview]
Message-ID: <52B046DC.90107@siemens.com> (raw)
In-Reply-To: <CABpY8M+1VuvAwKybqm=7Pwv0c83vRsF-0ZL9HcXNwYcToeRkBg@mail.gmail.com>
On 2013-12-17 12:31, Arthur Chunqi Li wrote:
> Hi Jan,
>
> On Tue, Dec 17, 2013 at 7:21 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> On 2013-12-17 10:32, Arthur Chunqi Li wrote:
>>> Hi Jan and Paolo,
>>>
>>> I've tried to use preemption timer in KVM to trap vcpu regularly, but
>>> there's something unexpected. I run a VM with 4 vcpus and give them
>>> the same preemption timer value (e.g. 1000000) with all bits set
>>> (activate/save bits), then reset the value in preemption time-out
>>> handler.
>>>
>>> Thus I expected these vcpus trap regularly in some special turns. But
>>> I found that when the VM is not busy, some vcpus are trapped much less
>>> frequently than others. In Intel SDM, I noticed that preemption timer
>>> is only related to TSC, and I think all the vcpus should trap in a
>>> similar frequency.
>>>
>>> Could u help me explain this phenomenon?
>>
>> Are you on a CPU that has non-broken preemption timer support? Anything
>> prior Haswell is known to tick with arbitrary frequencies.
>
> My CPU is Intel(R) Xeon(R) CPU E5620 @ 2.40GHz.
Hmm, this one seems unaffected. Didn't find a "specification update".
Just like Paolo asked: Your original test case passes?
>
> Besides, what do you mean by arbitrary frequencies?
On older CPUs, the tick rate of the preemption timer does not correlate
with the TSC, definitely not in the way the spec defined.
Back to your original question: Are we talking about native use of the
preemption timer via a patched KVM or nested use inside a KVM virtual
machine?
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2013-12-17 12:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 9:32 About preemption timer Arthur Chunqi Li
2013-12-17 11:21 ` Jan Kiszka
2013-12-17 11:31 ` Arthur Chunqi Li
2013-12-17 12:43 ` Jan Kiszka [this message]
2013-12-17 12:59 ` Arthur Chunqi Li
2013-12-17 15:17 ` Jan Kiszka
2013-12-18 3:27 ` R
2013-12-18 6:58 ` Jan Kiszka
2013-12-17 11:22 ` Paolo Bonzini
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=52B046DC.90107@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yzt356@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.