mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Rumpf <prumpf@mandrakesoft.com>
To: Jamie Lokier <lk@tantalophile.demon.co.uk>
Cc: Rik van Riel <riel@conectiva.com.br>,
	Boris Dragovic <lynx@falcon.etf.bg.ac.yu>,
	Oswald Buddenhagen <ob6@inf.tu-dresden.de>,
	linux-kernel@vger.kernel.org
Subject: Re: static scheduling - SCHED_IDLE?
Date: Wed, 14 Mar 2001 08:26:03 -0600	[thread overview]
Message-ID: <20010314082603.A29144@mandrakesoft.mandrakesoft.com> (raw)
In-Reply-To: <20010309204243.E13320@pcep-jamie.cern.ch> <Pine.LNX.4.33.0103100001200.2283-100000@duckman.distro.conectiva> <20010309210913.F13320@pcep-jamie.cern.ch>
In-Reply-To: <20010309210913.F13320@pcep-jamie.cern.ch>; from Jamie Lokier on Fri, Mar 09, 2001 at 09:09:13PM +0100

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 ...

  parent reply	other threads:[~2001-03-14 14:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-07 17:40 Oswald Buddenhagen
2001-03-07 18:04 ` Rik van Riel
2001-03-07 19:20   ` Oswald Buddenhagen
2001-03-07 21:34     ` ludovic
2001-03-08 11:17       ` Zdenek Kabelac
2001-03-08 11:41         ` Andrew Morton
2001-03-08 13:29     ` Boris Dragovic
2001-03-08 13:44       ` Rik van Riel
2001-03-08 20:19         ` Boris Dragovic
2001-03-08 20:47           ` Rik van Riel
2001-03-09 19:38             ` george anzinger
2001-03-09 20:19               ` Adrian Cox
2001-03-12 18:05                 ` Jamie Lokier
2001-03-12 19:37                   ` Adrian Cox
2001-03-13  9:40                     ` Jamie Lokier
2001-03-10  2:58               ` Rik van Riel
2001-03-09 19:42             ` Jamie Lokier
2001-03-10  3:02               ` Rik van Riel
2001-03-09 20:09                 ` Jamie Lokier
2001-03-10  4:56                   ` Rik van Riel
2001-03-14 13:19                     ` Jamie Lokier
2001-03-15  3:13                       ` Rik van Riel
2001-03-14 14:26                   ` Philipp Rumpf [this message]
2001-03-09 11:26       ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010314082603.A29144@mandrakesoft.mandrakesoft.com \
    --to=prumpf@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@tantalophile.demon.co.uk \
    --cc=lynx@falcon.etf.bg.ac.yu \
    --cc=ob6@inf.tu-dresden.de \
    --cc=riel@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®