mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
Merge branch 'linus' into perf/core
Pick up the latest upstream fixes. Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
aee2bce3cf
331 changed files with 2778 additions and 1364 deletions
|
|
@ -475,13 +475,17 @@ static int validate_change(const struct cpuset *cur, const struct cpuset *trial)
|
|||
|
||||
/*
|
||||
* Cpusets with tasks - existing or newly being attached - can't
|
||||
* have empty cpus_allowed or mems_allowed.
|
||||
* be changed to have empty cpus_allowed or mems_allowed.
|
||||
*/
|
||||
ret = -ENOSPC;
|
||||
if ((cgroup_task_count(cur->css.cgroup) || cur->attach_in_progress) &&
|
||||
(cpumask_empty(trial->cpus_allowed) &&
|
||||
nodes_empty(trial->mems_allowed)))
|
||||
goto out;
|
||||
if ((cgroup_task_count(cur->css.cgroup) || cur->attach_in_progress)) {
|
||||
if (!cpumask_empty(cur->cpus_allowed) &&
|
||||
cpumask_empty(trial->cpus_allowed))
|
||||
goto out;
|
||||
if (!nodes_empty(cur->mems_allowed) &&
|
||||
nodes_empty(trial->mems_allowed))
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
out:
|
||||
|
|
@ -1608,11 +1612,13 @@ static int cpuset_write_u64(struct cgroup *cgrp, struct cftype *cft, u64 val)
|
|||
{
|
||||
struct cpuset *cs = cgroup_cs(cgrp);
|
||||
cpuset_filetype_t type = cft->private;
|
||||
int retval = -ENODEV;
|
||||
int retval = 0;
|
||||
|
||||
mutex_lock(&cpuset_mutex);
|
||||
if (!is_cpuset_online(cs))
|
||||
if (!is_cpuset_online(cs)) {
|
||||
retval = -ENODEV;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case FILE_CPU_EXCLUSIVE:
|
||||
|
|
|
|||
|
|
@ -1679,6 +1679,12 @@ SYSCALL_DEFINE5(clone, unsigned long, newsp, unsigned long, clone_flags,
|
|||
int __user *, parent_tidptr,
|
||||
int __user *, child_tidptr,
|
||||
int, tls_val)
|
||||
#elif defined(CONFIG_CLONE_BACKWARDS3)
|
||||
SYSCALL_DEFINE6(clone, unsigned long, clone_flags, unsigned long, newsp,
|
||||
int, stack_size,
|
||||
int __user *, parent_tidptr,
|
||||
int __user *, child_tidptr,
|
||||
int, tls_val)
|
||||
#else
|
||||
SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
|
||||
int __user *, parent_tidptr,
|
||||
|
|
|
|||
|
|
@ -686,7 +686,7 @@ __ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
|
|||
might_sleep();
|
||||
ret = __mutex_lock_common(&lock->base, TASK_UNINTERRUPTIBLE,
|
||||
0, &ctx->dep_map, _RET_IP_, ctx);
|
||||
if (!ret && ctx->acquired > 0)
|
||||
if (!ret && ctx->acquired > 1)
|
||||
return ww_mutex_deadlock_injection(lock, ctx);
|
||||
|
||||
return ret;
|
||||
|
|
@ -702,7 +702,7 @@ __ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
|
|||
ret = __mutex_lock_common(&lock->base, TASK_INTERRUPTIBLE,
|
||||
0, &ctx->dep_map, _RET_IP_, ctx);
|
||||
|
||||
if (!ret && ctx->acquired > 0)
|
||||
if (!ret && ctx->acquired > 1)
|
||||
return ww_mutex_deadlock_injection(lock, ctx);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -296,6 +296,17 @@ int pm_qos_request_active(struct pm_qos_request *req)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(pm_qos_request_active);
|
||||
|
||||
static void __pm_qos_update_request(struct pm_qos_request *req,
|
||||
s32 new_value)
|
||||
{
|
||||
trace_pm_qos_update_request(req->pm_qos_class, new_value);
|
||||
|
||||
if (new_value != req->node.prio)
|
||||
pm_qos_update_target(
|
||||
pm_qos_array[req->pm_qos_class]->constraints,
|
||||
&req->node, PM_QOS_UPDATE_REQ, new_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* pm_qos_work_fn - the timeout handler of pm_qos_update_request_timeout
|
||||
* @work: work struct for the delayed work (timeout)
|
||||
|
|
@ -308,7 +319,7 @@ static void pm_qos_work_fn(struct work_struct *work)
|
|||
struct pm_qos_request,
|
||||
work);
|
||||
|
||||
pm_qos_update_request(req, PM_QOS_DEFAULT_VALUE);
|
||||
__pm_qos_update_request(req, PM_QOS_DEFAULT_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -364,12 +375,7 @@ void pm_qos_update_request(struct pm_qos_request *req,
|
|||
}
|
||||
|
||||
cancel_delayed_work_sync(&req->work);
|
||||
|
||||
trace_pm_qos_update_request(req->pm_qos_class, new_value);
|
||||
if (new_value != req->node.prio)
|
||||
pm_qos_update_target(
|
||||
pm_qos_array[req->pm_qos_class]->constraints,
|
||||
&req->node, PM_QOS_UPDATE_REQ, new_value);
|
||||
__pm_qos_update_request(req, new_value);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pm_qos_update_request);
|
||||
|
||||
|
|
|
|||
|
|
@ -933,6 +933,8 @@ static int effective_prio(struct task_struct *p)
|
|||
/**
|
||||
* task_curr - is this task currently executing on a CPU?
|
||||
* @p: the task in question.
|
||||
*
|
||||
* Return: 1 if the task is currently executing. 0 otherwise.
|
||||
*/
|
||||
inline int task_curr(const struct task_struct *p)
|
||||
{
|
||||
|
|
@ -1482,7 +1484,7 @@ static void ttwu_queue(struct task_struct *p, int cpu)
|
|||
* the simpler "current->state = TASK_RUNNING" to mark yourself
|
||||
* runnable without the overhead of this.
|
||||
*
|
||||
* Returns %true if @p was woken up, %false if it was already running
|
||||
* Return: %true if @p was woken up, %false if it was already running.
|
||||
* or @state didn't match @p's state.
|
||||
*/
|
||||
static int
|
||||
|
|
@ -1491,7 +1493,13 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
|
|||
unsigned long flags;
|
||||
int cpu, success = 0;
|
||||
|
||||
smp_wmb();
|
||||
/*
|
||||
* If we are going to wake up a thread waiting for CONDITION we
|
||||
* need to ensure that CONDITION=1 done by the caller can not be
|
||||
* reordered with p->state check below. This pairs with mb() in
|
||||
* set_current_state() the waiting thread does.
|
||||
*/
|
||||
smp_mb__before_spinlock();
|
||||
raw_spin_lock_irqsave(&p->pi_lock, flags);
|
||||
if (!(p->state & state))
|
||||
goto out;
|
||||
|
|
@ -1577,8 +1585,9 @@ out:
|
|||
* @p: The process to be woken up.
|
||||
*
|
||||
* Attempt to wake up the nominated process and move it to the set of runnable
|
||||
* processes. Returns 1 if the process was woken up, 0 if it was already
|
||||
* running.
|
||||
* processes.
|
||||
*
|
||||
* Return: 1 if the process was woken up, 0 if it was already running.
|
||||
*
|
||||
* It may be assumed that this function implies a write memory barrier before
|
||||
* changing the task state if and only if any tasks are woken up.
|
||||
|
|
@ -2191,6 +2200,8 @@ void scheduler_tick(void)
|
|||
* This makes sure that uptime, CFS vruntime, load
|
||||
* balancing, etc... continue to move forward, even
|
||||
* with a very low granularity.
|
||||
*
|
||||
* Return: Maximum deferment in nanoseconds.
|
||||
*/
|
||||
u64 scheduler_tick_max_deferment(void)
|
||||
{
|
||||
|
|
@ -2394,6 +2405,12 @@ need_resched:
|
|||
if (sched_feat(HRTICK))
|
||||
hrtick_clear(rq);
|
||||
|
||||
/*
|
||||
* Make sure that signal_pending_state()->signal_pending() below
|
||||
* can't be reordered with __set_current_state(TASK_INTERRUPTIBLE)
|
||||
* done by the caller to avoid the race with signal_wake_up().
|
||||
*/
|
||||
smp_mb__before_spinlock();
|
||||
raw_spin_lock_irq(&rq->lock);
|
||||
|
||||
switch_count = &prev->nivcsw;
|
||||
|
|
@ -2796,8 +2813,8 @@ EXPORT_SYMBOL(wait_for_completion);
|
|||
* specified timeout to expire. The timeout is in jiffies. It is not
|
||||
* interruptible.
|
||||
*
|
||||
* The return value is 0 if timed out, and positive (at least 1, or number of
|
||||
* jiffies left till timeout) if completed.
|
||||
* Return: 0 if timed out, and positive (at least 1, or number of jiffies left
|
||||
* till timeout) if completed.
|
||||
*/
|
||||
unsigned long __sched
|
||||
wait_for_completion_timeout(struct completion *x, unsigned long timeout)
|
||||
|
|
@ -2829,8 +2846,8 @@ EXPORT_SYMBOL(wait_for_completion_io);
|
|||
* specified timeout to expire. The timeout is in jiffies. It is not
|
||||
* interruptible. The caller is accounted as waiting for IO.
|
||||
*
|
||||
* The return value is 0 if timed out, and positive (at least 1, or number of
|
||||
* jiffies left till timeout) if completed.
|
||||
* Return: 0 if timed out, and positive (at least 1, or number of jiffies left
|
||||
* till timeout) if completed.
|
||||
*/
|
||||
unsigned long __sched
|
||||
wait_for_completion_io_timeout(struct completion *x, unsigned long timeout)
|
||||
|
|
@ -2846,7 +2863,7 @@ EXPORT_SYMBOL(wait_for_completion_io_timeout);
|
|||
* This waits for completion of a specific task to be signaled. It is
|
||||
* interruptible.
|
||||
*
|
||||
* The return value is -ERESTARTSYS if interrupted, 0 if completed.
|
||||
* Return: -ERESTARTSYS if interrupted, 0 if completed.
|
||||
*/
|
||||
int __sched wait_for_completion_interruptible(struct completion *x)
|
||||
{
|
||||
|
|
@ -2865,8 +2882,8 @@ EXPORT_SYMBOL(wait_for_completion_interruptible);
|
|||
* This waits for either a completion of a specific task to be signaled or for a
|
||||
* specified timeout to expire. It is interruptible. The timeout is in jiffies.
|
||||
*
|
||||
* The return value is -ERESTARTSYS if interrupted, 0 if timed out,
|
||||
* positive (at least 1, or number of jiffies left till timeout) if completed.
|
||||
* Return: -ERESTARTSYS if interrupted, 0 if timed out, positive (at least 1,
|
||||
* or number of jiffies left till timeout) if completed.
|
||||
*/
|
||||
long __sched
|
||||
wait_for_completion_interruptible_timeout(struct completion *x,
|
||||
|
|
@ -2883,7 +2900,7 @@ EXPORT_SYMBOL(wait_for_completion_interruptible_timeout);
|
|||
* This waits to be signaled for completion of a specific task. It can be
|
||||
* interrupted by a kill signal.
|
||||
*
|
||||
* The return value is -ERESTARTSYS if interrupted, 0 if completed.
|
||||
* Return: -ERESTARTSYS if interrupted, 0 if completed.
|
||||
*/
|
||||
int __sched wait_for_completion_killable(struct completion *x)
|
||||
{
|
||||
|
|
@ -2903,8 +2920,8 @@ EXPORT_SYMBOL(wait_for_completion_killable);
|
|||
* signaled or for a specified timeout to expire. It can be
|
||||
* interrupted by a kill signal. The timeout is in jiffies.
|
||||
*
|
||||
* The return value is -ERESTARTSYS if interrupted, 0 if timed out,
|
||||
* positive (at least 1, or number of jiffies left till timeout) if completed.
|
||||
* Return: -ERESTARTSYS if interrupted, 0 if timed out, positive (at least 1,
|
||||
* or number of jiffies left till timeout) if completed.
|
||||
*/
|
||||
long __sched
|
||||
wait_for_completion_killable_timeout(struct completion *x,
|
||||
|
|
@ -2918,7 +2935,7 @@ EXPORT_SYMBOL(wait_for_completion_killable_timeout);
|
|||
* try_wait_for_completion - try to decrement a completion without blocking
|
||||
* @x: completion structure
|
||||
*
|
||||
* Returns: 0 if a decrement cannot be done without blocking
|
||||
* Return: 0 if a decrement cannot be done without blocking
|
||||
* 1 if a decrement succeeded.
|
||||
*
|
||||
* If a completion is being used as a counting completion,
|
||||
|
|
@ -2945,7 +2962,7 @@ EXPORT_SYMBOL(try_wait_for_completion);
|
|||
* completion_done - Test to see if a completion has any waiters
|
||||
* @x: completion structure
|
||||
*
|
||||
* Returns: 0 if there are waiters (wait_for_completion() in progress)
|
||||
* Return: 0 if there are waiters (wait_for_completion() in progress)
|
||||
* 1 if there are no waiters.
|
||||
*
|
||||
*/
|
||||
|
|
@ -3182,7 +3199,7 @@ SYSCALL_DEFINE1(nice, int, increment)
|
|||
* task_prio - return the priority value of a given task.
|
||||
* @p: the task in question.
|
||||
*
|
||||
* This is the priority value as seen by users in /proc.
|
||||
* Return: The priority value as seen by users in /proc.
|
||||
* RT tasks are offset by -200. Normal tasks are centered
|
||||
* around 0, value goes from -16 to +15.
|
||||
*/
|
||||
|
|
@ -3194,6 +3211,8 @@ int task_prio(const struct task_struct *p)
|
|||
/**
|
||||
* task_nice - return the nice value of a given task.
|
||||
* @p: the task in question.
|
||||
*
|
||||
* Return: The nice value [ -20 ... 0 ... 19 ].
|
||||
*/
|
||||
int task_nice(const struct task_struct *p)
|
||||
{
|
||||
|
|
@ -3204,6 +3223,8 @@ EXPORT_SYMBOL(task_nice);
|
|||
/**
|
||||
* idle_cpu - is a given cpu idle currently?
|
||||
* @cpu: the processor in question.
|
||||
*
|
||||
* Return: 1 if the CPU is currently idle. 0 otherwise.
|
||||
*/
|
||||
int idle_cpu(int cpu)
|
||||
{
|
||||
|
|
@ -3226,6 +3247,8 @@ int idle_cpu(int cpu)
|
|||
/**
|
||||
* idle_task - return the idle task for a given cpu.
|
||||
* @cpu: the processor in question.
|
||||
*
|
||||
* Return: The idle task for the cpu @cpu.
|
||||
*/
|
||||
struct task_struct *idle_task(int cpu)
|
||||
{
|
||||
|
|
@ -3235,6 +3258,8 @@ struct task_struct *idle_task(int cpu)
|
|||
/**
|
||||
* find_process_by_pid - find a process with a matching PID value.
|
||||
* @pid: the pid in question.
|
||||
*
|
||||
* The task of @pid, if found. %NULL otherwise.
|
||||
*/
|
||||
static struct task_struct *find_process_by_pid(pid_t pid)
|
||||
{
|
||||
|
|
@ -3432,6 +3457,8 @@ recheck:
|
|||
* @policy: new policy.
|
||||
* @param: structure containing the new RT priority.
|
||||
*
|
||||
* Return: 0 on success. An error code otherwise.
|
||||
*
|
||||
* NOTE that the task may be already dead.
|
||||
*/
|
||||
int sched_setscheduler(struct task_struct *p, int policy,
|
||||
|
|
@ -3451,6 +3478,8 @@ EXPORT_SYMBOL_GPL(sched_setscheduler);
|
|||
* current context has permission. For example, this is needed in
|
||||
* stop_machine(): we create temporary high priority worker threads,
|
||||
* but our caller might not have that capability.
|
||||
*
|
||||
* Return: 0 on success. An error code otherwise.
|
||||
*/
|
||||
int sched_setscheduler_nocheck(struct task_struct *p, int policy,
|
||||
const struct sched_param *param)
|
||||
|
|
@ -3485,6 +3514,8 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
|
|||
* @pid: the pid in question.
|
||||
* @policy: new policy.
|
||||
* @param: structure containing the new RT priority.
|
||||
*
|
||||
* Return: 0 on success. An error code otherwise.
|
||||
*/
|
||||
SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy,
|
||||
struct sched_param __user *, param)
|
||||
|
|
@ -3500,6 +3531,8 @@ SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy,
|
|||
* sys_sched_setparam - set/change the RT priority of a thread
|
||||
* @pid: the pid in question.
|
||||
* @param: structure containing the new RT priority.
|
||||
*
|
||||
* Return: 0 on success. An error code otherwise.
|
||||
*/
|
||||
SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param)
|
||||
{
|
||||
|
|
@ -3509,6 +3542,9 @@ SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param)
|
|||
/**
|
||||
* sys_sched_getscheduler - get the policy (scheduling class) of a thread
|
||||
* @pid: the pid in question.
|
||||
*
|
||||
* Return: On success, the policy of the thread. Otherwise, a negative error
|
||||
* code.
|
||||
*/
|
||||
SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid)
|
||||
{
|
||||
|
|
@ -3535,6 +3571,9 @@ SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid)
|
|||
* sys_sched_getparam - get the RT priority of a thread
|
||||
* @pid: the pid in question.
|
||||
* @param: structure containing the RT priority.
|
||||
*
|
||||
* Return: On success, 0 and the RT priority is in @param. Otherwise, an error
|
||||
* code.
|
||||
*/
|
||||
SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
|
||||
{
|
||||
|
|
@ -3659,6 +3698,8 @@ static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len,
|
|||
* @pid: pid of the process
|
||||
* @len: length in bytes of the bitmask pointed to by user_mask_ptr
|
||||
* @user_mask_ptr: user-space pointer to the new cpu mask
|
||||
*
|
||||
* Return: 0 on success. An error code otherwise.
|
||||
*/
|
||||
SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len,
|
||||
unsigned long __user *, user_mask_ptr)
|
||||
|
|
@ -3710,6 +3751,8 @@ out_unlock:
|
|||
* @pid: pid of the process
|
||||
* @len: length in bytes of the bitmask pointed to by user_mask_ptr
|
||||
* @user_mask_ptr: user-space pointer to hold the current cpu mask
|
||||
*
|
||||
* Return: 0 on success. An error code otherwise.
|
||||
*/
|
||||
SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
|
||||
unsigned long __user *, user_mask_ptr)
|
||||
|
|
@ -3744,6 +3787,8 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
|
|||
*
|
||||
* This function yields the current CPU to other tasks. If there are no
|
||||
* other threads running on this CPU then this function will return.
|
||||
*
|
||||
* Return: 0.
|
||||
*/
|
||||
SYSCALL_DEFINE0(sched_yield)
|
||||
{
|
||||
|
|
@ -3869,7 +3914,7 @@ EXPORT_SYMBOL(yield);
|
|||
* It's the caller's job to ensure that the target task struct
|
||||
* can't go away on us before we can do any checks.
|
||||
*
|
||||
* Returns:
|
||||
* Return:
|
||||
* true (>0) if we indeed boosted the target task.
|
||||
* false (0) if we failed to boost the target.
|
||||
* -ESRCH if there's no task to yield to.
|
||||
|
|
@ -3972,8 +4017,9 @@ long __sched io_schedule_timeout(long timeout)
|
|||
* sys_sched_get_priority_max - return maximum RT priority.
|
||||
* @policy: scheduling class.
|
||||
*
|
||||
* this syscall returns the maximum rt_priority that can be used
|
||||
* by a given scheduling class.
|
||||
* Return: On success, this syscall returns the maximum
|
||||
* rt_priority that can be used by a given scheduling class.
|
||||
* On failure, a negative error code is returned.
|
||||
*/
|
||||
SYSCALL_DEFINE1(sched_get_priority_max, int, policy)
|
||||
{
|
||||
|
|
@ -3997,8 +4043,9 @@ SYSCALL_DEFINE1(sched_get_priority_max, int, policy)
|
|||
* sys_sched_get_priority_min - return minimum RT priority.
|
||||
* @policy: scheduling class.
|
||||
*
|
||||
* this syscall returns the minimum rt_priority that can be used
|
||||
* by a given scheduling class.
|
||||
* Return: On success, this syscall returns the minimum
|
||||
* rt_priority that can be used by a given scheduling class.
|
||||
* On failure, a negative error code is returned.
|
||||
*/
|
||||
SYSCALL_DEFINE1(sched_get_priority_min, int, policy)
|
||||
{
|
||||
|
|
@ -4024,6 +4071,9 @@ SYSCALL_DEFINE1(sched_get_priority_min, int, policy)
|
|||
*
|
||||
* this syscall writes the default timeslice value of a given process
|
||||
* into the user-space timespec buffer. A value of '0' means infinity.
|
||||
*
|
||||
* Return: On success, 0 and the timeslice is in @interval. Otherwise,
|
||||
* an error code.
|
||||
*/
|
||||
SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
|
||||
struct timespec __user *, interval)
|
||||
|
|
@ -6637,6 +6687,8 @@ void normalize_rt_tasks(void)
|
|||
* @cpu: the processor in question.
|
||||
*
|
||||
* ONLY VALID WHEN THE WHOLE SYSTEM IS STOPPED!
|
||||
*
|
||||
* Return: The current task for @cpu.
|
||||
*/
|
||||
struct task_struct *curr_task(int cpu)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ static int convert_prio(int prio)
|
|||
* any discrepancies created by racing against the uncertainty of the current
|
||||
* priority configuration.
|
||||
*
|
||||
* Returns: (int)bool - CPUs were found
|
||||
* Return: (int)bool - CPUs were found
|
||||
*/
|
||||
int cpupri_find(struct cpupri *cp, struct task_struct *p,
|
||||
struct cpumask *lowest_mask)
|
||||
|
|
@ -203,7 +203,7 @@ void cpupri_set(struct cpupri *cp, int cpu, int newpri)
|
|||
* cpupri_init - initialize the cpupri structure
|
||||
* @cp: The cpupri context
|
||||
*
|
||||
* Returns: -ENOMEM if memory fails.
|
||||
* Return: -ENOMEM on memory allocation failure.
|
||||
*/
|
||||
int cpupri_init(struct cpupri *cp)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2032,6 +2032,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
|
|||
*/
|
||||
update_entity_load_avg(curr, 1);
|
||||
update_cfs_rq_blocked_load(cfs_rq, 1);
|
||||
update_cfs_shares(cfs_rq);
|
||||
|
||||
#ifdef CONFIG_SCHED_HRTICK
|
||||
/*
|
||||
|
|
@ -4324,6 +4325,8 @@ struct sg_lb_stats {
|
|||
* get_sd_load_idx - Obtain the load index for a given sched domain.
|
||||
* @sd: The sched_domain whose load_idx is to be obtained.
|
||||
* @idle: The Idle status of the CPU for whose sd load_icx is obtained.
|
||||
*
|
||||
* Return: The load index.
|
||||
*/
|
||||
static inline int get_sd_load_idx(struct sched_domain *sd,
|
||||
enum cpu_idle_type idle)
|
||||
|
|
@ -4618,6 +4621,9 @@ static inline void update_sg_lb_stats(struct lb_env *env,
|
|||
*
|
||||
* Determine if @sg is a busier group than the previously selected
|
||||
* busiest group.
|
||||
*
|
||||
* Return: %true if @sg is a busier group than the previously selected
|
||||
* busiest group. %false otherwise.
|
||||
*/
|
||||
static bool update_sd_pick_busiest(struct lb_env *env,
|
||||
struct sd_lb_stats *sds,
|
||||
|
|
@ -4735,7 +4741,7 @@ static inline void update_sd_lb_stats(struct lb_env *env,
|
|||
* assuming lower CPU number will be equivalent to lower a SMT thread
|
||||
* number.
|
||||
*
|
||||
* Returns 1 when packing is required and a task should be moved to
|
||||
* Return: 1 when packing is required and a task should be moved to
|
||||
* this CPU. The amount of the imbalance is returned in *imbalance.
|
||||
*
|
||||
* @env: The load balancing environment.
|
||||
|
|
@ -4913,7 +4919,7 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
|
|||
* @balance: Pointer to a variable indicating if this_cpu
|
||||
* is the appropriate cpu to perform load balancing at this_level.
|
||||
*
|
||||
* Returns: - the busiest group if imbalance exists.
|
||||
* Return: - The busiest group if imbalance exists.
|
||||
* - If no imbalance and user has opted for power-savings balance,
|
||||
* return the least loaded group whose CPUs can be
|
||||
* put to idle by rebalancing its tasks onto our group.
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
|
|||
BUG_ON(bits > 32);
|
||||
WARN_ON(!irqs_disabled());
|
||||
read_sched_clock = read;
|
||||
sched_clock_mask = (1 << bits) - 1;
|
||||
sched_clock_mask = (1ULL << bits) - 1;
|
||||
cd.rate = rate;
|
||||
|
||||
/* calculate the mult/shift to convert counter ticks to ns. */
|
||||
|
|
|
|||
|
|
@ -182,7 +182,8 @@ static bool can_stop_full_tick(void)
|
|||
* Don't allow the user to think they can get
|
||||
* full NO_HZ with this machine.
|
||||
*/
|
||||
WARN_ONCE(1, "NO_HZ FULL will not work with unstable sched clock");
|
||||
WARN_ONCE(have_nohz_full_mask,
|
||||
"NO_HZ FULL will not work with unstable sched clock");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -343,8 +344,6 @@ static int tick_nohz_init_all(void)
|
|||
|
||||
void __init tick_nohz_init(void)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
if (!have_nohz_full_mask) {
|
||||
if (tick_nohz_init_all() < 0)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -265,10 +265,9 @@ static inline void timer_list_header(struct seq_file *m, u64 now)
|
|||
static int timer_list_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct timer_list_iter *iter = v;
|
||||
u64 now = ktime_to_ns(ktime_get());
|
||||
|
||||
if (iter->cpu == -1 && !iter->second_pass)
|
||||
timer_list_header(m, now);
|
||||
timer_list_header(m, iter->now);
|
||||
else if (!iter->second_pass)
|
||||
print_cpu(m, iter->cpu, iter->now);
|
||||
#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
||||
|
|
@ -298,33 +297,41 @@ void sysrq_timer_list_show(void)
|
|||
return;
|
||||
}
|
||||
|
||||
static void *move_iter(struct timer_list_iter *iter, loff_t offset)
|
||||
{
|
||||
for (; offset; offset--) {
|
||||
iter->cpu = cpumask_next(iter->cpu, cpu_online_mask);
|
||||
if (iter->cpu >= nr_cpu_ids) {
|
||||
#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
||||
if (!iter->second_pass) {
|
||||
iter->cpu = -1;
|
||||
iter->second_pass = true;
|
||||
} else
|
||||
return NULL;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return iter;
|
||||
}
|
||||
|
||||
static void *timer_list_start(struct seq_file *file, loff_t *offset)
|
||||
{
|
||||
struct timer_list_iter *iter = file->private;
|
||||
|
||||
if (!*offset) {
|
||||
iter->cpu = -1;
|
||||
if (!*offset)
|
||||
iter->now = ktime_to_ns(ktime_get());
|
||||
} else if (iter->cpu >= nr_cpu_ids) {
|
||||
#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
||||
if (!iter->second_pass) {
|
||||
iter->cpu = -1;
|
||||
iter->second_pass = true;
|
||||
} else
|
||||
return NULL;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
return iter;
|
||||
iter->cpu = -1;
|
||||
iter->second_pass = false;
|
||||
return move_iter(iter, *offset);
|
||||
}
|
||||
|
||||
static void *timer_list_next(struct seq_file *file, void *v, loff_t *offset)
|
||||
{
|
||||
struct timer_list_iter *iter = file->private;
|
||||
iter->cpu = cpumask_next(iter->cpu, cpu_online_mask);
|
||||
++*offset;
|
||||
return timer_list_start(file, offset);
|
||||
return move_iter(iter, 1);
|
||||
}
|
||||
|
||||
static void timer_list_stop(struct seq_file *seq, void *v)
|
||||
|
|
|
|||
|
|
@ -363,8 +363,7 @@ EXPORT_SYMBOL(out_of_line_wait_on_atomic_t);
|
|||
|
||||
/**
|
||||
* wake_up_atomic_t - Wake up a waiter on a atomic_t
|
||||
* @word: The word being waited on, a kernel virtual address
|
||||
* @bit: The bit of the word being waited on
|
||||
* @p: The atomic_t being waited on, a kernel virtual address
|
||||
*
|
||||
* Wake up anyone waiting for the atomic_t to go to zero.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue