From: Marek Marczykowski <marmarek@mimuw.edu.pl>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: xen-devel@lists.xensource.com,
Rafal Wojtczuk <rafal@invisiblethingslab.com>,
Joanna Rutkowska <joanna@invisiblethingslab.com>,
Konrad Wilk <konrad.wilk@oracle.com>
Subject: Re: xen-4.1: PV domain hanging at startup, jiffies stopped
Date: Wed, 31 Aug 2011 22:49:45 +0200 [thread overview]
Message-ID: <4E5E9E69.7000600@mimuw.edu.pl> (raw)
In-Reply-To: <1d3855c2-56be-4ea7-8e14-52157afd69ff@default>
[-- Attachment #1.1: Type: text/plain, Size: 1954 bytes --]
On 31.08.2011 22:00, Dan Magenheimer wrote:
>>> I've tried also xenpm set-max-cstate 0 and tsc_mode=1 in domU config,
>>> but it doesn't help. Also pinning vcpu doesn't help (this domUs have
>>> only 1 vcpu). Is 'xenpm set-max-cstate 0' the same as booting xen with
>>> max_cstate=0?
>>
>> Looks like tsc_mode=2 solves the problem.
>
> It's unlikely that it SOLVES the problem, but only changes
> timings so that it effectively works around whatever the real
> problem is.
Some additional information I've found during debugging this problem:
clockevent_program_event returns -ETIME:
------------ kernel/time/clockevents.c:
/**
* clockevents_program_event - Reprogram the clock event device.
* @expires: absolute expiry time (monotonic clock)
*
* Returns 0 on success, -ETIME when the event is in the past.
*/
int clockevents_program_event(struct clock_event_device *dev, ktime_t
expires,
ktime_t now)
-------------
xen_vcpuop_set_next_event schedules event by getting current time
(xen_clocksource_read()) (*1) adding delta (expires-now) and programming
event with VCPUOP_set_singleshot_timer hypercall. Then xen gets current
time (*2) and in some rare cases this time is after expected timer
expiration... Even after VCPUOP_set_singleshot_timer hypercal,
xen_clocksource_read() reports time slightly in the past comparing to
xen time (reported by NOW() macro).
I think this is because "current" time is calculated different way in *1
and *2. The *1 way is controlled by tsc_mode, which is described here:
http://lxr.xensource.com/lxr/source/docs/misc/tscmode.txt. Default
tsc_mode=0 is "smart" and I think because of that can be slightly before
NOW() time. tsc_mode=2 looks almost the same as NOW() macro works.
Is this reasoning correct?
--
Pozdrawiam / Best Regards,
Marek Marczykowski | RLU #390519
marmarek at mimuw edu pl | xmpp:marmarek at staszic waw pl
[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5842 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-08-31 20:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-28 13:13 xen-4.1: PV domain hanging at startup, jiffies stopped Marek Marczykowski
2011-08-29 20:07 ` Konrad Rzeszutek Wilk
2011-08-29 20:21 ` Marek Marczykowski
2011-08-29 20:59 ` Konrad Rzeszutek Wilk
2011-08-29 21:28 ` Pasi Kärkkäinen
2011-08-30 17:18 ` Marek Marczykowski
2011-08-31 16:27 ` Marek Marczykowski
2011-08-31 20:00 ` Dan Magenheimer
2011-08-31 20:49 ` Marek Marczykowski [this message]
2011-08-31 21:01 ` Keir Fraser
2011-08-31 21:13 ` Marek Marczykowski
2011-08-31 22:07 ` Keir Fraser
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=4E5E9E69.7000600@mimuw.edu.pl \
--to=marmarek@mimuw.edu.pl \
--cc=dan.magenheimer@oracle.com \
--cc=joanna@invisiblethingslab.com \
--cc=konrad.wilk@oracle.com \
--cc=rafal@invisiblethingslab.com \
--cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).