From: Avi Kivity <avi@redhat.com>
To: dlaor@redhat.com
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
"Yang, Sheng" <sheng.yang@intel.com>,
Alexander Graf <agraf@suse.de>,
"David S. Ahern" <daahern@cisco.com>,
kvm-devel <kvm@vger.kernel.org>,
Glauber de Oliveira Costa <gcosta@redhat.com>,
Gleb Natapov <gleb@redhat.com>
Subject: Re: gettimeofday "slow" in RHEL4 guests
Date: Mon, 29 Dec 2008 18:27:46 +0200 [thread overview]
Message-ID: <4958FA82.4040601@redhat.com> (raw)
In-Reply-To: <4958F6E7.9020309@redhat.com>
Dor Laor wrote:
>>>
>>> + if (atomic_read(&pt->pending) > 1)
>>> + atomic_set(&pt->pending, 1);
>>> +
>>>
>>
>> Replace the atomic_inc() with atomic_set(, 1) instead? One less test,
>> and more important, the logic is scattered less around the source.
> But having only a pending bit instead of a counter will cause kvm to
> drop pit irqs on rare high load situations.
> The disable reinjection option is better.
Both variants disable reinjection. Forcing a counter to 1 every time it
exceeds 1 is equivalent to maintaining a bit.
In both variants, there is a missing 'if (disable_reinjection)' (Marcelo
mentioned this in the original message).
> Except for these 'tsc compensate' guest, what are the occasions where
> the guest writes his tsc?
> If this is the only case we can disable reinjection once we trap tsc
> writes.
I don't think these guests write to the tsc. Rather, they read the tsc
and the pit counters and try to correlate. And fail.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2008-12-29 16:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-24 17:47 gettimeofday "slow" in RHEL4 guests David S. Ahern
2008-11-25 4:41 ` David S. Ahern
2008-11-25 10:14 ` Andi Kleen
2008-11-25 11:17 ` Alexander Graf
2008-11-25 11:48 ` Andi Kleen
2008-11-25 12:13 ` Alexander Graf
2008-11-25 12:52 ` Andi Kleen
2008-12-28 18:38 ` Marcelo Tosatti
2008-12-29 12:37 ` Yang, Sheng
2008-12-29 13:11 ` Avi Kivity
2008-12-29 16:12 ` Dor Laor
2008-12-29 16:27 ` Avi Kivity [this message]
2008-12-29 16:29 ` Avi Kivity
2008-11-25 17:20 ` Hollis Blanchard
2008-11-25 19:09 ` David S. Ahern
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=4958FA82.4040601@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=daahern@cisco.com \
--cc=dlaor@redhat.com \
--cc=gcosta@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=sheng.yang@intel.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.