mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Oleg OREL <oleg_orel@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux kernel preemption (kernel 2.6 of course)
Date: Sat, 8 Nov 2003 09:05:53 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.56.0311080808590.19316@earth> (raw)
In-Reply-To: <20031108012755.41882.qmail@web80007.mail.yahoo.com>


On Fri, 7 Nov 2003, Oleg OREL wrote:

> I was browsing linux kernel to undetsnand how kernel preemption does
> work. I was hacking around schedulee_tick and other functions called out
> of timer interrupt and was unable to found any call to schedule() or
> switch_to() to peempt currently running task, instead just mangling
> around current and inactive runqueues.

the timer interrupt indeed cannot reschedule because interrupt contexts
must never schedule. But the timer interrupt does have the ability to
reschedule the currently running task, via setting the 'need resched'
flag:

                set_tsk_need_resched(p);

this flag then gets detected by the entry.S 'return from interrupt' code
[right when the timer irq returns] which then calls schedule().

	ingo

  reply	other threads:[~2003-11-08  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20031108003029.BF9DB5F711@attila.bofh.it>
2003-11-08  1:27 ` Oleg OREL
2003-11-08  8:05   ` Ingo Molnar [this message]
2003-11-09  0:21   ` Robert Love

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=Pine.LNX.4.56.0311080808590.19316@earth \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg_orel@yahoo.com \
    /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®