Refactor sync_lazy_execstate_cpu() into the more sensible

sync_vcpu_execstate().

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-08-26 17:57:09 +00:00
1 parent edf2226577
commit fc6151d0e9
4 files changed
+13 -9

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ platform_is_hp_ski(void)
/* calls in xen/common code that are unused on ia64 */
void sync_lazy_execstate_cpu(unsigned int cpu) {}
void sync_vcpu_execstate(struct vcpu *v) {}
#ifdef CONFIG_VTI
int grant_table_create(struct domain *d) { return 0; }
+6 -1
View File
@@ -885,8 +885,13 @@ int __sync_lazy_execstate(void)
return switch_required;
}
void sync_lazy_execstate_cpu(unsigned int cpu)
void sync_vcpu_execstate(struct vcpu *v)
{
unsigned int cpu = v->processor;
if ( !cpu_isset(cpu, v->domain->cpumask) )
return;
if ( cpu == smp_processor_id() )
{
(void)__sync_lazy_execstate();
+1 -3
View File
@@ -218,9 +218,7 @@ void vcpu_sleep_sync(struct vcpu *v)
&& spin_is_locked(&schedule_data[v->processor].schedule_lock) )
cpu_relax();
/* Counteract lazy context switching. */
if ( cpu_isset(v->processor, v->domain->cpumask) )
sync_lazy_execstate_cpu(v->processor);
sync_vcpu_execstate(v);
}
void vcpu_wake(struct vcpu *v)
+5 -4
View File
@@ -250,10 +250,11 @@ void vcpu_sleep_nosync(struct vcpu *d);
void vcpu_sleep_sync(struct vcpu *d);
/*
* Force loading of currently-executing domain state on the specified CPU.
* This is used to counteract lazy state switching where required.
* Force synchronisation of given VCPU's state. If it is currently descheduled,
* this call will ensure that all its state is committed to memory and that
* no CPU is using critical state (e.g., page tables) belonging to the VCPU.
*/
extern void sync_lazy_execstate_cpu(unsigned int cpu);
extern void sync_vcpu_execstate(struct vcpu *v);
/*
* Called by the scheduler to switch to another VCPU. On entry, although
@@ -265,7 +266,7 @@ extern void sync_lazy_execstate_cpu(unsigned int cpu);
* The callee must ensure that the local CPU is no longer running in @prev's
* context, and that the context is saved to memory, before returning.
* Alternatively, if implementing lazy context switching, it suffices to ensure
* that invoking sync_lazy_execstate() will switch and commit @prev's state.
* that invoking sync_vcpu_execstate() will switch and commit @prev's state.
*/
extern void context_switch(
struct vcpu *prev,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.