* 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c
@ 2004-05-31 7:35 Keith Owens
2004-05-31 7:50 ` Zwane Mwaikambo
2004-05-31 7:50 ` Nick Piggin
0 siblings, 2 replies; 4+ messages in thread
From: Keith Owens @ 2004-05-31 7:35 UTC (permalink / raw)
To: linux-kernel
2.6.7-rc2 (and earlier) arch/i386/kernel/irq.c::do_IRQ() calls
irq_exit() which expands into preempt_enable_no_resched(), amongst
others. With CONFIG_PREEMPT=y, preempt_enable_no_resched() does
dec_preempt_count(). Where is the corresponding inc_preempt_count?
AFAICT the use of preempt_enable_no_resched() is unbalanced.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c
2004-05-31 7:35 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c Keith Owens
@ 2004-05-31 7:50 ` Zwane Mwaikambo
2004-05-31 7:56 ` Keith Owens
2004-05-31 7:50 ` Nick Piggin
1 sibling, 1 reply; 4+ messages in thread
From: Zwane Mwaikambo @ 2004-05-31 7:50 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel
On Mon, 31 May 2004, Keith Owens wrote:
> 2.6.7-rc2 (and earlier) arch/i386/kernel/irq.c::do_IRQ() calls
> irq_exit() which expands into preempt_enable_no_resched(), amongst
> others. With CONFIG_PREEMPT=y, preempt_enable_no_resched() does
> dec_preempt_count(). Where is the corresponding inc_preempt_count?
> AFAICT the use of preempt_enable_no_resched() is unbalanced.
I believe IRQ_EXIT_OFFSET takes care of that;
#define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#define irq_exit() \
do { \
preempt_count() -= IRQ_EXIT_OFFSET; \
if (!in_interrupt() && softirq_pending(smp_processor_id())) \
do_softirq(); \
preempt_enable_no_resched(); \
} while (0)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c
2004-05-31 7:35 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c Keith Owens
2004-05-31 7:50 ` Zwane Mwaikambo
@ 2004-05-31 7:50 ` Nick Piggin
1 sibling, 0 replies; 4+ messages in thread
From: Nick Piggin @ 2004-05-31 7:50 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel
Keith Owens wrote:
> 2.6.7-rc2 (and earlier) arch/i386/kernel/irq.c::do_IRQ() calls
> irq_exit() which expands into preempt_enable_no_resched(), amongst
> others. With CONFIG_PREEMPT=y, preempt_enable_no_resched() does
> dec_preempt_count(). Where is the corresponding inc_preempt_count?
> AFAICT the use of preempt_enable_no_resched() is unbalanced.
>
If preempt is enabled, IRQ_EXIT_OFFSET is HARDIRQ_OFFSET-1.
I believe that is where the preempt_enable_no_resched is balanced.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c
2004-05-31 7:50 ` Zwane Mwaikambo
@ 2004-05-31 7:56 ` Keith Owens
0 siblings, 0 replies; 4+ messages in thread
From: Keith Owens @ 2004-05-31 7:56 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: linux-kernel
On Mon, 31 May 2004 03:50:19 -0400 (EDT),
Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
>On Mon, 31 May 2004, Keith Owens wrote:
>
>> 2.6.7-rc2 (and earlier) arch/i386/kernel/irq.c::do_IRQ() calls
>> irq_exit() which expands into preempt_enable_no_resched(), amongst
>> others. With CONFIG_PREEMPT=y, preempt_enable_no_resched() does
>> dec_preempt_count(). Where is the corresponding inc_preempt_count?
>> AFAICT the use of preempt_enable_no_resched() is unbalanced.
>
>I believe IRQ_EXIT_OFFSET takes care of that;
>
>#define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
>
>#define irq_exit() \
>do { \
> preempt_count() -= IRQ_EXIT_OFFSET; \
> if (!in_interrupt() && softirq_pending(smp_processor_id())) \
> do_softirq(); \
> preempt_enable_no_resched(); \
>} while (0)
How ugly ....
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-05-31 7:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-31 7:35 2.6.7-rc2 mismatched preempt count in arch/i386/kernel/irq.c Keith Owens
2004-05-31 7:50 ` Zwane Mwaikambo
2004-05-31 7:56 ` Keith Owens
2004-05-31 7:50 ` Nick Piggin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox