Skip to contentSkip to conversation

2.6.6-mm2

DISCUSSION Oleg Nesterov 3 participants 3 messages May 13, 2004 – May 14, 2004

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 7 lines · Andrew Morton

+yield_irq.patch

From: Nick Piggin

this_rq_lock does a local_irq_disable, and sched_yield() needs to undo that.

I beleive it is safe to enter schedule() with interrupts disabled. schedule() does spin_lock_irq()->local_irq_disable() anyway.

Could you please explain, why it is needed?

Oleg.

#1 lore raw
Quoted 7 lines · Oleg Nesterov

Hello.

Quoted 3 lines · Andrew Morton

+yield_irq.patch

Quoted 8 lines
Quoted 4 lines

From: Nick Piggin

this_rq_lock does a local_irq_disable, and sched_yield() needs to undo that.

I beleive it is safe to enter schedule() with interrupts disabled. schedule() does spin_lock_irq()->local_irq_disable() anyway.

True.

Quoted 2 lines

Could you please explain, why it is needed?

It was triggering false positives during debugging of the x86_64 gcc-3.3.3 problem and it's just a tidiness thing, really.

#2 lore raw
In reply to Oleg Nesterov
Quoted 12 lines · Oleg Nesterov

Hello.

Quoted 6 lines · Andrew Morton

+yield_irq.patch

From: Nick Piggin

this_rq_lock does a local_irq_disable, and sched_yield() needs to undo that.

Quoted 6 lines

I beleive it is safe to enter schedule() with interrupts disabled. schedule() does spin_lock_irq()->local_irq_disable() anyway.

Could you please explain, why it is needed?

It is safe to enter schedule() with interrupts disabled. I found this "problem" while searching for something else in sched.c

For consistency it is a good thing to do, however I would be just as happy with a 1 line comment instead. Ingo what do you prefer?