Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp139146ybx; Wed, 6 Nov 2019 14:32:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxNB0o0WTUr/4xsduVL88Uhypq8DammRheuraT5w2fKm7G5jaDLKlJFki7cE2hwdcH1YukG X-Received: by 2002:a17:906:11cf:: with SMTP id o15mr18662eja.208.1573079522594; Wed, 06 Nov 2019 14:32:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573079522; cv=none; d=google.com; s=arc-20160816; b=uesNTSmxnUl9K7yilfJT7oxnEtO7KVKQSTnTDAxTgyfGMJnwR2WGIcGO7yXqT1U4MR sMNIp0lMB3rYz0gCpSBaYhTbmKfP87653hPMnOZdOD8xrQEa/V9T+UY3BFGkcbILHJQx 4ul7n+BoXirDQSqe87YODSALCpG+kpy/eknGgYM9Z4RkWETyEw7K8nQtFNqon4ueU6XO Ap+4Ia7KsL88Y8Yj9sVjBsOyckZ23vV1P33JiiTHxyd23QymMc7TXUmCB5RJEwNRqdhT q3AkVUHCk16o8697C02dh/WIQ1ZZQMKBUd11XO+ca5Ehoz3Fma0m6lOLbXLImjsFVqZS WgLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mPlyd2uOwDFOJHnR0FcKb5obhlxfQ+BfqyeB8GcPgsM=; b=hgQgABubp7K5CDk5Rb9WiUCorHN+Ax+fdvHzawe7I5G0JFqHgq3dq8MYH2VismFV5i Gmh6G74KchLIFNQiGjWfA/1aDDBj4paDs0sSGSx6feznSFrOuWPBW2QHXIIvsmaMS1Lj n49fan2XHTVAJqZ11Y0Za5VgjGkXw/BdWtbmqsU8Dq2/K1gqDlvG3DeZ+vxYs51b5R6U o4siLmh94/G2JCbaV3wdX4b00E/Wjsc7tO8Th+Ffi1tdhUv8pAkK1/Td4Uc143wZUqTp BiWXfEHqXRE4M2tHFBsCK7KmqTwobdizydbERF2JRhmwhaFepqcHdCzmCh7P28QHrGny S1aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ipYgt89j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e32si14033473eda.267.2019.11.06.14.31.38; Wed, 06 Nov 2019 14:32:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ipYgt89j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727376AbfKFWau (ORCPT + 99 others); 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-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