- Give ci_want_resched a single cache line, and align. This is for monitor/

mwait. At least one errata sheet from Intel notes that a single line
  should be used.
- Align cc_microtime.
This commit is contained in:
ad 2008-04-24 11:26:52 +00:00
parent f80749c192
commit fff5f20c25
2 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.48 2008/04/23 15:57:38 he Exp $ */
/* $NetBSD: cpu.h,v 1.49 2008/04/24 11:26:52 ad Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -85,11 +85,11 @@ struct cpu_info {
uint8_t ci_coreid;
uint8_t ci_smtid;
struct cpu_data ci_data; /* MI per-cpu data */
struct cc_microtime_state ci_cc;/* cc_microtime state */
/*
* Private members.
*/
struct cc_microtime_state ci_cc __aligned(64);/* cc_microtime state */
struct evcnt ci_tlb_evcnt; /* tlb shootdown counter */
struct pmap *ci_pmap; /* current pmap */
int ci_need_tlbwait; /* need to wait for TLB invalidations */
@ -135,7 +135,6 @@ struct cpu_info {
void (*cpu_setup)(struct cpu_info *);
void (*ci_info)(struct cpu_info *);
int ci_want_resched;
struct trapframe *ci_ddb_regs;
struct x86_cache_info ci_cinfo[CAI_COUNT];
@ -178,6 +177,10 @@ struct cpu_info {
uint64_t ci_suspend_cr3;
uint64_t ci_suspend_cr4;
uint64_t ci_suspend_cr8;
/* The following must be in a single cache line. */
int ci_want_resched __aligned(64);
int ci_padout __aligned(64);
};
#define CPUF_BSP 0x0001 /* CPU is the original BSP */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.166 2008/04/21 15:15:34 cegger Exp $ */
/* $NetBSD: cpu.h,v 1.167 2008/04/24 11:26:52 ad Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -87,7 +87,7 @@ struct cpu_info {
*/
struct cpu_info *ci_next; /* next cpu */
struct lwp *ci_curlwp; /* current owner of the processor */
int ci_want_resched;
int ci_fpused; /* XEN: FPU was used by curlwp */
struct pmap_cpu *ci_pmap_cpu; /* per-CPU pmap data */
struct lwp *ci_fpcurlwp; /* current owner of the FPU */
int ci_fpsaving; /* save in progress */
@ -200,9 +200,10 @@ struct cpu_info {
uint32_t ci_suspend_cr2;
uint32_t ci_suspend_cr3;
uint32_t ci_suspend_cr4;
#ifdef XEN
int ci_fpused; /* FPU was used by curlwp */
#endif
/* The following must be in a single cache line. */
int ci_want_resched __aligned(64);
int ci_padout __aligned(64);
};
/*