linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Pavel Machek <pavel@ucw.cz>
Cc: Roman Zippel <zippel@linux-m68k.org>,
	Al Viro <viro@ftp.linux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Matthew Wilcox <matthew@wil.cx>,
	Linus Torvalds <torvalds@osdl.org>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] timers, pointers to functions and type safety
Date: Sun, 3 Dec 2006 11:27:07 +0000	[thread overview]
Message-ID: <20061203112706.GA12722@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20061203102108.GA1724@elf.ucw.cz>

On Sun, Dec 03, 2006 at 11:21:09AM +0100, Pavel Machek wrote:
> Hi!
> 
> > > > The other alternative has real _practical_ value in almost every case, 
> > > > which I very much prefer. What's wrong with that?
> > > 
> > > Lack of any type safety whatsoever, magic boilerplates in callback instances,
> > > rules more complex than "your callback should take a pointer, don't cast
> > > anything, it's just a way to arrange for a delayed call, nothing magical
> > > needed"?
> > 
> > I admit the compile check in SETUP_TIMER() is clever, but this way all the
> > magic is in this place and is it really worth it? You're only adding _one_ 
> > extra typecheck for mostly simple cases anyway.
> 
> Well, there are so many of these simple changes, that SETUP_TIMER()
> with its clever trick looks very useful.

I agree with Al, Matthew and Pavel.  The current timer stuff is a pita
and needs fixing, and it seems Al has come up with a good way to do it
without adding additional crap into every single user of timers.

There *are* times when having the additional space for storing a pointer
is cheaper (in terms of number of bytes) than code to calculate an offset,
and those who have read the assembly code probably know this all too well.

Al - I look forward to your changes.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2006-12-03 11:27 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01 17:21 [RFC] timers, pointers to functions and type safety Al Viro
2006-12-02  6:29 ` Daniel Berlin
2006-12-02 12:36   ` Al Viro
2006-12-02  9:23 ` Kyle Moffett
2006-12-02 12:42   ` Al Viro
2006-12-02 20:53     ` Kyle Moffett
2006-12-02 10:47 ` Arnd Bergmann
2006-12-02 12:59 ` Thomas Gleixner
2006-12-02 14:05   ` Al Viro
2006-12-02 14:45     ` Thomas Gleixner
2006-12-02 16:02       ` Matthew Wilcox
2006-12-02 18:06         ` Thomas Gleixner
2006-12-02 18:19           ` Al Viro
2006-12-02 18:27             ` Thomas Gleixner
2006-12-02 18:40               ` Al Viro
2006-12-02 18:48                 ` Al Viro
2006-12-02 21:43                 ` Roman Zippel
2006-12-02 21:59                   ` Al Viro
2006-12-02 22:13                     ` Roman Zippel
2006-12-02 22:40                       ` Al Viro
2006-12-02 23:06                         ` Roman Zippel
2006-12-03 10:21                           ` Pavel Machek
2006-12-03 11:27                             ` Russell King [this message]
2006-12-03 15:21                               ` Roman Zippel
2006-12-03 21:01                                 ` Pavel Machek
2006-12-03 22:52                                   ` Roman Zippel
2006-12-03 23:15                                     ` Pavel Machek
2006-12-04 11:14                               ` David Howells
2006-12-04 12:16                                 ` Russell King
2006-12-04 13:03                                   ` David Howells
2006-12-04 13:29                                     ` Russell King
2006-12-04 14:17                                       ` David Howells
2006-12-04 14:22                                         ` Russell King
2006-12-04 11:48             ` Ingo Molnar
2006-12-04 12:22               ` David Howells
2006-12-06  0:24                 ` Al Viro
2006-12-06 10:20                   ` David Howells
2006-12-12  9:59                   ` Ingo Molnar
2006-12-02 21:32         ` Roman Zippel

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=20061203112706.GA12722@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=pavel@ucw.cz \
    --cc=tglx@linutronix.de \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.linux.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).