lkml.org 
[lkml]   [2001]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: static scheduling - SCHED_IDLE?
Rik van Riel wrote:
> > Just raise the priority whenever the task's in kernel mode. Problem
> > solved.
>
> Remember that a task schedules itself out at the timer interrupt,
> in kernel/sched.c::schedule() ... which is kernel mode ;)

Even nicer. On x86 change this:

reschedule:
call SYMBOL_NAME(schedule) # test
jmp ret_from_sys_call

to this:

reschedule:
orl $PF_HONOUR_LOW_PRIORITY,flags(%ebx)
call SYMBOL_NAME(schedule) # test
andl $~PF_HONOUR_LOW_PRIORITY,flags(%ebx)
jmp ret_from_sys_call

(You get the idea; this isn't the best implementation).

I think this code can only be reached in two ways:

1. An interrupt, exception, page fault etc. that is returning to user space.
2. A system call, whatever space it's from.

In both these cases, no critical locks will be held, right?

-- Jamie
-
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 13:29    [W:0.134 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site