Messages in this thread | | | Date | Wed, 14 Mar 2001 08:26:03 -0600 | From | Philipp Rumpf <> | Subject | Re: static scheduling - SCHED_IDLE? |
| |
On Fri, Mar 09, 2001 at 09:09:13PM +0100, Jamie Lokier wrote: > 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).
A few months ago, I implemented preemptible kernel threads (locally; I tend to think the other patches are superior). Part of the changes was to separate schedule into __schedule() (common part), schedule_user() (automatic schedule from entry.S) and schedule() (manual schedule in kernel space); besides making what Jamie proposed easier, we can also save a few cycles in the (common) schedule_user case:
- we never release the kernel lock - we can pass current to schedule_user - we just handled softirqs
this is 2.5 material though ... - 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/
| |