From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: tglx@linutronix.de, zippel@linux-m68k.org,
linux-kernel@vger.kernel.org, rostedt@goodmis.org,
johnstul@us.ibm.com
Subject: Re: [patch 00/21] hrtimer - High-resolution timer subsystem
Date: Wed, 7 Dec 2005 11:11:37 +0100 [thread overview]
Message-ID: <20051207101137.GA25796@elte.hu> (raw)
In-Reply-To: <20051207013122.3f514718.akpm@osdl.org>
* Andrew Morton <akpm@osdl.org> wrote:
> Thomas Gleixner <tglx@linutronix.de> wrote:
> >
> > We decided to rename 'ktimer' because Andrew pretty much vetoed the
> > 'ktimeout' queue
let me defuse things a bit here: the above sentence might sound a bit
bitter, but we really, truly are not. You were more like the sane voice
slapping us back into reality: for the next 2 years we do not want to be
buried in tons of timer_list->ktimeout patches, causing disruption all
across the kernel (and external trees). You definitely did not 'veto' it
in any way, and in fact you are carrying it in -mm currently.
I did the ktimeout queue in an hour or so, and i dont have strong
feelings about it. I very much agree with you that a mass rename could
easily cause more problems than the added clarity adds - still i had to
try the ktimeout queue, because i'm hopelessly purist at heart :)
Maybe in a few years all substantial kernel code will be managed by a
network of GIT repositories, and GIT will be extended with automatic
'mass namespace change' capabilities, making an overnight switchover
much more practical.
> Well I whined about the rename of timer_list to ktimeout and asked why
> it happened. I don't think anyone replied.
we thought we had this issue covered way too many times :) but find
below my original justification for the ktimeout patch-queue. This is
just for historical interest now i think.
[ insert the text below here. Time passes as everyone reads it :-) ]
once we take 'mass change of timer_list to ktimeout' out of the possible
things to do, we've only got these secondary possibilities:
'struct timer_list, struct ktimer'
'struct timer_list, struct ptimer'
'struct timer_list, struct hrtimer'
and having eliminated the first option due to being impractical to pull
off, we had the choice between 'ptimer' and 'hrtimer', and went for the
last one, for the following reason [snipped from a mail to Roman]:
| we decided against "ptimer" because it could be confused with "process
| timers" and "posix timers". hrtimers is a clear term that indicates
| what those timers do, so we picked up Andrew's suggestion as a way out
| the endless naming discussion.
but really ... facing an imperfect naming situation (i do not think
timer_list is the correct name - just as much as struct inode_list would
not be correct - but it is the historic name and i think you are right
that we've got to live with it) i'm alot less passionate about which one
to pick. If we had the chance to have perfect naming, i'd definitely
spend the effort to get it right, but now lets just go with the most
descriptive one: 'struct hrtimer'.
Ingo
-----
regarding naming. This is something best left to native speakers, but
i'm not giving up the issue just yet :-)
i always sensed and agreed that 'struct ktimer' and 'struct timer_list'
together is confusing. Same for kernel/ktimers.c and kernel/timers.c. So
no argument about that, this situation cannot continue.
but the reason i am still holding on to 'struct ktimer' is that i think
the end result should be:
- 'struct ktimer' (for precise timers where the event of expiry is the
main function)
- 'struct ktimeout' (for the wheel-based timeouts, where expiry is an
exception)
Similarly, kernel/ktimer.c for ktimers, and kernel/ktimeout.c for
timeouts.
see the attached finegrained patchqueue that does all the changes to
rename 'timers' to 'timeouts' [and to clean up the resulting subsystem],
to see what i'm trying to achieve.
For now i'm ignoring the feasibility of a 'mass API change' issues -
those are better up to lkml. The queue does build and compile fine on a
rather big .config so the only question is - do we want it. Note that
the patch does not have to touch even a single non-subsystem user of the
timer.c APIs, so the renaming is robust.
IMO it looks a lot less confusing and dualistic that way. The rename is
technically feasible and robust mainly because we can do this:
#define timer_list timeout
for the transition period (see the patch-queue). Fortunately timer_list
is not a generic name. (it's also an incorrect name because it implies
implementation) Here's the full list of mappings that occur:
#define timer_list ktimeout
#define TIMER_INITIALIZER KTIMEOUT_INITIALIZER
#define DEFINE_TIMER DEFINE_KTIMEOUT
#define init_timer ktimeout_init
#define setup_timer ktimeout_setup
#define timer_pending ktimeout_pending
#define add_timer_on ktimeout_add_on
#define del_timer ktimeout_del
#define __mod_timer __ktimeout_mod
#define mod_timer ktimeout_mod
#define next_timer_interrupt ktimeout_next_interrupt
#define add_timer ktimeout_add
#define try_to_del_timer_sync ktimeout_try_to_del_sync
#define del_timer_sync ktimeout_del_sync
#define del_singleshot_timer_sync ktimeout_del_singleshot_sync
#define init_timers init_ktimeouts
#define run_local_timers run_local_ktimeouts
but maybe 'struct ptimer' and 'struct ktimeout' is the better choice? I
dont think so, but it's a possibility.
so i believe that:
- 'struct ktimer', 'struct ktimeout'
is in theory superior naming, compared to:
- 'struct ptimer', 'struct timer_list'
again, ignoring all the 'do we want to have a massive namespace change'
issues.
Ingo
next prev parent reply other threads:[~2005-12-07 10:11 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-06 0:01 [patch 00/21] hrtimer - High-resolution timer subsystem tglx
2005-12-06 0:01 ` [patch 01/21] Move div_long_long_rem out of jiffies.h tglx
2005-12-06 0:01 ` [patch 02/21] Remove duplicate div_long_long_rem implementation tglx
2005-12-06 0:01 ` [patch 03/21] Deinline mktime and set_normalized_timespec tglx
2005-12-06 0:01 ` [patch 04/21] Clean up mktime and make arguments const tglx
2005-12-06 0:01 ` [patch 05/21] Export deinlined mktime tglx
2005-12-06 0:01 ` [patch 06/21] Remove unused clock constants tglx
2005-12-06 0:01 ` [patch 07/21] Coding style clean up of " tglx
2005-12-06 0:01 ` [patch 08/21] Coding style and white space cleanup tglx
2005-12-06 0:01 ` [patch 09/21] Make clockid_t arguments const tglx
2005-12-06 0:01 ` [patch 10/21] Coding style and white space cleanup tglx
2005-12-06 0:01 ` [patch 11/21] Create and use timespec_valid macro tglx
2005-12-06 0:01 ` [patch 12/21] Validate timespec of do_sys_settimeofday tglx
2005-12-06 0:01 ` [patch 13/21] Introduce nsec_t type and conversion functions tglx
2005-12-06 0:01 ` [patch 14/21] Introduce ktime_t time format tglx
2005-12-06 0:01 ` [patch 15/21] hrtimer core code tglx
2005-12-15 3:43 ` Matt Helsley
2005-12-06 0:01 ` [patch 16/21] hrtimer documentation tglx
2005-12-06 0:01 ` [patch 17/21] Switch itimers to hrtimer tglx
2005-12-06 0:01 ` [patch 18/21] Create hrtimer nanosleep API tglx
2005-12-06 0:01 ` [patch 19/21] Switch sys_nanosleep to hrtimer tglx
2005-12-06 0:01 ` [patch 20/21] Switch clock_nanosleep to hrtimer nanosleep API tglx
2005-12-06 0:01 ` [patch 21/21] Convert posix timers completely tglx
2005-12-06 17:32 ` [patch 00/21] hrtimer - High-resolution timer subsystem Roman Zippel
2005-12-06 19:07 ` Ingo Molnar
2005-12-07 3:05 ` Roman Zippel
2005-12-08 5:18 ` Paul Jackson
2005-12-08 8:12 ` Ingo Molnar
2005-12-08 9:26 ` Ingo Molnar
2005-12-08 13:08 ` Roman Zippel
2005-12-08 15:36 ` Steven Rostedt
2005-12-06 22:10 ` Thomas Gleixner
2005-12-07 3:11 ` Roman Zippel
2005-12-06 22:28 ` Thomas Gleixner
2005-12-07 9:31 ` Andrew Morton
2005-12-07 10:11 ` Ingo Molnar [this message]
2005-12-07 10:20 ` Ingo Molnar
2005-12-07 10:23 ` Nick Piggin
2005-12-07 10:49 ` Ingo Molnar
2005-12-07 11:09 ` Nick Piggin
2005-12-07 11:33 ` Ingo Molnar
2005-12-07 11:40 ` Nick Piggin
2005-12-07 13:06 ` Roman Zippel
2005-12-07 12:40 ` Roman Zippel
2005-12-07 23:12 ` Nick Piggin
2005-12-07 12:18 ` Roman Zippel
2005-12-07 16:55 ` Ingo Molnar
2005-12-07 17:17 ` Roman Zippel
2005-12-07 17:57 ` Ingo Molnar
2005-12-07 18:18 ` Roman Zippel
2005-12-07 18:02 ` Paul Baxter
2005-12-09 17:23 ` Thomas Gleixner
2005-12-12 13:39 ` Roman Zippel
2005-12-12 16:42 ` Thomas Gleixner
2005-12-12 18:37 ` Thomas Gleixner
2005-12-13 1:25 ` George Anzinger
2005-12-13 9:18 ` Thomas Gleixner
2005-12-15 1:35 ` Roman Zippel
2005-12-15 2:29 ` George Anzinger
2005-12-19 14:56 ` Roman Zippel
2005-12-19 20:54 ` George Anzinger
2005-12-21 23:03 ` Roman Zippel
2005-12-22 4:30 ` George Anzinger
2005-12-14 20:48 ` Roman Zippel
2005-12-14 22:30 ` Thomas Gleixner
2005-12-15 0:55 ` George Anzinger
2005-12-15 14:18 ` Steven Rostedt
2005-12-19 14:50 ` Roman Zippel
2005-12-19 22:05 ` Thomas Gleixner
-- strict thread matches above, loose matches on Subject: below --
2005-12-13 12:45 Nicolas Mailhot
2005-12-13 23:38 ` George Anzinger
2005-12-14 8:58 ` Kyle Moffett
2005-12-14 10:03 ` Nicolas Mailhot
2005-12-15 1:11 ` George Anzinger
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=20051207101137.GA25796@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=zippel@linux-m68k.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