public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390 (9/9): no timer interrupts in idle.
Date: Thu, 22 Apr 2004 13:14:24 +0200	[thread overview]
Message-ID: <20040422111424.GC27339@devserv.devel.redhat.com> (raw)
In-Reply-To: <OF2D677553.6D72A833-ONC1256E7E.003D0651-C1256E7E.003D4886@de.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]

On Thu, Apr 22, 2004 at 01:09:22PM +0200, Martin Schwidefsky wrote:
> 
> 
> 
> 
> > why? Most hardware have an alternative time source for such time stamps.
> > Timer events *won't* be delivered too late, simply *because* the timer
> said
> > "don't bother checking back for X amount of time", so when that time has
> > expired (eg the delay) then the timer comparison tells the kernel "ok
> this
> > one is due now".
> 
> Huh? You lost me there. The HZ timer is the interrupt that will trigger the
> execution of a timer event. If you say "don't bother checking back for X
> amount of time" the cpu stays in idle doing nothing. You won't get control
> to execute the timer event.

ok maybe I need to word it differently.
What I'm proposing as alternative is using the one shot mode of the timers
on most machines to do teh following:
when the timer irq hits, you do the business you need to do. And then you
check all existing timers and the scheduler when the next "virtual tick" is where
you're going to do real work. You then set the one-shot counter to that
amount. This means that in add_timer/mod_timer you will need to check if the
just added timer is before the current one-shot runs out, and if so, adjust
it. Perhaps in the scheduler too.

You *do* get back control to do the timer event, due to the one-shot timer
firing at just the right time. And this works regardless of the cpu being
idle or not, so it also wins back that 1% performance cost to HPC that
HC=1000 has etc etc because you just don't do irq's until the HPC task runs
out of it's timeslice.

You can go even a step further and introduce another request_irq flag that
makes the irq subsystem treat such marked irqs as if they were timer irqs,
eg run the timerlist and then set a new mark. That way you may even be able
to do the timers before the actual timer IRQ hits and thus avoiding it (this
does mean setting the timer IRQ to somewhat after the optimal time in order
to have a window for this to happen).


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-04-22 11:15 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-22 11:09 [PATCH] s390 (9/9): no timer interrupts in idle Martin Schwidefsky
2004-04-22 11:14 ` Arjan van de Ven [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-29  8:24 Martin Schwidefsky
2004-04-29 12:06 ` Dipankar Sarma
2004-04-29  7:43 Martin Schwidefsky
2004-04-29  8:16 ` Dipankar Sarma
2004-04-23  8:48 Martin Schwidefsky
2004-04-22 14:56 Martin Schwidefsky
2004-04-28 19:07 ` Dipankar Sarma
2004-04-22 12:44 Martin Schwidefsky
2004-04-22 13:11 ` Arjan van de Ven
2004-04-23  3:32 ` George Anzinger
2004-04-22 12:14 Martin Schwidefsky
2004-04-22 12:25 ` Arjan van de Ven
2004-04-22 10:53 Martin Schwidefsky
2004-04-22 10:56 ` Arjan van de Ven
2004-04-22  8:55 Martin Schwidefsky
2004-04-22  8:48 Martin Schwidefsky
2004-04-22  8:52 ` Arjan van de Ven
     [not found] <1Nt5d-84u-3@gated-at.bofh.it>
     [not found] ` <1NwPD-2RW-37@gated-at.bofh.it>
     [not found]   ` <1NwPE-2RW-39@gated-at.bofh.it>
     [not found]     ` <1Nx8Y-3ev-15@gated-at.bofh.it>
2004-04-21 22:38       ` Andi Kleen
2004-04-21 18:52 Martin Schwidefsky
2004-04-21 21:58 ` Dipankar Sarma
2004-04-21 16:37 Martin Schwidefsky
2004-04-21 20:43 ` Dipankar Sarma
2004-04-21 20:46   ` Christoph Hellwig
2004-04-21 21:01     ` Dipankar Sarma
2004-04-21 16:31 Martin Schwidefsky
2004-04-21 16:32 ` Christoph Hellwig
2004-04-21 14:49 Martin Schwidefsky
2004-04-21 15:31 ` Christoph Hellwig
2004-04-22  8:02 ` Arjan van de Ven

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=20040422111424.GC27339@devserv.devel.redhat.com \
    --to=arjanv@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.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