Re: [PATCH] Dynamic tick for x86 version 050609-2
From: Pavel Machek (pavel_at_ucw.cz)
Date: 06/10/05
- Previous message: Lars Roland: "Re: Fusion MPT driver version 3.01.20 VS. version 2.03.00"
- In reply to: Tony Lindgren: "[PATCH] Dynamic tick for x86 version 050609-2"
- Next in thread: Tony Lindgren: "Re: [PATCH] Dynamic tick for x86 version 050609-2"
- Reply: Tony Lindgren: "Re: [PATCH] Dynamic tick for x86 version 050609-2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 10 Jun 2005 11:10:08 +0200 To: Tony Lindgren <tony@atomide.com>
Hi!
Some more nitpicking...
> +/*
> + * ---------------------------------------------------------------------------
> + * Command line options
> + * ---------------------------------------------------------------------------
> + */
> +static int __initdata dyntick_autoenable = 0;
> +static int __initdata dyntick_useapic = 0;
> +
> +/*
> + * dyntick=[enable|disable],[forceapic]
> + */
> +static int __init dyntick_setup(char *options)
> +{
> + if (!options)
> + return 0;
> +
> + if (strstr(options, "enable"))
> + dyntick_autoenable = 1;
> +
> + if (strstr(options, "forceapic"))
> + dyntick_useapic = 1;
> +
> + return 0;
> +}
> +
> +__setup("dyntick=", dyntick_setup);
Well, your parsing is little too simplistic. If I pass
dyntick=do_not_dare_to_enable_it, it still enables :-).
> +/*
> + * ---------------------------------------------------------------------------
> + * Sysfs interface
> + * ---------------------------------------------------------------------------
> + */
> +
> +extern struct sys_device device_timer;
> +
> +static ssize_t show_dyn_tick_state(struct sys_device *dev, char *buf)
> +{
> + return sprintf(buf, "suitable:\t%i\n"
> + "enabled:\t%i\n"
> + "using APIC:\t%i\n",
> + dyn_tick->state & DYN_TICK_SUITABLE,
> + (dyn_tick->state & DYN_TICK_ENABLED) >> 1,
> + (dyn_tick->state & DYN_TICK_USE_APIC) >> 3);
You basically hardcode values of DYN_TICK_* here. Why not use !!() and
loose dependency?
Pavel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Lars Roland: "Re: Fusion MPT driver version 3.01.20 VS. version 2.03.00"
- In reply to: Tony Lindgren: "[PATCH] Dynamic tick for x86 version 050609-2"
- Next in thread: Tony Lindgren: "Re: [PATCH] Dynamic tick for x86 version 050609-2"
- Reply: Tony Lindgren: "Re: [PATCH] Dynamic tick for x86 version 050609-2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|