linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	"linux-acpi@vger" <linux-acpi@vger.kernel.org>,
	lm-sensors@lm-sensors.org, lenb@kernel.org, trenn@suse.de
Subject: Re: Conversion of ACPI fan+thermal to hwmon sysfs
Date: Thu, 08 Mar 2007 17:28:04 +0800	[thread overview]
Message-ID: <1173346084.10227.136.camel@localhost.localdomain> (raw)
In-Reply-To: <20070302121304.9db20131.khali@linux-fr.org>

On Fri, 2007-03-02 at 12:13 +0100, Jean Delvare wrote:
> Hi Zhang,
> 
> > On Thu, 2007-03-01 at 08:06 +0100, Jean Delvare wrote: 
> > > Indeed, ACPI thermal zone may have more thermal trip points than the
> > > hwmon interface specifies. Two of the trip points can be mapped to
> > > temp1_max and temp1_crit, respectively. If we want to handle them all,
> > > then probably we have to implement Henrique's suggestion and really
> > > think in terms of thermal zones, i.e. the trip points would be mapped
> > > to temp1_auto_point[1-*]_temp and possibly associated with a fan speed
> > > output.
> > 
> > Well, ACPI thermal zones are not only a logical collection of interfaces
> > to temperature sensors, trip points and thermal property information,
> > but also take charge of thermal controls, i.e. setting platform's
> > cooling mode policies.
> > I don't know if I missed something, but from Documentation/hwmon/sysfs-
> > interface, I can't find any interface that make it possible.
> 
> As I don't know what these "cooling mode policies" are, I can't really
> tell. Trip points in hwmon let the user define the desired fan speed
> depending on a temperature measurement, and that's about it. You can't
> associate other actions at the moment, essentially because hardware
> monitoring chips themselves can't do anything else. If it would be
> convenient for the ACPI case to add something else, we can discuss
> additional interface files.
> 
OK.
I still have some problems.

First, ACPI thermal zone can be used to set different cooling policies,
i.e. passive cooling mode and active cooling mode.
In passive mode, just as Matthew Garrett described, ACPI thermal may
throttle the CPU if the passive trip point is triggered, i.e. cool a
thermal zone by decreasing the performance of the devices(always CPU
now) in the zone.
The active cooling mode will use one or more active devices(usually fan)
to decrease the temperature, which consume extra power. And this is
really like the way that the hwmon is doing.
So we can only map the active cooling policy to hwmon, right?

Second, one ACPI thermal zone may have more than one fan devices, even
one active trip point may associate with several fan devices. And this
seems to be different from the sensors, doesn't it?

Third, ACPI can not get/set the fan speed. It can only deal with the fan
D-state. Fan is on in D0 state and off in D3 state.
IMO, the hwmon sysfs interface make it very convenient for users to
define the desired fan speed depending on a temperature measurement.
And it seems that we can't take use of this if we map ACPI thermal and
fan to hwmon-like sysfs interface, right?

This is my understanding of the hwmon. And if there is something wrong,
please help me point it out. :)

> My original idea was to simply add a read-only hwmon-like interface to
> the acpi fan and thermal modules. I didn't plan to replace the current
> interfaces offered by these modules, at least not directly. There must
> be many user-space tools and scripts relying on these at the moment, so
> we need a transition period anyway.
> 
Agree.
I've already finished the patch to duplicate ACPI procfs function in
sysfs, i.e. export the similar information while in sysfs style. And I
think this can make it not so painful for use-space tools and scripts to
convert to sysfs interface.
Oh, a _read-only_ interface? Then, it will be much easier.
But what is it used for?

Thanks,
Rui

  parent reply	other threads:[~2007-03-08  9:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-24 18:20 RFC: conversion of ibm-acpi to hwmon sysfs Henrique de Moraes Holschuh
2007-02-26 16:27 ` [lm-sensors] " Jean Delvare
2007-02-28  9:31   ` Zhang Rui
2007-02-28 14:34     ` Conversion of ACPI fan+thermal " Henrique de Moraes Holschuh
2007-03-02  1:12       ` Zhang Rui
2007-03-02 11:13         ` Jean Delvare
2007-03-02 11:43           ` Matthew Garrett
2007-03-08  9:28           ` Zhang Rui [this message]
2007-03-08 11:13             ` [lm-sensors] " Hans de Goede
2007-03-08 13:13             ` Henrique de Moraes Holschuh
2007-03-09  8:53               ` Jean Delvare
2007-03-01  7:06     ` [lm-sensors] RFC: conversion of ibm-acpi " Jean Delvare
     [not found]   ` <20070226172716.b2e956b7.khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
2007-02-26 18:06     ` Henrique de Moraes Holschuh
2007-02-27  9:01       ` Jean Delvare
2007-02-27 15:41         ` Henrique de Moraes Holschuh
2007-02-28 14:38     ` Henrique de Moraes Holschuh
2007-03-01  7:10       ` Jean Delvare

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=1173346084.10227.136.camel@localhost.localdomain \
    --to=rui.zhang@intel.com \
    --cc=hmh@hmh.eng.br \
    --cc=khali@linux-fr.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=trenn@suse.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;
as well as URLs for NNTP newsgroup(s).