linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: linux-hwmon@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
	Chris Healy <cphealy@gmail.com>
Subject: Re: [PATCH 1/1] hwmon: Driver for temperature sensors on SATA drives
Date: Thu, 12 Dec 2019 20:18:11 -0800	[thread overview]
Message-ID: <541a7ddd-f4c9-5d5f-4f43-0ae5bc46aef6@roeck-us.net> (raw)
In-Reply-To: <yq1wob1jfjm.fsf@oracle.com>

On 12/12/19 3:21 PM, Martin K. Petersen wrote:
> 
> Linus,
> 
>> It's a nice addition with the SCT command, I never figured that part
>> out. Also nice how you register the scsi class interface I never saw
>> that before, it makes it a very neat plug-in.
> 
> Yep, I agree that the patch looks pretty good in general. There are just
> a few wrinkles in the detection heuristics I would like to tweak. More
> on that later.
> 
> Yesterday I added support for the SCSI temperature log page and am
> working through some kinks wrt. making this work for USB as well.
> 
>> When I read the comments from the previous thread I got the impression
>> the SCSI people wanted me to use something like the SCT transport and
>> the hook in the SMART thing in the libata back-end specifically for
>> [S]ATA in response to the SCT read log command.
> 
> Our recommendation was for libata-scsi.c to export the SCSI temperature
> log page, just like we do for all the other ATA parameters.
> 
> However, in tinkering with this the last couple of days, I find myself
> torn on the subject. For two reasons. First of all, there is no 1:1
> sensor mapping unless you implement the slightly more complex
> environmental log page. Which isn't a big deal, except out of the
> hundred or so SCSI devices I have here there isn't a single one that
> supports it it. So in practice this interface would probably only exist
> for the purpose of the libata SATL.
> 
> The other reason the libata approach is slightly less attractive is that
> we need all the same SMART parsing for USB as well. So while it is
> cleaner to hide everything ATA in libata, the reality of USB-ATA bridges
> gets in the way. That is why I previously suggested having a libsmart or
> similar with those common bits.
> 
> Anyway, based on what I've worked on today, I'm not sure that libata is
> necessarily the way to go. Sorry about giving bad advice! We've
> successfully implemented translations for everything else in libata over
> the years without too much trouble. And it's not really that the
> translation is bad. It's more the need to support it for USB as well
> that makes things clunky.
> 
>> I don't understand if that means the SCT read log also works
>> on some SCSI drives, or if it is just a slot-in thing for
>> ATA translation that has no meaning on SCSI drives.
> 
> It's an ATA command.
> 
> One concern I have is wrt. to sensor naming. Maybe my /usr/bin/sensors
> command is too old. But it's pretty hopeless to get sensor readings for

You'll need the command (and libsensors) from the lm-sensors package version
3.5 or later for it to recognize SCSI/ATA drives.

> 100 drives without being able to tell which sensor is for which
> device. Haven't looked into that yet. The links exist in
> /sys/class/hwmon that would allow vendor/model/serial to be queried.
> 

There is a device/ subdirectory which points to that information.
Is that what you are looking for ? "sensors" displays something
like satatemp-scsi-5-0, which matches sd 5:0:0:0:

> Oh, and another issue. While technically legal according to the spec, I
> am not sure it's a good idea to export a sensor per scsi_device. I have
> moved things to scsi_target instead to avoid having bazillions of
> sensors show up. Multi-actuator drives are already shipping.
> 

Not sure I understand what you mean with 'bazillions of sensors' and
'sensor per scsi_device'. Can you elaborate ? I see one sensor per drive,
which is what I would expect.

Thanks,
Guenter

> If I recall correctly, though, I seem to recall that you had some sort
> of multi-LUN external disk box that warranted you working on this in the
> first place. Is that correct? Can you refresh my memory?
> 


  reply	other threads:[~2019-12-13  4:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09  5:21 [PATCH 0/1] Summary: hwmon driver for temperature sensors on SATA drives Guenter Roeck
2019-12-09  5:21 ` [PATCH 1/1] hwmon: Driver " Guenter Roeck
2019-12-09  5:28   ` Randy Dunlap
2019-12-09  6:00     ` Guenter Roeck
2019-12-09 17:08   ` Bart Van Assche
2019-12-09 19:20     ` Guenter Roeck
2019-12-10 16:10       ` Bart Van Assche
2019-12-12 22:33   ` Linus Walleij
2019-12-12 23:21     ` Martin K. Petersen
2019-12-13  4:18       ` Guenter Roeck [this message]
2019-12-17  2:47         ` Martin K. Petersen
2019-12-17  4:20           ` Guenter Roeck
2019-12-18  3:39             ` Martin K. Petersen
2019-12-11  4:08 ` [PATCH 0/1] Summary: hwmon driver " Martin K. Petersen
2019-12-11  5:57   ` Guenter Roeck
2019-12-17  2:35     ` Martin K. Petersen
2019-12-17  3:57       ` Guenter Roeck
2019-12-17  5:50         ` Damien Le Moal
2019-12-17 15:47           ` Guenter Roeck
2019-12-18  3:42         ` Martin K. Petersen

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=541a7ddd-f4c9-5d5f-4f43-0ae5bc46aef6@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=cphealy@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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).