Merge commit 'v2.6.37-rc3' into perf/core
Merge reason: Pick up latest fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
+11
-10
@@ -82,7 +82,7 @@ static kdbtab_t kdb_base_commands[50];
|
||||
#define for_each_kdbcmd(cmd, num) \
|
||||
for ((cmd) = kdb_base_commands, (num) = 0; \
|
||||
num < kdb_max_commands; \
|
||||
num == KDB_BASE_CMD_MAX ? cmd = kdb_commands : cmd++, num++)
|
||||
num++, num == KDB_BASE_CMD_MAX ? cmd = kdb_commands : cmd++)
|
||||
|
||||
typedef struct _kdbmsg {
|
||||
int km_diag; /* kdb diagnostic */
|
||||
@@ -646,7 +646,7 @@ static int kdb_defcmd2(const char *cmdstr, const char *argv0)
|
||||
}
|
||||
if (!s->usable)
|
||||
return KDB_NOTIMP;
|
||||
s->command = kmalloc((s->count + 1) * sizeof(*(s->command)), GFP_KDB);
|
||||
s->command = kzalloc((s->count + 1) * sizeof(*(s->command)), GFP_KDB);
|
||||
if (!s->command) {
|
||||
kdb_printf("Could not allocate new kdb_defcmd table for %s\n",
|
||||
cmdstr);
|
||||
@@ -2361,7 +2361,7 @@ static int kdb_pid(int argc, const char **argv)
|
||||
*/
|
||||
static int kdb_ll(int argc, const char **argv)
|
||||
{
|
||||
int diag;
|
||||
int diag = 0;
|
||||
unsigned long addr;
|
||||
long offset = 0;
|
||||
unsigned long va;
|
||||
@@ -2400,20 +2400,21 @@ static int kdb_ll(int argc, const char **argv)
|
||||
char buf[80];
|
||||
|
||||
if (KDB_FLAG(CMD_INTERRUPT))
|
||||
return 0;
|
||||
goto out;
|
||||
|
||||
sprintf(buf, "%s " kdb_machreg_fmt "\n", command, va);
|
||||
diag = kdb_parse(buf);
|
||||
if (diag)
|
||||
return diag;
|
||||
goto out;
|
||||
|
||||
addr = va + linkoffset;
|
||||
if (kdb_getword(&va, addr, sizeof(va)))
|
||||
return 0;
|
||||
goto out;
|
||||
}
|
||||
kfree(command);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
kfree(command);
|
||||
return diag;
|
||||
}
|
||||
|
||||
static int kdb_kgdb(int argc, const char **argv)
|
||||
@@ -2739,13 +2740,13 @@ int kdb_register_repeat(char *cmd,
|
||||
}
|
||||
if (kdb_commands) {
|
||||
memcpy(new, kdb_commands,
|
||||
kdb_max_commands * sizeof(*new));
|
||||
(kdb_max_commands - KDB_BASE_CMD_MAX) * sizeof(*new));
|
||||
kfree(kdb_commands);
|
||||
}
|
||||
memset(new + kdb_max_commands, 0,
|
||||
kdb_command_extend * sizeof(*new));
|
||||
kdb_commands = new;
|
||||
kp = kdb_commands + kdb_max_commands;
|
||||
kp = kdb_commands + kdb_max_commands - KDB_BASE_CMD_MAX;
|
||||
kdb_max_commands += kdb_command_extend;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -2489,7 +2489,8 @@ void exit_robust_list(struct task_struct *curr)
|
||||
{
|
||||
struct robust_list_head __user *head = curr->robust_list;
|
||||
struct robust_list __user *entry, *next_entry, *pending;
|
||||
unsigned int limit = ROBUST_LIST_LIMIT, pi, next_pi, pip;
|
||||
unsigned int limit = ROBUST_LIST_LIMIT, pi, pip;
|
||||
unsigned int uninitialized_var(next_pi);
|
||||
unsigned long futex_offset;
|
||||
int rc;
|
||||
|
||||
|
||||
@@ -49,7 +49,8 @@ void compat_exit_robust_list(struct task_struct *curr)
|
||||
{
|
||||
struct compat_robust_list_head __user *head = curr->compat_robust_list;
|
||||
struct robust_list __user *entry, *next_entry, *pending;
|
||||
unsigned int limit = ROBUST_LIST_LIMIT, pi, next_pi, pip;
|
||||
unsigned int limit = ROBUST_LIST_LIMIT, pi, pip;
|
||||
unsigned int uninitialized_var(next_pi);
|
||||
compat_uptr_t uentry, next_uentry, upending;
|
||||
compat_long_t futex_offset;
|
||||
int rc;
|
||||
|
||||
@@ -121,10 +121,10 @@ static inline int pm_qos_get_value(struct pm_qos_object *o)
|
||||
|
||||
switch (o->type) {
|
||||
case PM_QOS_MIN:
|
||||
return plist_last(&o->requests)->prio;
|
||||
return plist_first(&o->requests)->prio;
|
||||
|
||||
case PM_QOS_MAX:
|
||||
return plist_first(&o->requests)->prio;
|
||||
return plist_last(&o->requests)->prio;
|
||||
|
||||
default:
|
||||
/* runtime check for not using enum */
|
||||
|
||||
@@ -246,9 +246,13 @@ config PM_OPS
|
||||
depends on PM_SLEEP || PM_RUNTIME
|
||||
default y
|
||||
|
||||
config ARCH_HAS_OPP
|
||||
bool
|
||||
|
||||
config PM_OPP
|
||||
bool "Operating Performance Point (OPP) Layer library"
|
||||
depends on PM
|
||||
depends on ARCH_HAS_OPP
|
||||
---help---
|
||||
SOCs have a standard set of tuples consisting of frequency and
|
||||
voltage pairs that the device will support per voltage domain. This
|
||||
|
||||
+28
-11
@@ -560,18 +560,8 @@ struct rq {
|
||||
|
||||
static DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
|
||||
|
||||
static inline
|
||||
void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags)
|
||||
{
|
||||
rq->curr->sched_class->check_preempt_curr(rq, p, flags);
|
||||
|
||||
/*
|
||||
* A queue event has occurred, and we're going to schedule. In
|
||||
* this case, we can save a useless back to back clock update.
|
||||
*/
|
||||
if (test_tsk_need_resched(p))
|
||||
rq->skip_clock_update = 1;
|
||||
}
|
||||
static void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags);
|
||||
|
||||
static inline int cpu_of(struct rq *rq)
|
||||
{
|
||||
@@ -2118,6 +2108,31 @@ static inline void check_class_changed(struct rq *rq, struct task_struct *p,
|
||||
p->sched_class->prio_changed(rq, p, oldprio, running);
|
||||
}
|
||||
|
||||
static void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags)
|
||||
{
|
||||
const struct sched_class *class;
|
||||
|
||||
if (p->sched_class == rq->curr->sched_class) {
|
||||
rq->curr->sched_class->check_preempt_curr(rq, p, flags);
|
||||
} else {
|
||||
for_each_class(class) {
|
||||
if (class == rq->curr->sched_class)
|
||||
break;
|
||||
if (class == p->sched_class) {
|
||||
resched_task(rq->curr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* A queue event has occurred, and we're going to schedule. In
|
||||
* this case, we can save a useless back to back clock update.
|
||||
*/
|
||||
if (test_tsk_need_resched(rq->curr))
|
||||
rq->skip_clock_update = 1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
* Is this task likely cache-hot:
|
||||
@@ -6960,6 +6975,8 @@ static void init_sched_groups_power(int cpu, struct sched_domain *sd)
|
||||
if (cpu != group_first_cpu(sd->groups))
|
||||
return;
|
||||
|
||||
sd->groups->group_weight = cpumask_weight(sched_group_cpus(sd->groups));
|
||||
|
||||
child = sd->child;
|
||||
|
||||
sd->groups->cpu_power = 0;
|
||||
|
||||
+31
-9
@@ -1654,12 +1654,6 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
|
||||
struct cfs_rq *cfs_rq = task_cfs_rq(curr);
|
||||
int scale = cfs_rq->nr_running >= sched_nr_latency;
|
||||
|
||||
if (unlikely(rt_prio(p->prio)))
|
||||
goto preempt;
|
||||
|
||||
if (unlikely(p->sched_class != &fair_sched_class))
|
||||
return;
|
||||
|
||||
if (unlikely(se == pse))
|
||||
return;
|
||||
|
||||
@@ -2035,13 +2029,16 @@ struct sd_lb_stats {
|
||||
unsigned long this_load_per_task;
|
||||
unsigned long this_nr_running;
|
||||
unsigned long this_has_capacity;
|
||||
unsigned int this_idle_cpus;
|
||||
|
||||
/* Statistics of the busiest group */
|
||||
unsigned int busiest_idle_cpus;
|
||||
unsigned long max_load;
|
||||
unsigned long busiest_load_per_task;
|
||||
unsigned long busiest_nr_running;
|
||||
unsigned long busiest_group_capacity;
|
||||
unsigned long busiest_has_capacity;
|
||||
unsigned int busiest_group_weight;
|
||||
|
||||
int group_imb; /* Is there imbalance in this sd */
|
||||
#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
|
||||
@@ -2063,6 +2060,8 @@ struct sg_lb_stats {
|
||||
unsigned long sum_nr_running; /* Nr tasks running in the group */
|
||||
unsigned long sum_weighted_load; /* Weighted load of group's tasks */
|
||||
unsigned long group_capacity;
|
||||
unsigned long idle_cpus;
|
||||
unsigned long group_weight;
|
||||
int group_imb; /* Is there an imbalance in the group ? */
|
||||
int group_has_capacity; /* Is there extra capacity in the group? */
|
||||
};
|
||||
@@ -2431,7 +2430,8 @@ static inline void update_sg_lb_stats(struct sched_domain *sd,
|
||||
sgs->group_load += load;
|
||||
sgs->sum_nr_running += rq->nr_running;
|
||||
sgs->sum_weighted_load += weighted_cpuload(i);
|
||||
|
||||
if (idle_cpu(i))
|
||||
sgs->idle_cpus++;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2469,6 +2469,7 @@ static inline void update_sg_lb_stats(struct sched_domain *sd,
|
||||
sgs->group_capacity = DIV_ROUND_CLOSEST(group->cpu_power, SCHED_LOAD_SCALE);
|
||||
if (!sgs->group_capacity)
|
||||
sgs->group_capacity = fix_small_capacity(sd, group);
|
||||
sgs->group_weight = group->group_weight;
|
||||
|
||||
if (sgs->group_capacity > sgs->sum_nr_running)
|
||||
sgs->group_has_capacity = 1;
|
||||
@@ -2576,13 +2577,16 @@ static inline void update_sd_lb_stats(struct sched_domain *sd, int this_cpu,
|
||||
sds->this_nr_running = sgs.sum_nr_running;
|
||||
sds->this_load_per_task = sgs.sum_weighted_load;
|
||||
sds->this_has_capacity = sgs.group_has_capacity;
|
||||
sds->this_idle_cpus = sgs.idle_cpus;
|
||||
} else if (update_sd_pick_busiest(sd, sds, sg, &sgs, this_cpu)) {
|
||||
sds->max_load = sgs.avg_load;
|
||||
sds->busiest = sg;
|
||||
sds->busiest_nr_running = sgs.sum_nr_running;
|
||||
sds->busiest_idle_cpus = sgs.idle_cpus;
|
||||
sds->busiest_group_capacity = sgs.group_capacity;
|
||||
sds->busiest_load_per_task = sgs.sum_weighted_load;
|
||||
sds->busiest_has_capacity = sgs.group_has_capacity;
|
||||
sds->busiest_group_weight = sgs.group_weight;
|
||||
sds->group_imb = sgs.group_imb;
|
||||
}
|
||||
|
||||
@@ -2860,8 +2864,26 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
|
||||
if (sds.this_load >= sds.avg_load)
|
||||
goto out_balanced;
|
||||
|
||||
if (100 * sds.max_load <= sd->imbalance_pct * sds.this_load)
|
||||
goto out_balanced;
|
||||
/*
|
||||
* In the CPU_NEWLY_IDLE, use imbalance_pct to be conservative.
|
||||
* And to check for busy balance use !idle_cpu instead of
|
||||
* CPU_NOT_IDLE. This is because HT siblings will use CPU_NOT_IDLE
|
||||
* even when they are idle.
|
||||
*/
|
||||
if (idle == CPU_NEWLY_IDLE || !idle_cpu(this_cpu)) {
|
||||
if (100 * sds.max_load <= sd->imbalance_pct * sds.this_load)
|
||||
goto out_balanced;
|
||||
} else {
|
||||
/*
|
||||
* This cpu is idle. If the busiest group load doesn't
|
||||
* have more tasks than the number of available cpu's and
|
||||
* there is no imbalance between this and busiest group
|
||||
* wrt to idle cpu's, it is balanced.
|
||||
*/
|
||||
if ((sds.this_idle_cpus <= sds.busiest_idle_cpus + 1) &&
|
||||
sds.busiest_nr_running <= sds.busiest_group_weight)
|
||||
goto out_balanced;
|
||||
}
|
||||
|
||||
force_balance:
|
||||
/* Looks like there is an imbalance. Compute it */
|
||||
|
||||
@@ -19,14 +19,14 @@ select_task_rq_stop(struct rq *rq, struct task_struct *p,
|
||||
static void
|
||||
check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
|
||||
{
|
||||
resched_task(rq->curr); /* we preempt everything */
|
||||
/* we're never preempted */
|
||||
}
|
||||
|
||||
static struct task_struct *pick_next_task_stop(struct rq *rq)
|
||||
{
|
||||
struct task_struct *stop = rq->stop;
|
||||
|
||||
if (stop && stop->state == TASK_RUNNING)
|
||||
if (stop && stop->se.on_rq)
|
||||
return stop;
|
||||
|
||||
return NULL;
|
||||
|
||||
+1
-1
@@ -702,7 +702,6 @@ static struct ctl_table kern_table[] = {
|
||||
.extra1 = &zero,
|
||||
.extra2 = &ten_thousand,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.procname = "dmesg_restrict",
|
||||
.data = &dmesg_restrict,
|
||||
@@ -712,6 +711,7 @@ static struct ctl_table kern_table[] = {
|
||||
.extra1 = &zero,
|
||||
.extra2 = &one,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.procname = "ngroups_max",
|
||||
.data = &ngroups_max,
|
||||
|
||||
@@ -126,7 +126,7 @@ if FTRACE
|
||||
config FUNCTION_TRACER
|
||||
bool "Kernel Function Tracer"
|
||||
depends on HAVE_FUNCTION_TRACER
|
||||
select FRAME_POINTER if (!ARM_UNWIND)
|
||||
select FRAME_POINTER if !ARM_UNWIND && !S390
|
||||
select KALLSYMS
|
||||
select GENERIC_TRACER
|
||||
select CONTEXT_SWITCH_TRACER
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <linux/writeback.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
Reference in New Issue
Block a user