Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2347972ybc; Wed, 20 Nov 2019 12:44:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwwaSvjJSYn1eTCBH+x+iBxvcfZsiQ7XFn6/MSZ4PGvserwH2OBUedBdTdYssXi99ZmH/9e X-Received: by 2002:a17:906:e289:: with SMTP id gg9mr7770594ejb.71.1574282686441; Wed, 20 Nov 2019 12:44:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574282686; cv=none; d=google.com; s=arc-20160816; b=DgxLGLB6w5hSKASO8chaMp+znYPqzxlx40UdxUnsZLQZZCK0vbIgQJ6ZeZdQNnWbKj SjhrnBkyjR/1CASeel3PpA7ZlZWQU7srXWEfBj4UNJq82bEAP59dByx30FJzjzLJsBIT 0aqtX0Ok0pXuI9ZTDtjePvNA4bpkyGRIujQNIXav3dy8wtrAyZrbSG7vPOBWnLbLAkjV TuISZOOGNee76hy0wobHXPBO/citVgnuRl0x2U7W3p+7EWe2Q1zF+JCJLvXs5wRPaRjv GzTHRhVRM7c2bqQHuF4gq6rfQ8+/ZcTlWB8tjHxBPAzeFs5Uq4A9+Mpk9PZVBFrpRKWG d2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :mime-version:dkim-signature; bh=nyBLSCTTtt5n7mjKsup/aXNQTrJFGc26pyfB3rOzBFI=; b=n/zXiSoTHx2TuUT6+sPor4oT7Ger59uEBd/suzY91ZQmA4P5RJbBbT1/ivPn2ol3tn dq8c3sTouvOVIFt8SGvuAdzFQLquK/h/rbOeaGe/ibzgfnb++46a8xOUUX/j2q8qP/O2 alGD23UaDU+Q07tefh16XOds9Sf73+qak3Fh6Q7n7j67e+mm9JSdirz17u5uFeqwNY+1 8K5smObS0msY4tzWNpMBmSbaCjfIprPl8lh3pvNX0zC0ODxDQ5O5DWtp2PtwArRyK2HP 81r0VdjEcNvgF6MorZasnBBePQqkGisymuXoTUH557VolOnDh0BFW0jvmrPYH8Ozq8sd s7Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DIJI0YDc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p21si447025edc.305.2019.11.20.12.44.23; Wed, 20 Nov 2019 12:44:46 -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=pass header.i=@gmail.com header.s=20161025 header.b=DIJI0YDc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726220AbfKTUmO (ORCPT + 99 others); Wed, 20 Nov 2019 15:42:14 -0500 Received: from mail-ot1-f43.google.com ([209.85.210.43]:34292 "EHLO mail-ot1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725306AbfKTUmO (ORCPT ); Wed, 20 Nov 2019 15:42:14 -0500 Received: by mail-ot1-f43.google.com with SMTP id w11so875054ote.1 for ; Wed, 20 Nov 2019 12:42:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=nyBLSCTTtt5n7mjKsup/aXNQTrJFGc26pyfB3rOzBFI=; b=DIJI0YDcTBbtPiapkFOz+3nFkau+pm+nxGbAkxLDHTJFEJWnDdq4XYezJ8cQcHi6+h SzVFskoXIMo63JsPXrxCMuOw6uiDvt3qgxc+/ssH9HM3sGL71xRYDwZvYqiX7nq4E6HO g42+jM3qGbxaS3ds4x4I3uApeJW10PGu0/kdhAoeu5k2qljZGIh/AfAU/hr4WhFVWS3E GlnTAgbMa1PT3fkwFriF6Pl2NZWmAsp0uNdpn3pbhLYJPHWT9zzyleE6GFxaJrddoDGl 8OBDCT1975mKzY3ysrj/xGLFVcujbeuc2CvE6lByGMXHz6Ey+4Zzj0Jw6ZyOFxozNfj3 bPsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=nyBLSCTTtt5n7mjKsup/aXNQTrJFGc26pyfB3rOzBFI=; b=JU+V4c2Y67WsrcRhSRl4PrLBr1Ls5W5iCpj4rd+BpsJ2eJuD7XzohHXRopRJsdIFWh koVxCZdd0YIppFQos+UsAbEkCXG2ZJlyPlNXvAyD6uphYiNL7Y3OCK/LY5gQ4wOu12uP ySISLIgdedQFR1Ww6ea964dJLpeB4MOp09VO5jQ0eZYtrn/xD2DMGxZgTiawv8dvXV1H WhTbUx7ibUb3p2UUCFjGrS59Hmbl8KBqA5UkALm9VNYb+mC4WiUuqVuUNpqsX0ZnesPm 3LAHb2Nlag/cEY0AwoQqxLjR58oL/oPkk+48ExYlUo8XsC59XZJm7/ZZFc0Dyhc/XiBQ eLHA== X-Gm-Message-State: APjAAAW57Cw16SaW0Re2oRb1fmlYahr48gPoscyN4VVsIzigNJGa2brz 8qCcqnX7Jtao4LWsatFUXEvoPSqK4fK84rlGeEXECAbt X-Received: by 2002:a9d:2c25:: with SMTP id f34mr3408794otb.27.1574282532878; Wed, 20 Nov 2019 12:42:12 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a9d:384:0:0:0:0:0 with HTTP; Wed, 20 Nov 2019 12:42:12 -0800 (PST) From: Tom Psyborg Date: Wed, 20 Nov 2019 21:42:12 +0100 Message-ID: Subject: [RFC] why do sensors break CPU scaling To: Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Recently I've needed to set lowest CPU scaling profile, running ubuntu 16.04.06 I used standard approach - echoing powersave to /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor. This did not work as the /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq kept returning max scaling freq. During testing of ubuntu 19.10 I've found that the above approach actually does work, but as long as there are no xsensors (or just sensors from cli) being run. cpuinfo_cur_freq in this case was returning variable values +- 1% of around 1.4GHz. As soon as I issue sensors command cpuinfo_cur_freq jumps to 3.5GHz for a fraction of second and returns back to 1.4GHz afterwards. If running xsensors it keeps bouncing between 1.4 and 3.5GHz all the time. Rebooted back to 16.04.6 and was able to set lowest CPU scaling freq as well, but issuing sensors command here once just breaks CPU scaling that now remains at about 3.5GHz. It can be set to lowest scaling freq again without rebooting but it needs to change scaling_governor for all cores to something else and then back to powersave. Why is this happening, shouldn't sensors command just read temp/fan values without writing to any of the CPU control registers?