All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Houston <jim.houston@comcast.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: hrtimer_start problem?
Date: Mon, 02 Apr 2007 15:01:09 -0400	[thread overview]
Message-ID: <1175540469.6299.84.camel@x2.site> (raw)

Hi Thomas,

The logic in hrtimer_start() which controls the reprogram argument
to enqueue_hrtimer() looks broken to me.  I assume that intent is
to set the hardware timer only if the hrtimer is being enqueued on
a local base.

The existing test "base == new_base" will skip programming the timer
if it was moved from another cpu.  Normally switch_hrtimer_base() will
find that the timer is already on the local base or will move the timer
to the local base.  In both of these cases it seems necessary to
program the timer.  The case where the timer should not be programmed
is if switch_hrtimer_base() failed to move the timer and it is
still associated with a non-local base.

There are two failure mechanisms.  The common case fails to
set the hardware timer even though the timer has been moved 
to the local base.  This would cause the hrtimer's expiry to
be delayed until the time when the hardware timer was currently
programmed to expire.  In the case where timer could not be moved,
we program the local timer using a mishmash of information from
the local and remote bases.

I ran into this with a Concurrent kernel based on your
patch-2.6.18-hrt-dyntick2.  I have checked that the logic is
still the same in kernel.org.


Jim Houston - Concurrent Computer Corp.


             reply	other threads:[~2007-04-02 19:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-02 19:01 Jim Houston [this message]
2007-04-02 19:41 ` hrtimer_start problem? Thomas Gleixner

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=1175540469.6299.84.camel@x2.site \
    --to=jim.houston@comcast.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.