public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5: don't miss a preemption
Date: 15 Apr 2002 17:25:24 -0400	[thread overview]
Message-ID: <1018905925.3399.14.camel@phantasy> (raw)
In-Reply-To: <Pine.LNX.4.21.0204152144320.1833-100000@localhost.localdomain>

On Mon, 2002-04-15 at 16:50, Hugh Dickins wrote:

> On 15 Apr 2002, Robert Love wrote:
> > 
> > This patch checks for need_resched in preempt_schedule after setting
> > preempt_count back to zero, before returning.  The overhead is
> > negligible and it is crucial to never miss a preemption opportunity.
> 
> I'm curious: why is it crucial to never miss a preemption opportunity?

Two main reasons:

(1) In 2.5, we have a kernel preemption model that makes the
    fully preemptible, subject to SMP locking constraints and
    a few other rules.  Without this patch, we break this model
    and do not allow preemption when it is in fact legal.

(2) Like I said, it may be awhile before we can preempt again.
    If we take a lock after return from schedule but before the
    next interrupt, it can be many tens (or hundreds) of milliseconds
    before we release the lock and subsequently preempt.  If
    need_resched was set in response to an important real-time
    application, the wait can be detrimental.  Servicing apps
    as soon as they become runnable is the point of preempt-kernel,
    anyhow.

It is not crucial in the sense we break anything; merely that we are
working toward providing very efficient response and dispatch to
interactive and real-time applications and we _must_ respond to them as
soon as possible.

	Robert Love



      reply	other threads:[~2002-04-15 21:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-15 19:58 [PATCH] 2.5: don't miss a preemption Robert Love
2002-04-15 20:50 ` Hugh Dickins
2002-04-15 21:25   ` Robert Love [this message]

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=1018905925.3399.14.camel@phantasy \
    --to=rml@tech9.net \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /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