lkml.org 
[lkml]   [2004]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-audio-dev] Re: [announce] [patch] Voluntary Kernel Preemption Patch
On Tue, Jul 13, 2004 at 03:25:32PM -0700, Andrew Morton wrote:
> local_irq_disable();
> <fiddle with per-cpu stuff>
> function_which_calls_cond_resched();
> <fiddle with per-cpu stuff>
> local_irq_enable();
>
> then we want might_sleep() to warn about the bug.

might_sleep currently _doesn't_ warn about any bug in the above case I
quoted.

the kmalloc example is trapped instead.

From my part I don't like anybody to call schedule with irq disabled
(and I would definitely put a debug check in schedule() for that, guess
how I found about the missing sti in entry.S btw). But if you are ok
with people calling schedule with irq disabled then I cannot put a check
in there. sti doesn't cost that much, and the work-to-do and sched_yield
paths are _never_ fast paths, so they don't worth an hack like that.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.114 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site