linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zwane Mwaikambo <zwane@linuxpower.ca>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Intel thermal monitor for x86_64 (updated)
Date: Thu, 18 Nov 2004 10:58:46 -0700 (MST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0411181053410.4034@musoma.fsmlabs.com> (raw)
In-Reply-To: <20041118163309.GK17532@wotan.suse.de>

On Thu, 18 Nov 2004, Andi Kleen wrote:

> On Thu, Nov 18, 2004 at 08:49:47AM -0700, Zwane Mwaikambo wrote:
> > diff -u -p -B -r1.1.1.1 mce.h
> > --- linux-2.6.10-rc1-mm5/include/asm-x86_64/mce.h	11 Nov 2004 17:21:48 -0000	1.1.1.1
> > +++ linux-2.6.10-rc1-mm5/include/asm-x86_64/mce.h	18 Nov 2004 13:18:38 -0000
> > @@ -64,4 +64,16 @@ struct mce_log { 
> >  #define MCE_GET_LOG_LEN      _IOR('M', 2, int)
> >  #define MCE_GETCLEAR_FLAGS   _IOR('M', 3, int)
> >  
> > +#define MCE_EXTENDED_BANK	20
> 
> But better use a higher bank (128 or somesuch). It wouldn't surprise
> me if Intel did something similar to their MCE architecture as 
> they did for their performance counters, and then 20 banks 
> in the hardware would be quite possible.

Will do.

> > +	static cpumask_t logged_cpus;
> > +	static unsigned long next_check[NR_CPUS];
> 
> Use per cpu data for this. 

I can do that, doesn't per_cpu do cacheline alignment? I was trying to 
avoid allocating more space.

> > +	/* Only log the first overheat condition, these can be spurious whilst
> > +	 * the Thermal Control Circuitry attempts to drop the temperature.
> > +	 */
> > +	if (!cpu_isset(m.cpu, logged_cpus)) {
> > +		cpu_set(m.cpu, logged_cpus);
> > +		mce_log(&m);
> > +	}
> 
> Does the comment match the code? I guess you mean the following
> events after the first can be bogus.
> 
> It seems a bit bogus to printk but not log for known spurious 
> conditions.

Well by spurious i mean that there will be a _lot_ of these events whilst 
the TCC attempts to reduce the processor temperature, i don't want to 
flood the mce log with the subsequent events.

> Also the next_check logic should already handle this I guess,
> becaumse I assume the temperature dropping won't take
> that long.  So I guess it would be best to drop that 
> and if it's still a problem use a longer next_check timeout
> of several seconds.

The temperature drop can take a while, i've observed 2-3 minutes if the 
processor is also loaded and the ambient temperature is low (20C). So you 
could lose 12 or so slots in the mce log due to the temperature ping 
ponging.

Thanks,
	Zwane

  reply	other threads:[~2004-11-18 18:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-18 15:49 [PATCH] Intel thermal monitor for x86_64 (updated) Zwane Mwaikambo
2004-11-18 16:33 ` Andi Kleen
2004-11-18 17:58   ` Zwane Mwaikambo [this message]
2004-11-18 20:01     ` Andi Kleen
2004-11-18 21:57       ` Zwane Mwaikambo
2004-11-19 15:51         ` Zwane Mwaikambo

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=Pine.LNX.4.61.0411181053410.4034@musoma.fsmlabs.com \
    --to=zwane@linuxpower.ca \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).