Re: [PATCH v2] nvme: Add hardware monitoring support

From: Akinobu Mita
Date: Thu Oct 31 2019 - 09:46:59 EST


2019å10æ30æ(æ) 23:05 Christoph Hellwig <hch@xxxxxx>:
>
> On Wed, Oct 30, 2019 at 08:16:48PM +0900, Akinobu Mita wrote:
> > The nvme_init_identify() can be called multiple time in nvme ctrl's
> > lifetime (e.g 'nvme reset /dev/nvme*' or suspend/resume paths), so
> > should we need to prevent nvme_hwmon_init() from registering hwmon
> > device more than twice?
> >
> > In the nvme thermal zone patchset[1], thernal zone is registered in
> > nvme_init_identify and unregistered in nvme_stop_ctrl().
>
> So Guenter said above the thermal subsystem could use the information
> from hwmon as well. Does this mean this patch would solve your needs
> as well?

The main reason I chose thermal framework was to utilize the temperature
threshold feature for notification on crossing a trip point temperature
without polling for smart log.

But the device I used for testing doesn't seem to report asynchronous
event immediately, so I'm not fully sure that's useful for now.

I have no problem with this nvme hwmon patch. Maybe we can integrate
the temperature threshold feature into the nvme hwmon afterward.