Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
37c72cac
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
37c72cac
编写于
10月 23, 2014
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'pm-qos'
* pm-qos: PM / QoS: Add PM_QOS_MEMORY_BANDWIDTH class
上级
286180d8
7990da71
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
3 deletion
+33
-3
Documentation/power/pm_qos_interface.txt
Documentation/power/pm_qos_interface.txt
+3
-1
include/linux/pm_qos.h
include/linux/pm_qos.h
+4
-1
kernel/power/qos.c
kernel/power/qos.c
+26
-1
未找到文件。
Documentation/power/pm_qos_interface.txt
浏览文件 @
37c72cac
...
...
@@ -5,7 +5,8 @@ performance expectations by drivers, subsystems and user space applications on
one of the parameters.
Two different PM QoS frameworks are available:
1. PM QoS classes for cpu_dma_latency, network_latency, network_throughput.
1. PM QoS classes for cpu_dma_latency, network_latency, network_throughput,
memory_bandwidth.
2. the per-device PM QoS framework provides the API to manage the per-device latency
constraints and PM QoS flags.
...
...
@@ -13,6 +14,7 @@ Each parameters have defined units:
* latency: usec
* timeout: usec
* throughput: kbs (kilo bit / sec)
* memory bandwidth: mbs (mega bit / sec)
1. PM QoS framework
...
...
include/linux/pm_qos.h
浏览文件 @
37c72cac
...
...
@@ -15,6 +15,7 @@ enum {
PM_QOS_CPU_DMA_LATENCY
,
PM_QOS_NETWORK_LATENCY
,
PM_QOS_NETWORK_THROUGHPUT
,
PM_QOS_MEMORY_BANDWIDTH
,
/* insert new class ID */
PM_QOS_NUM_CLASSES
,
...
...
@@ -32,6 +33,7 @@ enum pm_qos_flags_status {
#define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC)
#define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC)
#define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0
#define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0
#define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0
#define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0
#define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1)
...
...
@@ -69,7 +71,8 @@ struct dev_pm_qos_request {
enum
pm_qos_type
{
PM_QOS_UNITIALIZED
,
PM_QOS_MAX
,
/* return the largest value */
PM_QOS_MIN
/* return the smallest value */
PM_QOS_MIN
,
/* return the smallest value */
PM_QOS_SUM
/* return the sum */
};
/*
...
...
kernel/power/qos.c
浏览文件 @
37c72cac
...
...
@@ -105,11 +105,27 @@ static struct pm_qos_object network_throughput_pm_qos = {
};
static
BLOCKING_NOTIFIER_HEAD
(
memory_bandwidth_notifier
);
static
struct
pm_qos_constraints
memory_bw_constraints
=
{
.
list
=
PLIST_HEAD_INIT
(
memory_bw_constraints
.
list
),
.
target_value
=
PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE
,
.
default_value
=
PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE
,
.
no_constraint_value
=
PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE
,
.
type
=
PM_QOS_SUM
,
.
notifiers
=
&
memory_bandwidth_notifier
,
};
static
struct
pm_qos_object
memory_bandwidth_pm_qos
=
{
.
constraints
=
&
memory_bw_constraints
,
.
name
=
"memory_bandwidth"
,
};
static
struct
pm_qos_object
*
pm_qos_array
[]
=
{
&
null_pm_qos
,
&
cpu_dma_pm_qos
,
&
network_lat_pm_qos
,
&
network_throughput_pm_qos
&
network_throughput_pm_qos
,
&
memory_bandwidth_pm_qos
,
};
static
ssize_t
pm_qos_power_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
...
...
@@ -130,6 +146,9 @@ static const struct file_operations pm_qos_power_fops = {
/* unlocked internal variant */
static
inline
int
pm_qos_get_value
(
struct
pm_qos_constraints
*
c
)
{
struct
plist_node
*
node
;
int
total_value
=
0
;
if
(
plist_head_empty
(
&
c
->
list
))
return
c
->
no_constraint_value
;
...
...
@@ -140,6 +159,12 @@ static inline int pm_qos_get_value(struct pm_qos_constraints *c)
case
PM_QOS_MAX
:
return
plist_last
(
&
c
->
list
)
->
prio
;
case
PM_QOS_SUM
:
plist_for_each
(
node
,
&
c
->
list
)
total_value
+=
node
->
prio
;
return
total_value
;
default:
/* runtime check for not using enum */
BUG
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录