Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
7a560836
提交
7a560836
6月 02, 2011
创建
作者:
Nickolai Zeldovich
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
no false sharing
上级
d99255d2
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
26 行增加
和
24 行删除
+26
-24
file.c
file.c
+2
-2
fs.c
fs.c
+1
-1
kalloc.c
kalloc.c
+1
-1
kbd.c
kbd.c
+2
-1
lapic.c
lapic.c
+2
-1
mp.c
mp.c
+4
-4
proc.c
proc.c
+3
-3
rcu.c
rcu.c
+7
-7
trap.c
trap.c
+3
-3
vm.c
vm.c
+1
-1
没有找到文件。
file.c
浏览文件 @
7a560836
...
...
@@ -7,11 +7,11 @@
#include "file.h"
#include "stat.h"
struct
devsw
devsw
[
NDEV
];
struct
devsw
__attribute__
((
aligned
(
CACHELINE
)))
devsw
[
NDEV
];
struct
{
struct
spinlock
lock
;
struct
file
file
[
NFILE
];
}
ftable
;
}
__attribute__
((
aligned
(
CACHELINE
)))
ftable
;
void
fileinit
(
void
)
...
...
fs.c
浏览文件 @
7a560836
...
...
@@ -134,7 +134,7 @@ bfree(int dev, uint b)
struct
{
struct
spinlock
lock
;
struct
inode
inode
[
NINODE
];
}
icache
;
}
__attribute__
((
aligned
(
CACHELINE
)))
icache
;
void
iinit
(
void
)
...
...
kalloc.c
浏览文件 @
7a560836
...
...
@@ -18,7 +18,7 @@ void kminit(void);
struct
kmem
kmems
[
NCPU
];
extern
char
end
[];
// first address after kernel loaded from ELF file
static
int
kinited
;
static
int
kinited
__attribute__
((
aligned
(
CACHELINE
)))
;
static
void
__attribute__
((
unused
))
kmemprint
(
void
)
...
...
kbd.c
浏览文件 @
7a560836
...
...
@@ -2,11 +2,12 @@
#include "x86.h"
#include "defs.h"
#include "kbd.h"
#include "param.h"
int
kbdgetc
(
void
)
{
static
uint
shift
;
static
uint
shift
__attribute__
((
aligned
(
CACHELINE
)))
;
static
uchar
*
charcode
[
4
]
=
{
normalmap
,
shiftmap
,
ctlmap
,
ctlmap
};
...
...
lapic.c
浏览文件 @
7a560836
...
...
@@ -6,6 +6,7 @@
#include "traps.h"
#include "mmu.h"
#include "x86.h"
#include "param.h"
// Local APIC registers, divided by 4 for use as uint[] indices.
#define ID (0x0020/4) // ID
...
...
@@ -125,7 +126,7 @@ cpunum(void)
// almost everything, including cprintf and panic, calls cpu,
// often indirectly through acquire and release.
if
(
readeflags
()
&
FL_IF
){
static
int
n
;
static
int
n
__attribute__
((
aligned
(
CACHELINE
)))
;
if
(
n
++
==
0
)
cprintf
(
"cpu called from %x with interrupts enabled
\n
"
,
__builtin_return_address
(
0
));
...
...
mp.c
浏览文件 @
7a560836
...
...
@@ -14,10 +14,10 @@
#include "proc.h"
struct
cpu
cpus
[
NCPU
];
static
struct
cpu
*
bcpu
;
int
ismp
;
int
ncpu
;
uchar
ioapicid
;
static
struct
cpu
*
bcpu
__attribute__
((
aligned
(
CACHELINE
)))
;
int
ismp
__attribute__
((
aligned
(
CACHELINE
)))
;
int
ncpu
__attribute__
((
aligned
(
CACHELINE
)))
;
uchar
ioapicid
__attribute__
((
aligned
(
CACHELINE
)))
;
int
mpbcpu
(
void
)
...
...
proc.c
浏览文件 @
7a560836
...
...
@@ -10,9 +10,9 @@
#include "xv6-mtrace.h"
struct
runq
runqs
[
NCPU
];
int
idle
[
NCPU
];
struct
ns
*
nspid
;
static
struct
proc
*
initproc
;
int
__attribute__
((
aligned
(
CACHELINE
)))
idle
[
NCPU
];
struct
ns
*
nspid
__attribute__
((
aligned
(
CACHELINE
)))
;
static
struct
proc
*
initproc
__attribute__
((
aligned
(
CACHELINE
)))
;
extern
void
forkret
(
void
);
extern
void
trapret
(
void
);
...
...
rcu.c
浏览文件 @
7a560836
...
...
@@ -16,13 +16,13 @@ struct rcu {
struct
rcu
*
rcu
;
void
(
*
dofree
)(
void
*
);
};
static
struct
rcu
*
rcu_delayed_head
;
static
struct
rcu
*
rcu_delayed_tail
;
static
struct
rcu
*
rcu_freelist
;
static
uint
global_epoch
;
static
uint
min_epoch
;
s
tatic
struct
spinlock
rcu_lock
;
static
int
delayed_nfree
;
static
struct
rcu
*
rcu_delayed_head
__attribute__
((
aligned
(
CACHELINE
)))
;
static
struct
rcu
*
rcu_delayed_tail
__attribute__
((
aligned
(
CACHELINE
)))
;
static
struct
rcu
*
rcu_freelist
__attribute__
((
aligned
(
CACHELINE
)))
;
static
uint
global_epoch
__attribute__
((
aligned
(
CACHELINE
)));
static
uint
min_epoch
__attribute__
((
aligned
(
CACHELINE
)));
static
struct
s
pinlock
rcu_lock
__attribute__
((
aligned
(
CACHELINE
)));
static
int
delayed_nfree
__attribute__
((
aligned
(
CACHELINE
)))
;
void
rcuinit
(
void
)
...
...
trap.c
浏览文件 @
7a560836
...
...
@@ -12,9 +12,9 @@
// Interrupt descriptor table (shared by all CPUs).
struct
gatedesc
idt
[
256
];
extern
uint
vectors
[];
// in vectors.S: array of 256 entry pointers
struct
spinlock
tickslock
;
struct
condvar
cv_ticks
;
uint
ticks
;
struct
spinlock
tickslock
__attribute__
((
aligned
(
CACHELINE
)))
;
struct
condvar
cv_ticks
__attribute__
((
aligned
(
CACHELINE
)))
;
uint
ticks
__attribute__
((
aligned
(
CACHELINE
)))
;
void
tvinit
(
void
)
...
...
vm.c
浏览文件 @
7a560836
...
...
@@ -12,7 +12,7 @@
extern
char
data
[];
// defined in data.S
static
pde_t
*
kpgdir
;
// for use in scheduler()
static
pde_t
*
kpgdir
__attribute__
((
aligned
(
CACHELINE
)))
;
// for use in scheduler()
// Set up CPU's kernel segment descriptors.
// Run once at boot time on each CPU.
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论