Re: [linux-audio-dev] Re: [announce] [patch] Voluntary Kernel Preemption Patch

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Re: [announce] [patch] Voluntary Kernel Preemption Patch
From: Andrea Arcangeli (andrea_AT_suse.de)
Date: Wed Jul 14 2004 - 01:01:03 EEST


On Tue, Jul 13, 2004 at 02:54:24PM -0700, Andrew Morton wrote:
> Confused. Where do we call cond_resched() with local interrupts disabled?

there are a lot of cond_resched, we might be calling it with irq
disabled, nobody ever did a might_sleep in the fast path of
cond_resched. And even if nobody does, if entry.S and sched_yield can
optimize, then everybody else can optimize too. It's not like that
entry.S is a piece of scheduler internal that will be obviously modified
if we modify the scheduler. so if you intend to leave those two there's
no point to forbid others to optimize, and there's no might_sleep in
current cond_resched anyways so you're already allowing people to
optimize and I want to allow it still after I add might_sleep there.

> Sleeping with local interrupts disabled is usually a bug, so we should
> prefer to keep that check in might_sleep().

either it's _always_ a bug including for entry.S or sched_yield, or it's
_never_ a bug. I don't understand the "usually".


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jul 14 2004 - 20:55:35 EEST