an early patch for x86_64 preempt-rt kernel cause more __might_sleep warnings
2008/6/30 John Blackwood <[email protected]>:
Quoted 36 lines
Quoted 30 lines
Subject: Re: [patch][RFC] an early patch for
x86_64preempt-rt kernel cause more__might_sleepwarnings
From: hyl <[email protected]>
Date: Wed, 25 Jun 2008 22:38:50 -0400
To: "Blackwood, John" <[email protected]>Quoted 18 lines
Quoted 18 lines
------------------------------ ------------------------------
Subject: Re: your
x86_64IST stack preempt rt patch
From: Andi Kleen <[email protected]>
Date: Wed, 25 Jun 2008 03:36:33 -0400
To: "Blackwood, John" <[email protected]>This patch changes these traps instead to always switch to the process stack when the trap originated from user mode. For kernel traps it keeps running non preemptive on the IST stack because that is much safer (e.g. to still get nmi watchdog events out even when the process stack is corrupted)
Strictly the change would have been only needed for debug and int3, but since they share this code as macros it was cleanest to just change all.
Quoted 5 lines
Quoted 5 lines
Additional (small) benefit is less preemption latency in these exception cases. This will also likely help preempt-RT kernels a bit because those are more likely to take sleeping locks even in these cases.
Quoted 3 lines
But with this fix, we still run do_debug/.. on IST when the 'interrupt' occur from kernel space, so the warning message will come out again, right?
that seems correct to me.
Quoted 8 lines
Quoted 1 line
but i don't have a scenario to proof this.
i think that using something like kgdb or kdb kernel debuggers would end up causing this situation.
or using ptrace from user space to set up a debug register to point to some kernel address as a breakpoint or watchpoint (this wouldn't be something that people would usually want to do though).
yeah, but there is no patch try to fix it, do you found one ?