All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org, "Pallipadi,
	Venkatesh" <venkatesh.pallipadi@intel.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Bernard Blackham <b-lkml@blackham.com.au>,
	Christian Hesse <mail@earthworm.de>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>
Subject: Re: [PATCH] Dynamic tick for x86 version 050609-2
Date: Fri, 10 Jun 2005 08:10:58 -0700	[thread overview]
Message-ID: <20050610151058.GA7858@atomide.com> (raw)
In-Reply-To: <20050610091008.GG4173@elf.ucw.cz>

* Pavel Machek <pavel@ucw.cz> [050610 02:10]:
> Hi!
> 
> Some more nitpicking...

Great!

> > +/*
> > + * ---------------------------------------------------------------------------
> > + * 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 :-).

OK, I'll change that to test that enable is the first option.

> > +/*
> > + * ---------------------------------------------------------------------------
> > + * 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

OK, thanks.

Tony

  reply	other threads:[~2005-06-10 15:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08 22:14 [PATCH] Dynamic tick for x86 version 050602-1 Pallipadi, Venkatesh
2005-06-09  1:40 ` Tony Lindgren
2005-06-10  4:30   ` [PATCH] Dynamic tick for x86 version 050609-2 Tony Lindgren
2005-06-10  9:10     ` Pavel Machek
2005-06-10 15:10       ` Tony Lindgren [this message]
2005-06-13  4:54     ` Valdis.Kletnieks
2005-06-13 15:25       ` Tony Lindgren
2005-06-13 16:47         ` Valdis.Kletnieks
2005-06-13 18:01           ` Thomas Renninger
2005-06-13 18:22             ` Tony Lindgren
2005-06-13 19:07             ` Valdis.Kletnieks
2005-06-14  9:39               ` Thomas Renninger
2005-06-14 15:40                 ` Valdis.Kletnieks
2005-06-13 17:09     ` Srivatsa Vaddagiri
2005-06-13 17:55       ` Andi Kleen
2005-06-13 18:37         ` Tony Lindgren
2005-06-13 18:51           ` Andi Kleen
2005-06-13 19:35             ` Tony Lindgren
2005-06-13 19:48             ` Valdis.Kletnieks
2005-06-13 18:27       ` Tony Lindgren

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=20050610151058.GA7858@atomide.com \
    --to=tony@atomide.com \
    --cc=b-lkml@blackham.com.au \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@earthworm.de \
    --cc=pavel@ucw.cz \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=zwane@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.