public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Jamie Lokier <lk@tantalophile.demon.co.uk>
Cc: Pavel Machek <pavel@suse.cz>,
	high-res-timers-discourse@lists.sourceforge.net,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
	David Schleef <ds@schleef.org>, Mark Salisbury <mbs@mc.com>,
	Jeff Dike <jdike@karaya.com>,
	schwidefsky@de.ibm.com, linux-kernel@vger.kernel.org,
	Andrew Morton <andrewm@uow.edu.au>
Subject: Re: No 100 HZ timer !
Date: Tue, 14 Aug 2001 09:57:07 -0700	[thread overview]
Message-ID: <3B795863.863780AC@mvista.com> (raw)
In-Reply-To: <20010410193521.A21133@pcep-jamie.cern.ch> <E14n2hi-0004ma-00@the-village.bc.nu> <20010410202416.A21512@pcep-jamie.cern.ch> <3AD35EFB.40ED7810@mvista.com> <3B675682.3CE51A3D@mvista.com> <20010811115737.B35@toy.ucw.cz> <20010814165951.A4935@thefinal.cern.ch>

Jamie Lokier wrote:
> 
> Pavel Machek wrote:
> > > The testing I have done seems to indicate a lower overhead on a lightly
> > > loaded system, about the same overhead with some load, and much more
> > > overhead with a heavy load.  To me this seems like the wrong thing to
> > > do.  We would like as nearly a flat overhead to load curve as we can get
> >
> > Why? Higher overhead is a price for better precision timers. If you rounded
> > all times in "tickless" mode, you'd get about same overhead, right?
> 
> What Pavel says is true only if the data structure for holding pending
> timers degrades into good O(1) insertion & deletion time in the tickless case.
> 
> I recall George Anzinger saying something about the current ticked
> scheduler being able to insert timers that never reach expiry very
> efficiently (simply a list insert + delete), whereas the current
> tickless code could not do that.
> 
> Is that right?  Is it the data structure that is taking too long to
> process, when many timers that do not reach expiry are inserted?  There
> would be one such insertion and deletion on every context switch, right?

No.  It is not the data structure.  I did not change it for the
experimental code.  This, of course, could lead to some additional
overhead looking up the next timer to figure when the next interrupt is
needed.  I used the code from the IBM tick less patch which did a brute
force search.  In actual fact this is not too bad as I also force a
timer every second, so at most ten lists need to be examined.  The
instrumentation on this look up hardly shows up, and of course, it is
only needed after an interrupt.

The overhead comes from setting up a timer for the "slice" on every
schedule.  Schedule(), in a busy system, gets called often, and "slices"
do not often expire.  The other issue is additional overhead for the
jiffie (which is a function).  On review of this code, I see that it
needs to protect it self from interrupt, so as written in the
experimental code, it is wrong and could loose track of time (however,
it is faster as written).  Now neither of these operations take very
long, it is just that they are called every schedule, which is called
often enough to make a difference.  Those who optimized the scheduler
with gotos and such knew what they were doing!  It is a function that is
called enough to make the optimization worth while.

For those who would like to try the experimental system it can be found
at:
http://sourceforge.net/projects/high-res-timers
where it is called the "no HZ tick test".  Do read the release notes to
understand what you are getting.

George

  reply	other threads:[~2001-08-14 19:21 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-09 15:54 No 100 HZ timer ! schwidefsky
2001-04-09 18:30 ` Jeff Dike
2001-04-09 18:19   ` Mark Salisbury
2001-04-09 20:12     ` Alan Cox
2001-04-09 20:32       ` Mark Salisbury
2001-04-09 22:31       ` Mikulas Patocka
2001-04-09 22:35         ` Alan Cox
2001-04-10 11:43           ` David Schleef
2001-04-10 12:04             ` Mikulas Patocka
2001-04-10 12:31               ` David Schleef
2001-04-10 12:34                 ` Mark Salisbury
2001-04-10 14:10                 ` Mikulas Patocka
2001-04-10 13:35                   ` root
2001-04-10 14:22                   ` Andi Kleen
2001-04-10 15:43                   ` Alan Cox
2001-04-12  5:25                     ` watermodem
2001-04-12  8:45                       ` Jamie Lokier
2001-04-10 17:15                   ` Jamie Lokier
2001-04-10 17:27                     ` Alan Cox
2001-04-10 17:35                       ` Jamie Lokier
2001-04-10 18:17                         ` Alan Cox
2001-04-10 18:24                           ` Jamie Lokier
2001-04-10 19:28                             ` george anzinger
2001-04-10 20:02                               ` mark salisbury
2001-04-10 22:08                                 ` george anzinger
2001-04-11  0:48                                   ` Mark Salisbury
2001-04-11  2:35                                     ` george anzinger
2001-04-12  0:24                                       ` Mark Salisbury
2001-04-11 16:11                                     ` Jamie Lokier
2001-04-11 16:59                                       ` george anzinger
2001-04-11 18:57                                         ` Jamie Lokier
2001-04-11 19:21                                           ` John Alvord
2001-04-12  8:41                                             ` Jamie Lokier
2001-08-01  1:08                               ` george anzinger
2001-08-11 11:57                                 ` Pavel Machek
2001-08-14 15:59                                   ` Jamie Lokier
2001-08-14 16:57                                     ` george anzinger [this message]
2001-04-10 19:50                             ` Zdenek Kabelac
2001-04-11 11:42                               ` Maciej W. Rozycki
2001-04-11 16:13                                 ` Jamie Lokier
2001-04-12  9:51                                   ` Maciej W. Rozycki
2001-04-10 19:42                       ` Zdenek Kabelac
2001-04-10 12:19             ` Mark Salisbury
2001-04-10 17:51             ` yodaiken
2001-04-11 18:43           ` Oliver Xymoron
2001-04-10 12:11       ` Mark Salisbury
2001-04-10  5:51     ` Andi Kleen
2001-04-10  9:33       ` Martin Mares
2001-04-10 10:00         ` Albert D. Cahalan
2001-04-10 12:14         ` Mark Salisbury
2001-04-11  5:55           ` Karim Yaghmour
2001-04-10 11:18       ` Alan Cox
2001-04-10 12:02         ` Andi Kleen
2001-04-10 12:12           ` Alan Cox
2001-04-10 12:27             ` Mark Salisbury
2001-04-10 12:32             ` Andi Kleen
2001-04-10 12:36               ` Alan Cox
2001-04-10 12:37                 ` Andi Kleen
2001-04-10 18:45               ` Stephen D. Williams
2001-04-10 19:59                 ` Andi Kleen
2001-04-10 12:07       ` Mark Salisbury
2001-04-10 12:45         ` Andi Kleen
2001-04-10 12:42           ` Mark Salisbury
2001-04-10 12:54             ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2001-04-10  7:27 schwidefsky
2001-04-10  7:29 schwidefsky
2001-04-10 11:38 schwidefsky
2001-04-10 11:54 ` Alan Cox
2001-04-10 12:54 schwidefsky
2001-04-10 14:42 schwidefsky
2001-04-11  9:06 schwidefsky
2001-04-11 17:56 No 100 HZ timer! Bret Indrelee
2001-04-12 17:39 ` george anzinger
2001-04-12 21:19   ` Bret Indrelee
2001-04-12 22:20     ` george anzinger
2001-04-13  4:00       ` Bret Indrelee
2001-04-13  6:32         ` Ben Greear
2001-04-13  8:42           ` george anzinger
2001-04-13 10:36             ` Jamie Lokier
2001-04-13 16:07               ` george anzinger
2001-04-13 23:00                 ` Jamie Lokier
2001-04-13 12:05           ` Horst von Brand
2001-04-13 21:53             ` george anzinger
2001-04-13 23:10               ` Jamie Lokier
2001-04-16  3:02                 ` Ben Greear
2001-04-16  2:46                   ` Jamie Lokier
2001-04-16 12:36                     ` Mark Salisbury
2001-04-16 19:19                       ` george anzinger
2001-04-16 20:45                         ` Albert D. Cahalan
2001-04-16 21:29                           ` Chris Wedgwood
2001-04-16 22:25                           ` george anzinger
2001-04-16 23:57                         ` Mark Salisbury
2001-04-17  0:45                           ` george anzinger
2001-04-17 12:12                             ` Mark Salisbury
2001-04-17 12:51                         ` Mark Salisbury
2001-04-17 18:53                           ` george anzinger
2001-04-17 19:41                             ` Jamie Lokier
2001-04-23  8:05                             ` Ulrich Windl
2001-04-23 13:22                               ` Mark Salisbury
2001-04-16  2:41               ` Ben Greear
2001-04-12 12:58 No 100 HZ timer ! Mark Salisbury
2001-04-12 13:14 No 100 HZ timer! Bret Indrelee
2001-08-01 17:22 No 100 HZ timer ! george anzinger
2001-08-01 19:34 ` Chris Friesen
2001-08-01 19:49   ` Richard B. Johnson
2001-08-01 20:08     ` Mark Salisbury
2001-08-01 20:33     ` george anzinger
2001-08-01 21:20   ` george anzinger
2001-08-02  4:28     ` Rik van Riel
2001-08-02  6:03       ` george anzinger
2001-08-02 14:39         ` Oliver Xymoron
2001-08-02 16:36           ` george anzinger
2001-08-02 17:05             ` Oliver Xymoron
2001-08-02 17:46               ` george anzinger
2001-08-02 18:41                 ` Oliver Xymoron
2001-08-02 21:18                   ` george anzinger
2001-08-02 22:09                     ` Oliver Xymoron
2001-08-02 17:26             ` John Alvord

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=3B795863.863780AC@mvista.com \
    --to=george@mvista.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrewm@uow.edu.au \
    --cc=ds@schleef.org \
    --cc=high-res-timers-discourse@lists.sourceforge.net \
    --cc=jdike@karaya.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@tantalophile.demon.co.uk \
    --cc=mbs@mc.com \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    --cc=pavel@suse.cz \
    --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