Re: [patch][RFC] an early patch for x86_64 preempt-rt kernel cause more __might_sleep warnings

From: hyl
Date: Mon Jun 30 2008 - 22:34:00 EST


2008/6/30 John Blackwood <john.blackwood@xxxxxxxx>:
>> Subject: Re: [patch][RFC] an early patch for x86_64 preempt-rt kernel
>> cause more __might_sleep warnings
>> From: hyl <heyongli@xxxxxxxxx>
>> Date: Wed, 25 Jun 2008 22:38:50 -0400
>> To: "Blackwood, John" <john.blackwood@xxxxxxxx>
>>
>> > > ------------------------------ ------------------------------
>> > >
>> > > Subject: Re: your x86_64 IST stack preempt rt patch
>> > > From: Andi Kleen <andi@xxxxxxxxxxxxxx>
>> > > Date: Wed, 25 Jun 2008 03:36:33 -0400
>> > > To: "Blackwood, John" <john.blackwood@xxxxxxxx>
>> > >
>> > >
>> > > 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.
>> > >
>> > > 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.
>> > >
>>
>> 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.
>
>> 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 ?
>
>
>
>
>
--
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/