Merge branches 'core-fixes-for-linus', 'perf-fixes-for-linus', 'sched-fixes-for-linus', 'timer-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: futex: Set FLAGS_HAS_TIMEOUT during futex_wait restart setup * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf_event: Fix cgrp event scheduling bug in perf_enable_on_exec() perf: Fix a build error with some GCC versions * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix erroneous all_pinned logic sched: Fix sched-domain avg_load calculation * 'timer-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: RTC: rtc-mrst: follow on to the change of rtc_device_register() RTC: add missing "return 0" in new alarm func for rtc-bfin.c RTC: Fix s3c compile error due to missing s3c_rtc_setpie RTC: Fix early irqs caused by calling rtc_set_alarm too early * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, amd: Disable GartTlbWlkErr when BIOS forgets it x86, NUMA: Fix fakenuma boot failure x86/mrst: Fix boot crash caused by incorrect pin to irq mapping x86/ce4100: Add reg property to bridges
This commit is contained in:
@@ -1886,7 +1886,7 @@ retry:
|
||||
restart->futex.val = val;
|
||||
restart->futex.time = abs_time->tv64;
|
||||
restart->futex.bitset = bitset;
|
||||
restart->futex.flags = flags;
|
||||
restart->futex.flags = flags | FLAGS_HAS_TIMEOUT;
|
||||
|
||||
ret = -ERESTART_RESTARTBLOCK;
|
||||
|
||||
|
||||
@@ -364,6 +364,7 @@ void perf_cgroup_switch(struct task_struct *task, int mode)
|
||||
}
|
||||
|
||||
if (mode & PERF_CGROUP_SWIN) {
|
||||
WARN_ON_ONCE(cpuctx->cgrp);
|
||||
/* set cgrp before ctxsw in to
|
||||
* allow event_filter_match() to not
|
||||
* have to pass task around
|
||||
@@ -2423,6 +2424,14 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
|
||||
if (!ctx || !ctx->nr_events)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* We must ctxsw out cgroup events to avoid conflict
|
||||
* when invoking perf_task_event_sched_in() later on
|
||||
* in this function. Otherwise we end up trying to
|
||||
* ctxswin cgroup events which are already scheduled
|
||||
* in.
|
||||
*/
|
||||
perf_cgroup_sched_out(current);
|
||||
task_ctx_sched_out(ctx, EVENT_ALL);
|
||||
|
||||
raw_spin_lock(&ctx->lock);
|
||||
@@ -2447,6 +2456,9 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
|
||||
|
||||
raw_spin_unlock(&ctx->lock);
|
||||
|
||||
/*
|
||||
* Also calls ctxswin for cgroup events, if any:
|
||||
*/
|
||||
perf_event_context_sched_in(ctx, ctx->task);
|
||||
out:
|
||||
local_irq_restore(flags);
|
||||
|
||||
@@ -2104,21 +2104,20 @@ balance_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest,
|
||||
enum cpu_idle_type idle, int *all_pinned,
|
||||
int *this_best_prio, struct cfs_rq *busiest_cfs_rq)
|
||||
{
|
||||
int loops = 0, pulled = 0, pinned = 0;
|
||||
int loops = 0, pulled = 0;
|
||||
long rem_load_move = max_load_move;
|
||||
struct task_struct *p, *n;
|
||||
|
||||
if (max_load_move == 0)
|
||||
goto out;
|
||||
|
||||
pinned = 1;
|
||||
|
||||
list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) {
|
||||
if (loops++ > sysctl_sched_nr_migrate)
|
||||
break;
|
||||
|
||||
if ((p->se.load.weight >> 1) > rem_load_move ||
|
||||
!can_migrate_task(p, busiest, this_cpu, sd, idle, &pinned))
|
||||
!can_migrate_task(p, busiest, this_cpu, sd, idle,
|
||||
all_pinned))
|
||||
continue;
|
||||
|
||||
pull_task(busiest, p, this_rq, this_cpu);
|
||||
@@ -2153,9 +2152,6 @@ out:
|
||||
*/
|
||||
schedstat_add(sd, lb_gained[idle], pulled);
|
||||
|
||||
if (all_pinned)
|
||||
*all_pinned = pinned;
|
||||
|
||||
return max_load_move - rem_load_move;
|
||||
}
|
||||
|
||||
@@ -3127,6 +3123,8 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
|
||||
if (!sds.busiest || sds.busiest_nr_running == 0)
|
||||
goto out_balanced;
|
||||
|
||||
sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr;
|
||||
|
||||
/*
|
||||
* If the busiest group is imbalanced the below checks don't
|
||||
* work because they assumes all things are equal, which typically
|
||||
@@ -3151,7 +3149,6 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
|
||||
* Don't pull any tasks if this group is already above the domain
|
||||
* average load.
|
||||
*/
|
||||
sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr;
|
||||
if (sds.this_load >= sds.avg_load)
|
||||
goto out_balanced;
|
||||
|
||||
@@ -3340,6 +3337,7 @@ redo:
|
||||
* still unbalanced. ld_moved simply stays zero, so it is
|
||||
* correctly treated as an imbalance.
|
||||
*/
|
||||
all_pinned = 1;
|
||||
local_irq_save(flags);
|
||||
double_rq_lock(this_rq, busiest);
|
||||
ld_moved = move_tasks(this_rq, this_cpu, busiest,
|
||||
|
||||
Reference in New Issue
Block a user