From: Andrew Morton <akpm@linux-foundation.org>
To: "Dan Upton" <upton.dan.linux@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: accessing core temp sensors in the kernel
Date: Mon, 18 Feb 2008 04:59:49 -0800 [thread overview]
Message-ID: <20080218045949.d75c4ab3.akpm@linux-foundation.org> (raw)
In-Reply-To: <ba7d8f720802151312o643bae66p485287bc444103e9@mail.gmail.com>
On Fri, 15 Feb 2008 16:12:40 -0500 "Dan Upton" <upton.dan.linux@gmail.com> wrote:
> I'm trying to do some work on thermally-aware scheduling, specifically
> using the coretemp module to access core temperature sensors on the
> Intel Core2 platform. I know how to access them from user mode,
> reading files from sysfs, but clearly that's not the way to do it in
> the kernel. Specifically, I'm not sure how, in the scheduler, to get
> copies of the appropriate device structures to call
>
> static struct coretemp_data *coretemp_update_device(struct device *dev)
>
> (in hwmon/coretemp.c).
>
> Can anybody give me pointers where to get started?
You shouldn't make the core scheduler dependent upon some hwmon module.
I'd sugggest adding some register_cpu_temperature_monitor() function in the
scheduler then permit suitable monitoring modules to register themselves in
their module_init() functions. Use a notifier chain from notifier.h. The
CPU scheduler will walk that chain calling into the registered drivers at a
suitable time.
prev parent reply other threads:[~2008-02-18 13:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-15 21:12 accessing core temp sensors in the kernel Dan Upton
2008-02-18 12:59 ` Andrew Morton [this message]
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=20080218045949.d75c4ab3.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=upton.dan.linux@gmail.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 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.