Thread (8 messages) 8 messages, 2 authors, 2012-01-27

Re: [PATCH RT 1/2 v2] x86: Do not disable preemption in int3 on 32bit

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2012-01-26 13:33:36
Also in: lkml

On Thu, 2012-01-26 at 17:39 +0900, Masami Hiramatsu wrote:
(2012/01/25 23:32), Steven Rostedt wrote:
quoted
Preemption must be disabled before enabling interrupts in do_trap
on x86_64 because the stack in use for int3 and debug is a per CPU
stack set by th IST. But in 32bit, the stack still belongs to the
current task and there is no problem in scheduling out the task.

Keep preemption enabled on X86_32 when enabling interrupts for
do_trap().

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Hmm, I think you'd better change caller side, because the
function itself has "preempt" in its name. I think it can
easily mislead other people.
How about if we rename it to

conditional_preempt_sti/cli() ?

Then it can be both a conditional preempt as well as interrupts being
disabled. The condition on preempt is "is 32 bits? don't preempt :
preempt";

-- Steve

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help