From: George Anzinger <george@mvista.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Arjan van de Ven <arjanv@redhat.com>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390 (9/9): no timer interrupts in idle.
Date: Thu, 22 Apr 2004 20:32:19 -0700 [thread overview]
Message-ID: <40888E43.9080106@mvista.com> (raw)
In-Reply-To: <OF8486E763.A98E66AA-ONC1256E7E.00452A1A-C1256E7E.0045F93D@de.ibm.com>
Martin Schwidefsky wrote:
>
>
>
>>xtime is easy, that's interpolated anyway afaics. Jiffies would either
>
> just
>
>>jump some, which code needs to deal with anyway given that preempt can do
>>the same, or would become an approximated thing as well based on the
>
> other
>
>>time keeping sources in the system.
>
>
> Unluckily no. xtime is not easy because the network stack uses this for
> time stamps at several locations. Living in the past and time stamps for
> network packets don't go together, do they?
>
>
>>calculating the load can be a real timer for sure (which would cause an irq
>>at that time), cpu limits we can do at the end of timeslice (and set the
>>timeslice such that the limits won't be exceeded).
Here is where this thing falls down. Some time ago I put together a tick less
system (which is what this amounts to). The patch is still on sourceforge (see
the HRT URL in my signature). The problem is this:
On context switch the scheduler needs to figure the minimum time to the next
event for the new task. This would be the minimum of the remaining slice,
profile timer, virtual time, and the cpu limit timer (at least). It would then
do an add_timer for this time. On the next context switch it would, most
likely, cancel the timer (most code does not run to the end of its slice which
is the most likely limit). The computation to find the minimum time, with a bit
of hand waving, could be shortened to eliminate a few of the timers. On switch
out, all the tasks timers would need to be updated with the actual time the task
used. The problem is that all this work is in the VERY lean and mean context
switch path. In my tests a context switching could easily occur often enough
that the savings from not doing the tick interrupts was over whelmed by the
added context switch over head with a medium cpu load. And it is down hill from
here. I.e. the tick less system incurres accounting overhead in direct
proportion to the number of context switches, while the ticking system has a
fixed accounting overhead. AND the cross over point (where the tick less system
overhead is more that the ticked system overhead) occurs with a medium load.
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
next prev parent reply other threads:[~2004-04-23 3:32 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-22 12:44 [PATCH] s390 (9/9): no timer interrupts in idle Martin Schwidefsky
2004-04-22 13:11 ` Arjan van de Ven
2004-04-23 3:32 ` George Anzinger [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:14 Martin Schwidefsky
2004-04-22 12:25 ` Arjan van de Ven
2004-04-22 11:09 Martin Schwidefsky
2004-04-22 11:14 ` 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=40888E43.9080106@mvista.com \
--to=george@mvista.com \
--cc=akpm@osdl.org \
--cc=arjanv@redhat.com \
--cc=ganzinger@mvista.com \
--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