Re: [PATCHv11 2.6.36-rc2-tip 3/15] 3: uprobes: Slot allocationfor Execution out of line(XOL)
From: Peter Zijlstra
Date: Mon Sep 06 2010 - 14:20:47 EST
On Mon, 2010-09-06 at 23:29 +0530, Srikar Dronamraju wrote:
>
> Lets say the thread while singlestepping the process gets
> pre-empted. Eventually the cpu might run some other thread of the same
> process before picking the first run thread. Or the first run
> thread could after migration due to load balancing or whatever end up
> running on a different thread? How do we handle these cases?
So assuming we're preempted while the IP is inside the slot:
On the preempt-out we store the slot relative ip (ip - start_of_slot),
on preempt-in we write the replacement instructions in our cpu slot
(could be the same cpu, could be another) and re-position the ip to
point to the same relative position inside that slot, then go!
It really doesn't matter what happens in between.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/