Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp309170rdd; Tue, 9 Jan 2024 05:04:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNXA9tZw88wyCdT+KYgL/XB+3ccBIk7EgbyfmL3FYQInO3w3zVfqjCWdKG6LXbbbKEsNGx X-Received: by 2002:a17:903:25c2:b0:1d4:ede8:afcf with SMTP id jc2-20020a17090325c200b001d4ede8afcfmr2348660plb.41.1704805452309; Tue, 09 Jan 2024 05:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704805452; cv=none; d=google.com; s=arc-20160816; b=V7P3KfdGWnttzUrWtpWOBgalg0X7X34ftKhtoCcv9Jzi2kUDLT4uq2yVQ5WbasxQCB qMA/TXFCExVx+2UsVJTYeCDzNE6IRnH2mYrFCVbYWEv4R4+wbFvOswuqCUvLQ4BWP0oi raUxtpp/0wENdz0sRrfyRWpLuDiLwMJP6/JSoL6ADQ/bRfF+8TJDlzJFRPUwxK4oPEB6 VtPPbQRBYcxyoA7fERsKnAzykWgbCTsWdkDsOLpvQQMiWQyGlzN7SuDbCsQeMbRDyk4k tuJhg4my4lxT2qsoZKUslH/VkuqgDCeFWPYzu1mJSMpvXddaMcRoO9SdVBStz5YsfF6U NMAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=QWME94cXQ/3qVZMyQj3YnPKl2hXPE6WytxavIt7lCh0=; fh=ymcsnAaC1SQlb5lGdBlkOTYSbhiZra5ooTbeJ59onVU=; b=lnm54FOKIu/V1WPEcLCORfzC1FQZ6pCIzeMNsO6DahVJCVoa+2DbiAUY0GD/UHzAj3 o4HxZ3ICJaH/evYkAqM+dO59ZmErGDnXPj4kbXzvJGXFPLaqkhA/qhKr4Ka1hcPIMcey uLMUM2ojMDyDxMdfg6dAHq4ObXnUtIE6HASPUL3QBtTILvz/e0/EFRrMujzyupb1Gi4/ X+U8xpRK8eAL771MDZ6U+r48BupTIsfH67jUe4esYRDeTCUa9txQ7xvvw6rLR3M0Vjqe n3NQNtXwMpu1+8aLbM0gP0nvPQWzxzuMhies/CHx9nHQmq3AwJtxq//2fpZZThwQe8lS PPVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-20875-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20875-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s88-20020a17090a2f6100b0028cca22ee0asi7293523pjd.143.2024.01.09.05.04.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:04:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20875-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-20875-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20875-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2A4C0285FC1 for ; Tue, 9 Jan 2024 13:04:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC35C39AC4; Tue, 9 Jan 2024 13:02:58 +0000 (UTC) Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 183CF39AE0; Tue, 9 Jan 2024 13:02:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-204b216e4easo593571fac.1; Tue, 09 Jan 2024 05:02:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704805376; x=1705410176; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QWME94cXQ/3qVZMyQj3YnPKl2hXPE6WytxavIt7lCh0=; b=imbBs1oiI+Pn1L4XIqLytOCX7iYPTsjQkbASA2Jduys9MqOYJvSbOHso1UKMt92EkK pNKgD+x9iVTD+VCKxzyT9bWM2s1Bhfc0R0QgpUTYv7QoqL3qaWQrBkySR3bIKIsVeziB gBND03DoZaQvRRhdL+Vyz8UnR+eHOflXPpCLnb9Cc2KGHMGzVcTL5yxnrk8Y+dw1svI6 jAr5I3Lnb956gV+VIeCT720SmGukCTgNBuV8HSw17mgzGHh0uqg+3c94kT+X59qYn2kg ZxP9wg29AbBTcfJtBSyHEKZD0TxoASKhdN2Ub43/d6BRXefE0zyoD6PslabAvy0iI5KX f3zg== X-Gm-Message-State: AOJu0Yyb/iTK1FO5pileIOTftIpHLsbQORmaW8VTilGE3rXJQaJ5Nhut nTTjX7rA9AssPbv+PrncOSRslN2S2v5K1Hh3ilc= X-Received: by 2002:a05:6870:c115:b0:204:9066:c34f with SMTP id f21-20020a056870c11500b002049066c34fmr10003149oad.5.1704805376024; Tue, 09 Jan 2024 05:02:56 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240109094112.2871346-1-daniel.lezcano@linaro.org> <20240109094112.2871346-2-daniel.lezcano@linaro.org> In-Reply-To: <20240109094112.2871346-2-daniel.lezcano@linaro.org> From: "Rafael J. Wysocki" Date: Tue, 9 Jan 2024 14:02:44 +0100 Message-ID: Subject: Re: [PATCH v6 2/2] thermal/debugfs: Add thermal debugfs information for mitigation episodes To: Daniel Lezcano Cc: rjw@rjwysocki.net, lukasz.luba@arm.com, rui.zhang@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 9, 2024 at 10:41=E2=80=AFAM Daniel Lezcano wrote: > > The mitigation episodes are recorded. A mitigation episode happens > when the first trip point is crossed the way up and then the way > down. During this episode other trip points can be crossed also and > are accounted for this mitigation episode. The interesting information > is the average temperature at the trip point, the undershot and the > overshot. The standard deviation of the mitigated temperature will be > added later. > > The thermal debugfs directory structure tries to stay consistent with > the sysfs one but in a very simplified way: > > thermal/ > `-- thermal_zones > |-- 0 > | `-- mitigations > `-- 1 > `-- mitigations > > The content of the mitigations file has the following format: > > ,-Mitigation at 349988258us, duration=3D130136ms > | trip | type | temp(=C2=B0mC) | hyst(=C2=B0mC) | duration | avg(= =C2=B0mC) | min(=C2=B0mC) | max(=C2=B0mC) | > | 0 | passive | 65000 | 2000 | 130136 | 68227 | = 62500 | 75625 | > | 1 | passive | 75000 | 2000 | 104209 | 74857 | = 71666 | 77500 | > ,-Mitigation at 272451637us, duration=3D75000ms > | trip | type | temp(=C2=B0mC) | hyst(=C2=B0mC) | duration | avg(= =C2=B0mC) | min(=C2=B0mC) | max(=C2=B0mC) | > | 0 | passive | 65000 | 2000 | 75000 | 68561 | = 62500 | 75000 | > | 1 | passive | 75000 | 2000 | 60714 | 74820 | = 70555 | 77500 | > ,-Mitigation at 238184119us, duration=3D27316ms > | trip | type | temp(=C2=B0mC) | hyst(=C2=B0mC) | duration | avg(= =C2=B0mC) | min(=C2=B0mC) | max(=C2=B0mC) | > | 0 | passive | 65000 | 2000 | 27316 | 73377 | = 62500 | 75000 | > | 1 | passive | 75000 | 2000 | 19468 | 75284 | = 69444 | 77500 | > ,-Mitigation at 39863713us, duration=3D136196ms > | trip | type | temp(=C2=B0mC) | hyst(=C2=B0mC) | duration | avg(= =C2=B0mC) | min(=C2=B0mC) | max(=C2=B0mC) | > | 0 | passive | 65000 | 2000 | 136196 | 73922 | = 62500 | 75000 | > | 1 | passive | 75000 | 2000 | 91721 | 74386 | = 69444 | 78125 | > > More information for a better understanding of the thermal behavior > will be added after. The idea is to give detailed statistics > information about the undershots and overshots, the temperature speed, > etc... As all the information in a single file is too much, the idea > would be to create a directory named with the mitigation timestamp > where all data could be added. > > Please note this code is immune against trip ordering but not against > a trip temperature change while a mitigation is happening. However, > this situation should be extremely rare, perhaps not happening and we > might question ourselves if something should be done in the core > framework for other components first. > > Signed-off-by: Daniel Lezcano Both patches in the series look good to me now, so I'll queue them up for 6.8-rc1. Thanks!