public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhltc@us.ibm.com>
To: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: john stultz <johnstul@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	albert@users.sourceforge.net, paulus@samba.org,
	schwidefsky@de.ibm.com, mahuja@us.ibm.com, donf@us.ibm.com,
	mpm@selenic.com, benh@kernel.crashing.org
Subject: Re: [RFC][PATCH] new timeofday-based soft-timer subsystem
Date: Mon, 02 May 2005 11:41:58 -0700	[thread overview]
Message-ID: <42767476.5050201@us.ibm.com> (raw)
In-Reply-To: <20050429233546.GB2664@us.ibm.com>

Nishanth Aravamudan wrote:
 > * john stultz <johnstul@us.ibm.com> [2005-0429 15:45:47 -0700]:
 >
 >
 >>All,
 >>        This patch implements the architecture independent portion of
 >>the time of day subsystem. For a brief description on the rework, see
 >>here: http://lwn.net/Articles/120850/ (Many thanks to the LWN team for
 >>that clear writeup!)
 >
 >
 > I have been working closely with John to re-work the soft-timer subsytem
 > to use the new timeofday() subsystem. The following patch attempts to
 > being this process. I would greatly appreciate any comments.
 >
 >

Also working closely with John and Nish, I have been taking advantage of 
the new human-time soft-timer subsystem and the NO_IDLE_HZ code to 
dynamically schedule interrupts as needed.  The idea is to have 
interrupt source drivers (PIT, Local APIC, HPET, ppc decrementers, etc) 
similar to the time sources in John's timeofday patches.

Because the resolution of the soft-timer sybsystem is configurable via 
TIMER_INTERVAL_BITS, and the timeofday code is now free of the periodic 
system tick, we can move the soft-timers to a dynamically scheduled 
interrupt system.  We can achieve both sub-millisecond timer resolution 
and NO_IDLE_HZ simply by adjusting TIMER_INTERVAL_BITS and scheduling 
the next timer interrupt appropriately whenever a soft-timer is added or 
removed.

In general at the end of set_timer_nsecs(), we see when the next timer 
is due to expire and pass that value (in absolute nanoseconds) to 
schedule_next_timer_interrupt().  Each interrupt source driver is then 
free to reprogram the hard-timer to the "best" interval.  For something 
like the local APIC, that may be exactly when the next timer needs to go 
off.  For the PIT, it may do nothing at all and just fire periodically.

I have a prototype using the PIT, which just demonstrates that the 
system will still run this way.  Obviously other timers will perform 
much better since the PIT is so slow to program.

I feel that this is a clean approach to two soft-timer issues: 
resolution and NO_IDLE_HZ.  It integrates well with the patches from 
John and Nish and is a direct approach to these issues, rather than an 
attempt to add support on top of a jiffies based soft-timer subsystem.

I'd appreciate any feedback people have to offer.  Particularly those 
that have been working on alternative approaches to things like high 
resolution timers and NO_IDLE_HZ.

Thanks,


-- 
Darren Hart
IBM Linux Technology Center
Linux Kernel Team
Phone: 503 578 3185
   T/L: 775 3185

  reply	other threads:[~2005-05-02 18:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29 22:45 [RFC][PATCH (1/4)] new timeofday core subsystem (v A4) john stultz
2005-04-29 22:46 ` [RFC][PATCH (2/4)] new timeofday arch specific hooks " john stultz
2005-04-29 22:47   ` [RFC][PATCH (3/4)] new timeofday arch specific timesource drivers " john stultz
2005-04-29 22:48     ` [RFC][PATCH (4/4)] new timeofday vsyscall proof of concept " john stultz
2005-05-02 21:13   ` [RFC][PATCH (2/4)] new timeofday arch specific hooks " Pavel Machek
2005-05-02 21:28     ` john stultz
2005-04-29 23:35 ` [RFC][PATCH] new timeofday-based soft-timer subsystem Nishanth Aravamudan
2005-05-02 18:41   ` Darren Hart [this message]
2005-05-03 17:02   ` Nishanth Aravamudan
2005-05-03 17:22     ` Chris Friesen
2005-05-03 18:07       ` Nish Aravamudan
2005-05-03 21:47     ` Nishanth Aravamudan
2005-04-29 23:44 ` [RFC][PATCH (1/4)] new timeofday core subsystem (v A4) john stultz
2005-04-29 23:50 ` Benjamin Herrenschmidt
2005-04-30  0:33   ` john stultz

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=42767476.5050201@us.ibm.com \
    --to=dvhltc@us.ibm.com \
    --cc=albert@users.sourceforge.net \
    --cc=benh@kernel.crashing.org \
    --cc=donf@us.ibm.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahuja@us.ibm.com \
    --cc=mpm@selenic.com \
    --cc=nacc@us.ibm.com \
    --cc=paulus@samba.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