Merge commit 'v2.6.39-rc4' into sched/core
Merge reason: Pick up upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
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);
|
||||
|
||||
@@ -217,11 +217,14 @@ static int alloc_pidmap(struct pid_namespace *pid_ns)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int next_pidmap(struct pid_namespace *pid_ns, int last)
|
||||
int next_pidmap(struct pid_namespace *pid_ns, unsigned int last)
|
||||
{
|
||||
int offset;
|
||||
struct pidmap *map, *end;
|
||||
|
||||
if (last >= PID_MAX_LIMIT)
|
||||
return -1;
|
||||
|
||||
offset = (last + 1) & BITS_PER_PAGE_MASK;
|
||||
map = &pid_ns->pidmap[(last + 1)/BITS_PER_PAGE];
|
||||
end = &pid_ns->pidmap[PIDMAP_ENTRIES];
|
||||
|
||||
@@ -4218,7 +4218,7 @@ need_resched:
|
||||
*/
|
||||
if (blk_needs_flush_plug(prev)) {
|
||||
raw_spin_unlock(&rq->lock);
|
||||
blk_flush_plug(prev);
|
||||
blk_schedule_flush_plug(prev);
|
||||
raw_spin_lock(&rq->lock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,29 +850,21 @@ static void blk_add_trace_plug(void *ignore, struct request_queue *q)
|
||||
__blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL);
|
||||
}
|
||||
|
||||
static void blk_add_trace_unplug_io(void *ignore, struct request_queue *q)
|
||||
static void blk_add_trace_unplug(void *ignore, struct request_queue *q,
|
||||
unsigned int depth, bool explicit)
|
||||
{
|
||||
struct blk_trace *bt = q->blk_trace;
|
||||
|
||||
if (bt) {
|
||||
unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE];
|
||||
__be64 rpdu = cpu_to_be64(pdu);
|
||||
__be64 rpdu = cpu_to_be64(depth);
|
||||
u32 what;
|
||||
|
||||
__blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_IO, 0,
|
||||
sizeof(rpdu), &rpdu);
|
||||
}
|
||||
}
|
||||
if (explicit)
|
||||
what = BLK_TA_UNPLUG_IO;
|
||||
else
|
||||
what = BLK_TA_UNPLUG_TIMER;
|
||||
|
||||
static void blk_add_trace_unplug_timer(void *ignore, struct request_queue *q)
|
||||
{
|
||||
struct blk_trace *bt = q->blk_trace;
|
||||
|
||||
if (bt) {
|
||||
unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE];
|
||||
__be64 rpdu = cpu_to_be64(pdu);
|
||||
|
||||
__blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_TIMER, 0,
|
||||
sizeof(rpdu), &rpdu);
|
||||
__blk_add_trace(bt, 0, 0, 0, what, 0, sizeof(rpdu), &rpdu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1015,9 +1007,7 @@ static void blk_register_tracepoints(void)
|
||||
WARN_ON(ret);
|
||||
ret = register_trace_block_plug(blk_add_trace_plug, NULL);
|
||||
WARN_ON(ret);
|
||||
ret = register_trace_block_unplug_timer(blk_add_trace_unplug_timer, NULL);
|
||||
WARN_ON(ret);
|
||||
ret = register_trace_block_unplug_io(blk_add_trace_unplug_io, NULL);
|
||||
ret = register_trace_block_unplug(blk_add_trace_unplug, NULL);
|
||||
WARN_ON(ret);
|
||||
ret = register_trace_block_split(blk_add_trace_split, NULL);
|
||||
WARN_ON(ret);
|
||||
@@ -1032,8 +1022,7 @@ static void blk_unregister_tracepoints(void)
|
||||
unregister_trace_block_rq_remap(blk_add_trace_rq_remap, NULL);
|
||||
unregister_trace_block_bio_remap(blk_add_trace_bio_remap, NULL);
|
||||
unregister_trace_block_split(blk_add_trace_split, NULL);
|
||||
unregister_trace_block_unplug_io(blk_add_trace_unplug_io, NULL);
|
||||
unregister_trace_block_unplug_timer(blk_add_trace_unplug_timer, NULL);
|
||||
unregister_trace_block_unplug(blk_add_trace_unplug, NULL);
|
||||
unregister_trace_block_plug(blk_add_trace_plug, NULL);
|
||||
unregister_trace_block_sleeprq(blk_add_trace_sleeprq, NULL);
|
||||
unregister_trace_block_getrq(blk_add_trace_getrq, NULL);
|
||||
|
||||
Reference in New Issue
Block a user