From: Christoph Hellwig <hch@infradead.org>
To: Joel Becker <Joel.Becker@oracle.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@digeo.com>,
Linus Torvalds <torvalds@transmeta.com>,
Wim Coekaerts <Wim.Coekaerts@oracle.com>
Subject: Re: [PATCH][2.5] hangcheck-timer
Date: Tue, 21 Jan 2003 08:11:58 +0000 [thread overview]
Message-ID: <20030121081158.A21080@infradead.org> (raw)
In-Reply-To: <20030121011954.GO20972@ca-server1.us.oracle.com>; from Joel.Becker@oracle.com on Mon, Jan 20, 2003 at 05:19:54PM -0800
> +#include <linux/module.h>
> +#include <linux/config.h>
I can't your see the driver reference CONFIG_* directly anywhere.
> +#define VERSION_STR "0.5.0"
> +
> +static void version_hash_print (void)
> +{
> + printk(KERN_INFO "I/O fencing modules %s\n", VERSION_STR);
> +}
This message is a bit misleading, isn't it?
> +static int hangcheck_tick = DEFAULT_IOFENCE_TICK;
> +static int hangcheck_margin = DEFAULT_IOFENCE_MARGIN;
> +static int hangcheck_reboot = 0; /* Do not reboot */
no need to initialize static variables to zero, they'll just go into .bss.
> +/* options - modular */
> +MODULE_PARM(hangcheck_tick,"i");
> +MODULE_PARM_DESC(hangcheck_tick, "Timer delay.");
> +MODULE_PARM(hangcheck_margin,"i");
> +MODULE_PARM_DESC(hangcheck_margin, "If the hangcheck timer has been delayed more than hangcheck_margin seconds, the driver will fire.");
> +MODULE_PARM(hangcheck_reboot,"i");
> +MODULE_PARM_DESC(hangcheck_reboot, "If nonzero, the machine will reboot when the timer margin is exceeded.");
It might be worth using Rusty's new module paramters for new code submitted
to 2.5 instead of the legacy interfaces.
> +#if 0
> + printk(KERN_CRIT "tsc_diff = %lu.%lu, predicted diff is %lu.%lu.\n",
> + (unsigned long) ((tsc_diff >> 32) & 0xFFFFFFFFULL),
> + (unsigned long) (tsc_diff & 0xFFFFFFFFULL),
> + (unsigned long) ((hangcheck_tsc_margin >> 32) & 0xFFFFFFFFULL),
> + (unsigned long) (hangcheck_tsc_margin & 0xFFFFFFFFULL));
> + printk(KERN_CRIT "hangcheck_margin = %lu, HZ = %lu, current_cpu_data.loops_per_jiffy = %lu.\n", hangcheck_margin, HZ, current_cpu_data.loops_per_jiffy);
> +#endif
#if DEBUG maybe? or VERBOSE?
> +static int __init hangcheck_init(void)
> +{
> + version_hash_print();
> + printk("Hangcheck: starting hangcheck timer (tick is %d seconds, margin is %d seconds).\n",
> + hangcheck_tick, hangcheck_margin);
Two startup messages seems like a bit too much.
> +} /* hangcheck_init() */
Bah 8)
> +static void __exit hangcheck_exit(void)
> +{
> + printk("Stopping hangcheck timer.\n");
Again, this is exteremly verbose.
> + lock_kernel();
> + del_timer(&hangcheck_ticktock);
> + unlock_kernel();
No need for BKL here, but you might want to use del_timer_sync.
next prev parent reply other threads:[~2003-01-21 8:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-21 1:19 [PATCH][2.5] hangcheck-timer Joel Becker
2003-01-21 8:11 ` Christoph Hellwig [this message]
2003-01-21 17:33 ` Joel Becker
2003-01-21 18:44 ` [PATCH (take 2)][2.5] hangcheck-timer Joel Becker
2003-01-21 18:59 ` Christoph Hellwig
2003-01-21 19:48 ` Joel Becker
2003-01-21 19:56 ` Christoph Hellwig
2003-01-21 19:04 ` Sam Ravnborg
2003-01-21 12:50 ` [PATCH][2.5] hangcheck-timer Dave Jones
2003-01-21 17:40 ` Joel Becker
2003-01-21 17:42 ` Dave Jones
2003-01-21 18:42 ` Joel Becker
[not found] <200301210135.h0L1ZFa06867@eng2.beaverton.ibm.com>
2003-01-21 1:42 ` john stultz
2003-01-21 2:00 ` Joel Becker
2003-01-21 2:45 ` john stultz
2003-01-21 17:29 ` Joel Becker
2003-01-21 20:03 ` john stultz
2003-01-21 20:30 ` Joel Becker
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=20030121081158.A21080@infradead.org \
--to=hch@infradead.org \
--cc=Joel.Becker@oracle.com \
--cc=Wim.Coekaerts@oracle.com \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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