From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F24D7FC6194 for ; Wed, 6 Nov 2019 22:30:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC84D2166E for ; Wed, 6 Nov 2019 22:30:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ipYgt89j" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727614AbfKFWau (ORCPT ); Wed, 6 Nov 2019 17:30:50 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:40415 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbfKFWau (ORCPT ); Wed, 6 Nov 2019 17:30:50 -0500 Received: by mail-pl1-f195.google.com with SMTP id e3so10045639plt.7; Wed, 06 Nov 2019 14:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mPlyd2uOwDFOJHnR0FcKb5obhlxfQ+BfqyeB8GcPgsM=; b=ipYgt89j3kpMg5qiTffNN6LdEoQP3g88e4XH3OUIaj0Z1pwFVRdoVoPrav7ormtT6e Yf6Zlqm0O6Cu2dz1Jgu7MzZ6i7vvuOMrZlc+520c0B5WoTg1vngQsV9E8VQ5/y8FEPAf sZs+isfCarOcx8lO2M2uDUS5piSvkSVBJ+Fsm5JnyE4Bn1FWsFBLumzdq3eFlOmqY1hS UblmrDi/CJE/00/cMNHcjqsxiKXlTRKCaf2phgBK+xzt3Lo3A7IofRysuc854zYiHqal epMUIgkSu5EO5pgC/oalwJLC4H+zrJoRTTZBRlpOnKIyvDs6Deyr00nN4xehlV4PpMNH Qr9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=mPlyd2uOwDFOJHnR0FcKb5obhlxfQ+BfqyeB8GcPgsM=; b=KJDQg7M7FjrZODb6HWiJ6l4tOZ6FsYieEKMeC//y2eb1OrdqY892XR8GgEYV28YITo phqsvZMvkAgqEFjKyvrP2YBZ4ua6kpD/BA1PlvYqxlj92gouvA+d+Xjc03bfM5TJK3d+ Xi5qSV8U4+G5jDsrCWYNiDCCrIYGDLq/Q2niCU94RjKeQRNJLufF39tSrvsyWrTPvDGh 6hJPgqa0HHN1siBFPbocKO14MPrWcRRBGyt+5uioN8diCMXrPMXlVOf7EXNlWObvwoDo C9oyaswLfMObIyDV+MiJ/2MVy2SY1YygSZXMDT2oV8/nonvjmBGmMlCMz92mi+Lir4A1 t7Hw== X-Gm-Message-State: APjAAAW2P3KOysytZXojhrHUJLnI9+NQv1JnualAhDPJnKrPyrwKE7u1 NLKkLBvmOct7eOHM/+pCMdE= X-Google-Smtp-Source: APXvYqz/nEBTHz99NrVlIxam5Ibb6hcu+7t9BxFhU/n7xTbsGLzwL4ZkdOXjp/g2h9VT2OgKYIofkA== X-Received: by 2002:a17:902:860a:: with SMTP id f10mr5228913plo.233.1573079449371; Wed, 06 Nov 2019 14:30:49 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id o7sm8717360pjo.7.2019.11.06.14.30.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2019 14:30:48 -0800 (PST) Date: Wed, 6 Nov 2019 14:30:46 -0800 From: Guenter Roeck To: Pavel Machek Cc: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Akinobu Mita , linux-pm@vger.kernel.org, Chris Healy Subject: Re: [PATCH v2] nvme: Add hardware monitoring support Message-ID: <20191106223046.GA19493@roeck-us.net> References: <20191029223214.18889-1-linux@roeck-us.net> <20191030005327.GC15332@redsun51.ssa.fujisawa.hgst.com> <20191106212921.GA7020@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191106212921.GA7020@amd> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 06, 2019 at 10:29:21PM +0100, Pavel Machek wrote: > Hi! > > > > nvme devices report temperature information in the controller information > > > (for limits) and in the smart log. Currently, the only means to retrieve > > > this information is the nvme command line interface, which requires > > > super-user privileges. > > > > > > At the same time, it would be desirable to use NVME temperature information > > > for thermal control. > > > > > > This patch adds support to read NVME temperatures from the kernel using the > > > hwmon API and adds temperature zones for NVME drives. The thermal subsystem > > > can use this information to set thermal policies, and userspace can access > > > it using libsensors and/or the "sensors" command. > > > > > > Example output from the "sensors" command: > > > > > > nvme0-pci-0100 > > > Adapter: PCI adapter > > > Composite: +39.0°C (high = +85.0°C, crit = +85.0°C) > > > Sensor 1: +39.0°C > > > Sensor 2: +41.0°C > > > > > > Signed-off-by: Guenter Roeck > > > > This looks fine to me, but I'll wait a few more days to see if there are > > any additional comments.. > > User wants to know temperature of /dev/sda... and we already have an > userspace tools knowing about smart, etc... > > pavel@amd:/data/film$ sudo hddtemp /dev/sda > /dev/sda: ST1000LM014-1EJ164: 48°C > > I see we also have sensors framework but it does _not_ handle > harddrive temperatures. > > Does it need some kind of unification? Should NVMe devices expose > "SMART" information in the same way other SSDs do? > The unification to report hardware monitoring information to userspace is called the sensors framework. Also, users in general prefer to not have to run "sudo" to get such information. Guenter