From: Stephen Hemminger <shemminger@osdl.org>
To: linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] high-res-timers patches for 2.6.6
Date: Tue, 22 Jun 2004 11:05:05 -0700 [thread overview]
Message-ID: <20040622110505.331a9f77@dell_ss3.pdx.osdl.net> (raw)
In-Reply-To: <40D86E51.2080108@am.sony.com>
>
> Another thing that seems to be a sore point is the HRT core. I think
> there's a good consensus that the current use of preprocessor
> conditionals makes the code pretty hairy, but what alternatives are there?
The way to handle this is to abstract the needed interface
into a set of inline's in one place (hrtime.h) then something like
#ifdef CONFIG_HIRES_TIMERS
static inline void update_hires(struct foo *foo) {
foo->sub_tick = ...
}
#else
static inline void update_hires(struct foo *foo) {
}
#endif
> If the HRT code is always compiled in, that would simplify things alot,
> but then there would always be a small performance hit in the compares,
> and a slightly bigger code size. Is this acceptable? Also, something
> would need to be arranged to take care of the non-supported arch's. Any
> ideas here?
There are two different questions. Should size of structures change based on
config options, that is what tends to make binaries break. The other is whether
the sub-tick stuff is implemented or not.
> Another way would be to pull out the HRT operations into separate
> functions that could be conditionally included or replaced with no-op
> versions based on a config option. I don't know if this would be
> do-able, or if the result would be very clean though...
It is best if the conditional code is in only a few of places,
like the inline's in an one include file; and the main code in timers
plus any arch dependant stuff.
--
Stephen Hemminger mailto:shemminger@osdl.org
Open Source Development Lab http://developer.osdl.org/shemminger
next prev parent reply other threads:[~2004-06-22 18:28 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-10 1:49 Geoff Levand
2004-06-10 2:40 ` William Lee Irwin III
2004-06-10 8:40 ` eric.piel
2004-06-10 9:08 ` William Lee Irwin III
2004-06-10 10:04 ` Arjan van de Ven
2004-06-11 0:02 ` George Anzinger
2004-06-11 6:22 ` Arjan van de Ven
2004-06-11 22:11 ` George Anzinger
2004-06-11 22:33 ` George Anzinger
2004-06-12 14:01 ` Arjan van de Ven
2004-06-14 15:28 ` Mark Gross
2004-06-14 20:48 ` George Anzinger
2004-06-14 22:20 ` Mark Gross
2004-06-15 0:21 ` George Anzinger
2004-06-15 16:04 ` Mark Gross
2004-06-16 22:33 ` George Anzinger
2004-06-17 19:35 ` Mark Gross
2004-06-21 22:50 ` Geoff Levand
2004-06-21 23:17 ` George Anzinger
2004-06-22 17:37 ` Geoff Levand
2004-06-22 18:05 ` Stephen Hemminger [this message]
2004-06-22 23:07 ` George Anzinger
2004-06-23 0:15 ` Geoff Levand
[not found] ` <40D8CF88.4050608@am.sony.com>
2004-09-03 1:35 ` [ANNOUNCE] high-res-timers patch Geoff Levand
2004-11-04 20:41 ` Geoff Levand
2004-06-23 16:23 ` [ANNOUNCE] high-res-timers patches for 2.6.6 Mark Gross
2004-06-21 23:29 ` Mark Gross
2004-06-12 0:24 ` Karim Yaghmour
2004-06-14 20:57 ` George Anzinger
2004-06-21 3:14 ` Karim Yaghmour
2004-06-21 21:33 ` George Anzinger
2004-06-22 4:50 ` Karim Yaghmour
2004-06-21 23:13 ` Stephen Hemminger
2004-06-21 23:22 ` Randy.Dunlap
2004-06-10 12:46 Dave Hylands
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=20040622110505.331a9f77@dell_ss3.pdx.osdl.net \
--to=shemminger@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®