From: Andi Kleen <ak@suse.de>
To: "Russell Leidich" <rml@google.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@elte.hu>
Subject: Re: [PATCH] AMD Thermal Interrupt Support
Date: Sat, 29 Dec 2007 03:11:51 +0100 [thread overview]
Message-ID: <200712290311.51176.ak@suse.de> (raw)
In-Reply-To: <3f1a065b0712281240p14c8223agfe83db0ac26aca4c@mail.gmail.com>
On Friday 28 December 2007 21:40:28 Russell Leidich wrote:
> OK, given our discussion, perhaps the attached revised patch will be
> more to your liking.
>
> If so, let me know and I'll give it one last paranoid test, then mail
> you a Signed-off-by patch.
>
In general you seem to have a lot (too many?) of low level comments,
but no high level "strategy" comment anywhere what this code actually
tries to do. I find the high level comments usually more useful.
amd_cpu_callback:
- if (cpu >= NR_CPUS)
- goto out;
-
that change seems to be unrelated cleanup. Such patches should be always separate.
Same with the rename.
I find it is quite common to do smp_call_function_single in CPU up/down callbacks.
It would be better to fix that generically in the high level code (provide
a new callback that is guaranteed to run on the target CPU) than to always reimplement
it.
thermal_apic_init:
+ printk(KERN_CRIT "CPU 0x%x: Thermal monitoring not "
+ "functional.\n", cpu);
Why is that KERN_CRIT? Does not seem that critical to me.
smp_thermal_interrupt_init:
The erratum number/part number should be documented and the kernel ought to print
why it didn't initialize thermal on that hardware.
I'm not sure which erratum that is, but since that PCI-ID is used by all K8s
you excluded all of them, don't you? Is that whole code only for Fam10h?
That seems a little drastic. Perhaps it should just check steppings etc.
And needs more comments.
You're technically racy against parallel cpu hotplug happening from initrd
(which already runs during initcall -- yes that is a deathtrap)
although that is typically hard to fix.
thermal_apic_init_allowed seems like a hack. A separate notifier would
be cleaner.
+/*
+ * smp_thermal_interrupt_init cannot execute until PCI has been fully
+ * initialized, hence late_initcall().
+ */
+late_initcall(smp_thermal_interrupt_init);
PCI is already initialized before normal initcall, otherwise pretty much
all drivers would break.
mce_thermal.c seems to be just unnecessary to me. It would be cleaner
to just keep the separate own handlers, especially since they do quite
different things anyways. Don't mesh together what is quite different.
Also "cpu_specific_smp_thermal_interrupt_callback_t" is definitely too long.
-Andi
next prev parent reply other threads:[~2007-12-29 2:12 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 18:54 [PATCH] AMD Thermal Interrupt Support Russell Leidich
2007-12-25 22:04 ` Andrew Morton
2007-12-27 18:57 ` Russell Leidich
2007-12-28 7:34 ` Andrew Morton
2007-12-28 20:40 ` Russell Leidich
2007-12-29 2:11 ` Andi Kleen [this message]
2007-12-29 2:30 ` Valdis.Kletnieks
2007-12-29 2:34 ` Andi Kleen
2007-12-29 2:57 ` Valdis.Kletnieks
2007-12-30 18:39 ` Andi Kleen
2008-01-02 19:43 ` Russell Leidich
2008-01-02 20:00 ` Andi Kleen
2008-01-02 21:12 ` Russell Leidich
2008-01-02 21:33 ` Torsten Kaiser
2008-01-02 21:50 ` Russell Leidich
2008-01-02 21:54 ` Andi Kleen
2008-01-02 22:32 ` Russell Leidich
2008-01-04 21:33 ` Russell Leidich
2008-01-04 22:26 ` Andi Kleen
2008-01-05 0:53 ` Russell Leidich
2008-01-05 13:24 ` Andi Kleen
2008-01-05 20:08 ` Russell Leidich
2008-01-08 23:42 ` Russell Leidich
2008-01-08 23:52 ` Andi Kleen
2008-01-09 2:28 ` Russell Leidich
2008-01-09 2:37 ` Andi Kleen
2008-01-11 2:21 ` Russell Leidich
2008-01-18 1:06 ` Russell Leidich
2008-02-03 0:10 ` Andrew Morton
2008-02-03 0:27 ` Harvey Harrison
2008-02-03 0:39 ` Andrew Morton
2008-02-03 0:50 ` [PATCH] x86: Remove pt_regs arg from smp_thermal_interrupt Harvey Harrison
2008-02-03 1:01 ` Harvey Harrison
2008-02-04 7:12 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2007-12-11 18:44 [PATCH] AMD Thermal Interrupt Support Russell Leidich
2007-12-11 19:13 ` Russell Leidich
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=200712290311.51176.ak@suse.de \
--to=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rml@google.com \
--cc=tglx@linutronix.de \
/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