Received: by 10.213.65.68 with SMTP id h4csp273443imn; Tue, 13 Mar 2018 04:04:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELtPgSKYWN726oaumX5EZeNT4fZ/gzBtm6EjeEoS4NS0i1xy7eaBqGlDUdtTjMToShaBOLVc X-Received: by 10.99.60.79 with SMTP id i15mr120064pgn.399.1520939051959; Tue, 13 Mar 2018 04:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520939051; cv=none; d=google.com; s=arc-20160816; b=KGfXBygadsur+vC96nWoeDZiFDBycz5W6pj8cvhe8UmWcYFbl+eEpjOVjH7xt4n7PS 9RLEI+kA3UZVyzug2S9PS2yNHBjaxeETKz9gi6ocyU3PxBOtAdeYFkBgA2tlLQZrkdiM vUVZjfECiiEvEBv6e/ExPQ0FfDYk4ikF/+VztNMT+1nqYDgAReiJ8I4kYevA5If9ZTOO J771iXKqdSWTGopiskrrwkMTHwPAkkMED0rlMNRG/iFTm1NYjXOwsQgDP0uuo6rRKO7Z ze/SX9ldPLFeX/TUiHYjB0MKQ5OfIL8IvzReZoBbhteaGG/sBx0FmjozBbMacTmtB94u U1gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=p4ZGeK5Db/BytbGjGBl3MXh76G7qIY2F+2nTPOVli2g=; b=q+pbkG8qxbqxVDfPh22aSRf63PZfgizPyCk2cFAiB9Lwq727g2yO645oAsloulik3Q 2qsR6S8TeQx49b2jCad7ocw0YoxRRhQ8DqWmFFBE9jcBGVYrXL4n+OGyqPm6xOPBzTnx 67lRjxjoFt+DfWfxhHQt2uljHgr/Q/QmpGOFcRpB8dB5UqYCoSl2xl7DHR7Pq8knZG7L 6UTy8J1P15ddWnjMTVh8HNJdnDqGU45KVid/0pVUcowk6qrHmZ44T0lkWEWIuEXqQU0u 9y1qts0qG0B/f4TZJCyw6liXQ6DMSaqs2SYXFhpweqjywv1+jmk729FGUA6Jwn5dHOeI GTlg== ARC-Authentication-Results: i=1; mx.google.com; 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 f33-v6si49897plb.482.2018.03.13.04.03.57; Tue, 13 Mar 2018 04:04:11 -0700 (PDT) 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; 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 S932825AbeCMLCP (ORCPT + 99 others); Tue, 13 Mar 2018 07:02:15 -0400 Received: from ozlabs.org ([103.22.144.67]:38211 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932577AbeCMLCN (ORCPT ); Tue, 13 Mar 2018 07:02:13 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 400sPZ421Fz9sTH; Tue, 13 Mar 2018 22:02:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Shilpasri G Bhat , Stewart Smith , linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, ego@linux.vnet.ibm.com, akshay.adiga@linux.vnet.ibm.com, svaidy@linux.vnet.ibm.com, "linux\@roeck-us.net \>\> Guenter Roeck" , Andrew Jeffery Subject: Re: [PATCH] powerpc/powernv : Add support to enable sensor groups In-Reply-To: <7b64ac19-5463-5f30-83bb-d5ff0611dc94@linux.vnet.ibm.com> References: <1511760988-10377-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <87bmjmzla7.fsf@concordia.ellerman.id.au> <06a771ec-fc79-0515-9166-f2a105eb33d0@linux.vnet.ibm.com> <87609nxfym.fsf@linux.vnet.ibm.com> <7b64ac19-5463-5f30-83bb-d5ff0611dc94@linux.vnet.ibm.com> Date: Tue, 13 Mar 2018 22:02:09 +1100 Message-ID: <87a7vcgrwu.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Shilpasri G Bhat writes: > On 12/04/2017 10:11 AM, Stewart Smith wrote: >> Shilpasri G Bhat writes: >>> On 11/28/2017 05:07 PM, Michael Ellerman wrote: >>>> Shilpasri G Bhat writes: >>>> >>>>> Adds support to enable/disable a sensor group. This can be used to >>>>> select the sensor groups that needs to be copied to main memory by >>>>> OCC. Sensor groups like power, temperature, current, voltage, >>>>> frequency, utilization can be enabled/disabled at runtime. >>>>> >>>>> Signed-off-by: Shilpasri G Bhat >>>>> --- >>>>> The skiboot patch for the opal call is posted below: >>>>> https://lists.ozlabs.org/pipermail/skiboot/2017-November/009713.html >>>> >>>> Can you remind me why we're doing this with a completely bespoke sysfs >>>> API, rather than using some generic sensors API? >>> >>> Disabling/Enabling sensor groups is not supported in the current generic sensors >>> API. And also we dont export all type of sensors in HWMON as not all of them are >>> environment sensors (like performance). >> >> Are there barriers to adding such concepts to the generic sensors API? > > Yes. > > HWMON does not support attributes for a sensor-group. If we are to extend HWMON > to add new per-sensor attributes to disable/enable, then we need to do either of > the below: > > 1) If any one of the sensor is disabled then all the sensors belonging to that > group will be disabled. OR > > 2) To disable a sensor group we need to disable all the sensors belonging to > that group. Either of those sound doable, the first is probably simpler, as long as there's some way for userspace to understand that it is modifying the state of the whole group. > Another problem is hwmon categorizes the sensor-groups based on the type of > sensors like power, temp. If OCC allows multiple groups of the same type then > this approach adds some more complexity to the user to identify the sensors > belonging to correct group. I don't really understand this one, what do you mean by "If OCC allows"? Also do we really expect users to be using this API? Or rather tools? > And lastly HWMON does not allow platform specific non-standard sensor groups > like CSM, job-scheduler, profiler. Have we actually made specific proposals to the hwmon maintainers on adding/changing any of the above? Have they rejected those proposals and told us to go away? cheers