public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Con Kolivas <kernel@kolivas.org>
Cc: linux-kernel@vger.kernel.org, vatsa@in.ibm.com,
	ck@vds.kolivas.org, tony@atomide.com,
	tuukka.tikkanen@elektrobit.com, george@mvista.com,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 4
Date: Sat, 6 Aug 2005 19:47:39 +0200	[thread overview]
Message-ID: <20050806174739.GU4029@stusta.de> (raw)
In-Reply-To: <200508060239.41646.kernel@kolivas.org>

On Sat, Aug 06, 2005 at 02:39:40AM +1000, Con Kolivas wrote:

> Here's my most current version of the dynamic ticks patch for i386 with some 
> more minor cleanups already discussed and cosmetic changes ( also available 
> at http://ck.kolivas.org/patches/dyn-ticks/ ).
> 
> Cheers,
> Con
>...
> --- linux-2.6.13-rc5-ck2.orig/arch/i386/kernel/dyn-tick.c	2005-01-12 16:19:45.000000000 +1100
> +++ linux-2.6.13-rc5-ck2/arch/i386/kernel/dyn-tick.c	2005-08-05 20:48:57.000000000 +1000
>...
> +void arch_reprogram_timer(void)
> +{

static?

>...
> +int __init dyn_tick_init(void)
> +{

static?

>...
> +irqreturn_t dyn_tick_timer_interrupt(int irq, void *dev_id,
> +				     struct pt_regs *regs)
> +{

static?

>...
> +int __init dyn_tick_arch_init(void)
> +{

static?

>...
> +/* Functions that need blank prototypes for !CONFIG_NO_IDLE_HZ below here */
> +inline void set_dyn_tick_max_skip(u32 apic_timer_val)
> +{
> +	dyn_tick->max_skip = 0xffffff / apic_timer_val;
> +}
> +
> +inline void setup_dyn_tick_use_apic(unsigned int calibration_result)
> +{
> +	if (calibration_result)
> +		dyn_tick->state |= DYN_TICK_USE_APIC;
> +	else
> +		printk(KERN_INFO "dyn-tick: Cannot use local APIC\n");
> +}

You can drop the "inline" on both functions (it doesn't make any 
practical difference since they are only called from other files).

>...
> --- linux-2.6.13-rc5-ck2.orig/include/asm-i386/dyn-tick.h	2005-01-12 16:19:45.000000000 +1100
> +++ linux-2.6.13-rc5-ck2/include/asm-i386/dyn-tick.h	2005-08-05 20:57:02.000000000 +1000
>...
> +#if defined(CONFIG_DYN_TICK_USE_APIC) && \
> +	(defined(CONFIG_SMP) || defined(CONFIG_X86_UP_APIC))
> +#define cpu_has_local_apic()	(dyn_tick->state & DYN_TICK_USE_APIC)
> +#else
> +#define cpu_has_local_apic()	0
> +#endif
> +
> +#if defined(CONFIG_DYN_TICK_USE_APIC)
> +#define dyntick_apicable()	1
> +#else
> +#define dyntick_apicable()	0
> +#endif

Constants that mimic functions aren't good coding style.

Please make them either uppercase #define's without function braces or 
"static inline" functions.

>...
> --- linux-2.6.13-rc5-ck2.orig/kernel/dyn-tick.c	2005-01-12 16:19:45.000000000 +1100
> +++ linux-2.6.13-rc5-ck2/kernel/dyn-tick.c	2005-08-05 21:02:44.000000000 +1000
>...
> +struct dyn_tick_state dyn_tick_state;

static?

>...
> +struct dyn_tick_timer *dyn_tick_cfg;
>...

static?


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2005-08-06 17:47 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-03  5:59 [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 3 Con Kolivas
2005-08-03 11:54 ` Jan De Luyck
2005-08-03 12:14   ` Con Kolivas
2005-08-03 14:23     ` Jan De Luyck
2005-08-04 15:03       ` Vojtech Pavlik
2005-08-05  5:12         ` Con Kolivas
2005-08-03 19:20 ` Jim MacBaine
2005-08-03 21:16   ` Con Kolivas
2005-08-03 22:22     ` Jim MacBaine
2005-08-03 22:52       ` Con Kolivas
2005-08-04  5:34         ` Jim MacBaine
2005-08-04  6:59           ` Jim MacBaine
2005-08-04  7:04             ` Con Kolivas
2005-08-04  7:12               ` Con Kolivas
2005-08-04  7:29                 ` Tony Lindgren
2005-08-10 20:04             ` Bill Davidsen
2005-08-14 19:47         ` Pavel Machek
2005-08-15  1:43           ` Zwane Mwaikambo
2005-08-15 12:52             ` Con Kolivas
2005-08-15 15:39               ` Zwane Mwaikambo
2005-08-03 19:54 ` Jeffrey Hundstad
2005-08-03 20:07   ` Valdis.Kletnieks
2005-08-03 21:13   ` Con Kolivas
2005-08-03 23:22 ` Christian Leber
2005-08-04 16:25   ` Marc Ballarin
2005-08-04  5:09 ` Jan De Luyck
2005-08-04  5:07   ` Con Kolivas
2005-08-04  5:34     ` Jan De Luyck
2005-08-04 21:15 ` [PATCH] Timer Top was: " Daniel Petrini
2005-08-05  4:05   ` [PATCH] Timer Top tweaks Con Kolivas
2005-08-05  6:46   ` [ck] [PATCH] Timer Top was: i386 No-Idle-Hz aka Dynamic-Ticks 3 Jens Axboe
2005-08-05 12:39     ` Daniel Petrini
2005-08-05 13:55       ` Daniel Petrini
2005-08-04 21:44 ` [PATCH] " Adrian Bunk
2005-08-04 22:12 ` Marc Ballarin
2005-08-05  0:31   ` Con Kolivas
2005-08-05  1:30 ` Paul
2005-08-05  3:25   ` Con Kolivas
2005-08-05 12:37 ` Srivatsa Vaddagiri
2005-08-05 13:08   ` Con Kolivas
2005-08-05 16:39     ` [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 4 Con Kolivas
2005-08-06 17:47       ` Adrian Bunk [this message]
2005-08-07  5:12         ` [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 5 Con Kolivas
2005-08-07 16:58           ` Srivatsa Vaddagiri
2005-08-07 23:51             ` Con Kolivas
2005-08-08  1:20               ` Kyle Moffett
2005-08-08  1:30                 ` Con Kolivas
2005-08-08  1:45                   ` [ck] " Gabriel Devenyi
2005-08-08  2:44                   ` Srivatsa Vaddagiri
2005-08-08  7:05                     ` Nigel Cunningham
2005-08-08  7:38             ` Tony Lindgren
2005-08-08 15:06               ` Srivatsa Vaddagiri
2005-08-09 19:36             ` George Anzinger
2005-08-10 14:05               ` Srivatsa Vaddagiri
2005-08-10 22:37                 ` George Anzinger
2005-08-11 21:33                   ` Bill Davidsen
2005-08-12 15:13                     ` George Anzinger
2005-08-08 15:08           ` Folkert van Heusden
2005-08-08 15:16             ` Daniel Petrini
2005-08-08  7:26   ` [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 3 Tony Lindgren
2005-08-08 14:54     ` Srivatsa Vaddagiri
2005-08-08 15:20       ` Tony Lindgren
2005-08-09 14:22         ` Zwane Mwaikambo
2005-08-10  7:46           ` Tony Lindgren
2005-08-09 20:05     ` George Anzinger
2005-08-09 20:22       ` Daniel Petrini
2005-08-10  8:02       ` Tony Lindgren
2005-08-10 22:40         ` 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=20050806174739.GU4029@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=ck@vds.kolivas.org \
    --cc=george@mvista.com \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=tuukka.tikkanen@elektrobit.com \
    --cc=vatsa@in.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