Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
prefetch_tuning
提交
7a85779d
P
prefetch_tuning
项目概览
openeuler
/
prefetch_tuning
通知
12
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
prefetch_tuning
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7a85779d
编写于
7月 02, 2020
作者:
L
liqiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename feature cache to read unique
上级
c7dfb031
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
15 deletion
+15
-15
prefetch_mod.c
prefetch_mod.c
+9
-9
prefetch_mod.h
prefetch_mod.h
+2
-2
prefetch_reg.c
prefetch_reg.c
+4
-4
未找到文件。
prefetch_mod.c
浏览文件 @
7a85779d
...
...
@@ -33,9 +33,9 @@ static cfg_t __percpu *cur_cfg;
static
cfg_t
__percpu
*
old_cfg
;
static
DEFINE_MUTEX
(
prefetch_mtx
);
static
ssize_t
cach
e_store
(
struct
device
*
dev
,
static
ssize_t
read_uniqu
e_store
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
count
);
static
ssize_t
cach
e_show
(
struct
device
*
dev
,
static
ssize_t
read_uniqu
e_show
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
);
static
ssize_t
prefetch_store
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
count
);
...
...
@@ -47,8 +47,8 @@ static ssize_t prefetch_mask_show(struct device* dev,
struct
device_attribute
*
attr
,
char
*
buf
);
/* Device create */
static
DEVICE_ATTR
(
cach
e
,
S_IRUGO
|
S_IWUSR
,
cache_show
,
cach
e_store
);
static
DEVICE_ATTR
(
read_uniqu
e
,
S_IRUGO
|
S_IWUSR
,
read_unique_show
,
read_uniqu
e_store
);
static
DEVICE_ATTR
(
policy
,
S_IRUGO
|
S_IWUSR
,
prefetch_show
,
prefetch_store
);
...
...
@@ -60,7 +60,7 @@ static DEVICE_ATTR(cpumask, S_IRUGO|S_IWUSR,
static
struct
attribute
*
prefetch_attrs
[]
=
{
&
dev_attr_policy
.
attr
,
&
dev_attr_cpumask
.
attr
,
&
dev_attr_
cach
e
.
attr
,
&
dev_attr_
read_uniqu
e
.
attr
,
NULL
,
};
...
...
@@ -80,7 +80,7 @@ static struct miscdevice misc = {
};
/* 0--close, 1--open */
static
ssize_t
cach
e_store
(
struct
device
*
dev
,
static
ssize_t
read_uniqu
e_store
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
count
)
{
ssize_t
ret
;
...
...
@@ -93,13 +93,13 @@ static ssize_t cache_store(struct device* dev,
}
mutex_lock
(
&
prefetch_mtx
);
on_each_cpu_mask
(
prefetch_cpumask_value
,
cach
e_set
,
&
value
,
1
);
on_each_cpu_mask
(
prefetch_cpumask_value
,
read_uniqu
e_set
,
&
value
,
1
);
mutex_unlock
(
&
prefetch_mtx
);
return
count
;
}
static
ssize_t
cach
e_show
(
struct
device
*
dev
,
static
ssize_t
read_uniqu
e_show
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
int
cpu
;
...
...
@@ -111,7 +111,7 @@ static ssize_t cache_show(struct device* dev,
return
-
ENOMEM
;
}
mutex_lock
(
&
prefetch_mtx
);
on_each_cpu_mask
(
prefetch_cpumask_value
,
cach
e_get
,
cur
,
1
);
on_each_cpu_mask
(
prefetch_cpumask_value
,
read_uniqu
e_get
,
cur
,
1
);
for_each_cpu
(
cpu
,
prefetch_cpumask_value
)
{
int
*
ptr
=
per_cpu_ptr
(
cur
,
cpu
);
...
...
prefetch_mod.h
浏览文件 @
7a85779d
...
...
@@ -22,8 +22,8 @@ typedef long cfg_t;
extern
void
set_prefetch
(
void
*
dummy
);
extern
void
get_prefetch
(
void
*
dummy
);
extern
void
cach
e_set
(
void
*
dummy
);
extern
void
cach
e_get
(
void
*
dummy
);
extern
void
read_uniqu
e_set
(
void
*
dummy
);
extern
void
read_uniqu
e_get
(
void
*
dummy
);
extern
void
reset_prefetch
(
void
*
dummy
);
extern
int
prefetch_policy_num
(
void
);
...
...
prefetch_reg.c
浏览文件 @
7a85779d
...
...
@@ -107,7 +107,7 @@ void get_prefetch(void* dummy)
return
;
}
void
cach
e_set
(
void
*
dummy
)
void
read_uniqu
e_set
(
void
*
dummy
)
{
int
*
value
=
(
int
*
)
dummy
;
if
(
*
value
==
ENABLE
)
...
...
@@ -118,7 +118,7 @@ void cache_set(void *dummy)
return
;
}
void
cach
e_get
(
void
*
dummy
)
void
read_uniqu
e_get
(
void
*
dummy
)
{
int
*
value
=
this_cpu_ptr
((
int
__percpu
*
)
dummy
);
u64
reg_value
=
read_sysreg
(
S3_1_c15_c6_4
);
...
...
@@ -139,12 +139,12 @@ void get_prefetch(void* dummy)
return
;
}
void
cach
e_set
(
void
*
dummy
)
void
read_uniqu
e_set
(
void
*
dummy
)
{
return
;
}
void
cach
e_get
(
void
*
dummy
)
void
read_uniqu
e_get
(
void
*
dummy
)
{
return
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录