linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Guenter Roeck <linux@roeck-us.net>,
	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 18:21:49 -0500	[thread overview]
Message-ID: <yq1wob1jfjm.fsf@oracle.com> (raw)
In-Reply-To: <CACRpkdYjidQHB0=S_brDxH3k+qJ2mfXCTF9A3SVZkPvBaVg6JQ@mail.gmail.com> (Linus Walleij's message of "Thu, 12 Dec 2019 23:33:21 +0100")


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
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.

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.

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?

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2019-12-12 23:22 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 [this message]
2019-12-13  4:18       ` Guenter Roeck
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=yq1wob1jfjm.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --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=linux@roeck-us.net \
    /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).