[XEN] Make multicall info explicitly PER_CPU.

Also remove cacheline alignment in a few places. We leave
the common timer and schedule_data structures aligned because
they may be accessed randomly by remoted CPUs: at least we can
contain cacheline bouncing to just the offending structures.
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-08-08 14:48:43 +01:00
1 parent 1ac7758ecb
commit 8eafa79a73
5 files changed
+8 -7

No files matched your search

+1 -1
View File
@@ -335,7 +335,7 @@ ia64_hypercall (struct pt_regs *regs)
unsigned long hypercall_create_continuation(
unsigned int op, const char *format, ...)
{
struct mc_state *mcs = &mc_state[smp_processor_id()];
struct mc_state *mcs = &this_cpu(mc_state);
struct vcpu *v = current;
const char *p = format;
unsigned long arg;
+1 -1
View File
@@ -797,7 +797,7 @@ void sync_vcpu_execstate(struct vcpu *v)
unsigned long hypercall_create_continuation(
unsigned int op, const char *format, ...)
{
struct mc_state *mcs = &mc_state[smp_processor_id()];
struct mc_state *mcs = &this_cpu(mc_state);
struct cpu_user_regs *regs;
const char *p = format;
unsigned long arg;
+1 -1
View File
@@ -56,7 +56,7 @@ struct cpu_time {
s_time_t stime_master_stamp;
struct time_scale tsc_scale;
struct timer calibration_timer;
} __cacheline_aligned;
};
static DEFINE_PER_CPU(struct cpu_time, cpu_time);
+2 -2
View File
@@ -14,13 +14,13 @@
#include <asm/current.h>
#include <asm/hardirq.h>
struct mc_state mc_state[NR_CPUS];
DEFINE_PER_CPU(struct mc_state, mc_state);
long
do_multicall(
XEN_GUEST_HANDLE(multicall_entry_t) call_list, unsigned int nr_calls)
{
struct mc_state *mcs = &mc_state[smp_processor_id()];
struct mc_state *mcs = &this_cpu(mc_state);
unsigned int i;
if ( unlikely(__test_and_set_bit(_MCSF_in_multicall, &mcs->flags)) )
+3 -2
View File
@@ -5,6 +5,7 @@
#ifndef __XEN_MULTICALL_H__
#define __XEN_MULTICALL_H__
#include <xen/percpu.h>
#include <asm/multicall.h>
#define _MCSF_in_multicall 0
@@ -14,8 +15,8 @@
struct mc_state {
unsigned long flags;
struct multicall_entry call;
} __cacheline_aligned;
};
extern struct mc_state mc_state[NR_CPUS];
DECLARE_PER_CPU(struct mc_state, mc_state);
#endif /* __XEN_MULTICALL_H__ */
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.