From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com,
eddie.dong@intel.com, xen-devel@lists.xen.org,
jun.nakajima@intel.com, suravee.suthikulpanit@amd.com
Subject: Re: [PATCH 2/2] x86/HVM: Use fixed TSC value when saving or restoring domain
Date: Mon, 31 Mar 2014 10:01:20 -0400 [thread overview]
Message-ID: <53397530.8060007@oracle.com> (raw)
In-Reply-To: <533956C50200007800003B02@nat28.tlf.novell.com>
On 03/31/2014 05:51 AM, Jan Beulich wrote:
>
>> --- a/xen/arch/x86/hvm/save.c
>> +++ b/xen/arch/x86/hvm/save.c
>> @@ -24,7 +24,7 @@
>> #include <asm/hvm/support.h>
>> #include <public/hvm/save.h>
>>
>> -void arch_hvm_save(struct domain *d, struct hvm_save_header *hdr)
>> +void arch_hvm_save(struct domain *dom, struct hvm_save_header *hdr)
> The change is unmotivated (afaict) and inconsistent with most other
> code - we conventionally use "d" for struct domain * variables. Please
> drop the change here and use "d" throughout the rest of the patch,
> at once resulting in less churn and hence making it easier to review.
The reason for this change is subsequent
rdtscll(dom->arch.chkpt_tsc);
which will not work as
rdtscll(d->arch.chkpt_tsc);
The alternatives as I see are
* Declare a temporary variable for use with rdtscll
* Change rdtscll's definition to use something else instead of variable
'd'. Say, eax and edx (hopefully this won't clash with something else)
>
>> index 95b4b91..032eb23 100644
>> --- a/xen/include/xen/time.h
>> +++ b/xen/include/xen/time.h
>> @@ -32,7 +32,8 @@ struct vcpu;
>> typedef s64 s_time_t;
>> #define PRI_stime PRId64
>>
>> -s_time_t get_s_time(void);
>> +s_time_t get_s_time_fixed(u64 at_tick);
>> +#define get_s_time() get_s_time_fixed(0)
> get_s_time(), through NOW(), has quite many users, so I'm not certain
> the code bloat resulting from this is desirable. I'd suggest the function
> to remain such; the compiler will be able to make it a mov+jmp.
Sorry, not sure I understand what you are asking for.
There shouldn't be much of code size increase since get_s_time()
currently (and get_s_time_fixed() after this patch is applied) are not
inlines. The only increase is due to routine itself getting very
slightly larger.
But I suspect you meant something else.
-boris
next prev parent reply other threads:[~2014-03-31 14:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-30 3:05 [PATCH 0/2] Time-related fixes for migration Boris Ostrovsky
2014-03-30 3:05 ` [PATCH 1/2] libxl: Set guest parameters from config file during a restore Boris Ostrovsky
2014-04-01 10:37 ` Ian Campbell
2014-04-01 13:45 ` Boris Ostrovsky
2014-03-30 3:05 ` [PATCH 2/2] x86/HVM: Use fixed TSC value when saving or restoring domain Boris Ostrovsky
2014-03-31 9:51 ` Jan Beulich
2014-03-31 14:01 ` Boris Ostrovsky [this message]
2014-03-31 14:08 ` Tian, Kevin
2014-03-31 14:34 ` Jan Beulich
2014-03-31 15:06 ` Boris Ostrovsky
2014-03-31 15:09 ` Jan Beulich
2014-03-31 15:29 ` Tian, Kevin
2014-03-31 14:41 ` [PATCH 0/2] Time-related fixes for migration Tian, Kevin
2014-03-31 15:30 ` Boris Ostrovsky
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=53397530.8060007@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=eddie.dong@intel.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xen.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 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.