Re: + softirq-cleanup-preempt-check.patch added to -mm tree
From: Ingo Molnar
Date: Tue Oct 05 2010 - 15:38:47 EST
* akpm@xxxxxxxxxxxxxxxxxxxx <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> +static inline void softirq_preempt_check(struct softirq_action *h,
> + int prev_count)
unnecessary linebreak.
> +{
> + if (unlikely(prev_count != preempt_count())) {
should be something like:
if (prev_count == preempt_count())
return;
then the rest will look cleaner as well.
> + printk(KERN_ERR "huh, entered softirq %td %s %pf with preempt_count %08x, exited with %08x?\n",
Could be pr_err().
> + softirq_preempt_check(h, prev_count);
Please put 'debug' in the function name as i suggested - that way people
will only read it if they are interested in debug checks.
softirq_debug_check() would be perfect. (which might even grow new
checks in the future)
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/