Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
505b308b
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
505b308b
编写于
12月 19, 2019
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'pm-cpufreq'
* pm-cpufreq: cpufreq: Avoid leaving stale IRQ work items during CPU offline
上级
4c84515d
85572c2c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
16 deletion
+24
-16
include/linux/cpufreq.h
include/linux/cpufreq.h
+0
-11
include/linux/sched/cpufreq.h
include/linux/sched/cpufreq.h
+3
-0
kernel/sched/cpufreq.c
kernel/sched/cpufreq.c
+18
-0
kernel/sched/cpufreq_schedutil.c
kernel/sched/cpufreq_schedutil.c
+3
-5
未找到文件。
include/linux/cpufreq.h
浏览文件 @
505b308b
...
...
@@ -595,17 +595,6 @@ struct governor_attr {
size_t
count
);
};
static
inline
bool
cpufreq_this_cpu_can_update
(
struct
cpufreq_policy
*
policy
)
{
/*
* Allow remote callbacks if:
* - dvfs_possible_from_any_cpu flag is set
* - the local and remote CPUs share cpufreq policy
*/
return
policy
->
dvfs_possible_from_any_cpu
||
cpumask_test_cpu
(
smp_processor_id
(),
policy
->
cpus
);
}
/*********************************************************************
* FREQUENCY TABLE HELPERS *
*********************************************************************/
...
...
include/linux/sched/cpufreq.h
浏览文件 @
505b308b
...
...
@@ -12,6 +12,8 @@
#define SCHED_CPUFREQ_MIGRATION (1U << 1)
#ifdef CONFIG_CPU_FREQ
struct
cpufreq_policy
;
struct
update_util_data
{
void
(
*
func
)(
struct
update_util_data
*
data
,
u64
time
,
unsigned
int
flags
);
};
...
...
@@ -20,6 +22,7 @@ void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data,
void
(
*
func
)(
struct
update_util_data
*
data
,
u64
time
,
unsigned
int
flags
));
void
cpufreq_remove_update_util_hook
(
int
cpu
);
bool
cpufreq_this_cpu_can_update
(
struct
cpufreq_policy
*
policy
);
static
inline
unsigned
long
map_util_freq
(
unsigned
long
util
,
unsigned
long
freq
,
unsigned
long
cap
)
...
...
kernel/sched/cpufreq.c
浏览文件 @
505b308b
...
...
@@ -5,6 +5,8 @@
* Copyright (C) 2016, Intel Corporation
* Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
*/
#include <linux/cpufreq.h>
#include "sched.h"
DEFINE_PER_CPU
(
struct
update_util_data
__rcu
*
,
cpufreq_update_util_data
);
...
...
@@ -57,3 +59,19 @@ void cpufreq_remove_update_util_hook(int cpu)
rcu_assign_pointer
(
per_cpu
(
cpufreq_update_util_data
,
cpu
),
NULL
);
}
EXPORT_SYMBOL_GPL
(
cpufreq_remove_update_util_hook
);
/**
* cpufreq_this_cpu_can_update - Check if cpufreq policy can be updated.
* @policy: cpufreq policy to check.
*
* Return 'true' if:
* - the local and remote CPUs share @policy,
* - dvfs_possible_from_any_cpu is set in @policy and the local CPU is not going
* offline (in which case it is not expected to run cpufreq updates any more).
*/
bool
cpufreq_this_cpu_can_update
(
struct
cpufreq_policy
*
policy
)
{
return
cpumask_test_cpu
(
smp_processor_id
(),
policy
->
cpus
)
||
(
policy
->
dvfs_possible_from_any_cpu
&&
rcu_dereference_sched
(
*
this_cpu_ptr
(
&
cpufreq_update_util_data
)));
}
kernel/sched/cpufreq_schedutil.c
浏览文件 @
505b308b
...
...
@@ -82,12 +82,10 @@ static bool sugov_should_update_freq(struct sugov_policy *sg_policy, u64 time)
* by the hardware, as calculating the frequency is pointless if
* we cannot in fact act on it.
*
* For the slow switching platforms, the kthread is always scheduled on
* the right set of CPUs and any CPU can find the next frequency and
* schedule the kthread.
* This is needed on the slow switching platforms too to prevent CPUs
* going offline from leaving stale IRQ work items behind.
*/
if
(
sg_policy
->
policy
->
fast_switch_enabled
&&
!
cpufreq_this_cpu_can_update
(
sg_policy
->
policy
))
if
(
!
cpufreq_this_cpu_can_update
(
sg_policy
->
policy
))
return
false
;
if
(
unlikely
(
sg_policy
->
limits_changed
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录