public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: john stultz <johnstul@us.ibm.com>
Cc: Ray Lee <ray-lk@madrabbit.org>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH 7/8] Remove current_tick_length()
Date: Wed, 26 Mar 2008 02:53:20 +0100	[thread overview]
Message-ID: <200803260253.21921.zippel@linux-m68k.org> (raw)
In-Reply-To: <1205802064.28128.74.camel@localhost>

Hi,

On Tuesday 18. March 2008, john stultz wrote:

> On Sat, 2008-03-15 at 18:14 +0100, Roman Zippel wrote:
> > Hi,
> >
> > On Sat, 15 Mar 2008, Ray Lee wrote:
> > > Then make the original function an inline. With -O2 it should compile
> > > to exactly the same thing.
> >
> > This would also defeat John's intention of keeping the value static.
>
> Well, don't mistake me for being fanatical about it. Having the values
> be static is cleaner, but if its a real performance issue, then clearly
> performance wins.

There are two aspects, such functions tend to generate slightly larger and 
slower code.

> I do like Ray's suggestion, and think using the inline'd function is
> preferred to the raw variable, as it better establishes through use if
> nothing else, the read-only nature of the value outside of ntp.

In other languages one would use private or protected for this, but we don't 
have this. I'm not too fond of an inline function, as it would mark it as 
some kind of public API, which it isn't. It's just an internal value used by 
the timekeeping code, which happens to be needed by a few source files. If 
you want to make a little more private, it would be better to move it to 
header under kernel/time/.

bye, Roman

  reply	other threads:[~2008-03-26  4:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14 18:40 [PATCH 0/8] NTP updates zippel
2008-03-14 18:40 ` [PATCH 1/8] cleanup ntp.c zippel
2008-03-14 20:30   ` john stultz
2008-03-15  3:21     ` Roman Zippel
2008-03-14 18:40 ` [PATCH 2/8] NTP4 user space bits update zippel
2008-03-14 20:36   ` john stultz
2008-03-15  3:29     ` Roman Zippel
2008-03-14 18:40 ` [PATCH 3/8] increase time_freq resolution zippel
2008-03-14 18:40 ` [PATCH 4/8] increase time_offset resolution zippel
2008-03-14 18:40 ` [PATCH 5/8] support for TAI zippel
2008-03-14 20:55   ` john stultz
2008-03-14 18:40 ` [PATCH 6/8] Rename TICK_LENGTH_SHIFT to NTP_SCALE_SHIFT zippel
2008-03-14 18:40 ` [PATCH 7/8] Remove current_tick_length() zippel
2008-03-15  2:41   ` john stultz
2008-03-15  3:32     ` Roman Zippel
2008-03-15  3:48       ` john stultz
2008-03-15  4:18         ` Roman Zippel
2008-03-15 16:29           ` Ray Lee
2008-03-15 17:14             ` Roman Zippel
2008-03-18  1:01               ` john stultz
2008-03-26  1:53                 ` Roman Zippel [this message]
2008-03-14 18:40 ` [PATCH 8/8] handle leap second via timer zippel
2008-03-14 20:24   ` john stultz
2008-03-15  3:18     ` Roman Zippel
2008-03-17 22:18       ` Andrew Morton
2008-03-21 14:15         ` Thomas Gleixner
2008-03-14 23:03 ` [PATCH 0/8] NTP updates john stultz
2008-03-15  3:15   ` 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=200803260253.21921.zippel@linux-m68k.org \
    --to=zippel@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray-lk@madrabbit.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