From patchwork Fri Sep 15 10:16:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 112702 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp438429qgf; Fri, 15 Sep 2017 03:17:38 -0700 (PDT) X-Received: by 10.84.218.199 with SMTP id g7mr27817532plm.215.1505470658664; Fri, 15 Sep 2017 03:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505470658; cv=none; d=google.com; s=arc-20160816; b=EXZzhEWzTZWkjd2ageVPpJmtIWIRDd8g3CSDFahvMbwXAWlVNmIZVIT95qt+4/BgbR Tmh9oX3vCTY5l6R56F+r2Gww0S6IEf092/1OKWiedYijuBF2i5oVSZviOV0mGzrWFmK9 HXxMdiPXVe7IdL76BeVbXyP0vPVi53IEne0K6A3bXqCQYDnJqHyDwPb72Y+tVhsEoBOz VqCRU39gOFcmomP6cFsJwuGyoDCi64v5lE5G+kztGkf21Cxg40Lko707JBxUpYDMHj7q g1zdhDaiumYn/zUs2G5EYLNj7DABppa/K44DfMdFj3fUw3ylV78wiAI2JktRMLwsUp9t m2YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=MMGVQYzqJcGEblv/EuTEVlbRNTNfu1WVPu8Hy8hiwKY=; b=iDFY4JwVPbDd82q1m+sUjPf0KKDiHNVaroTzefiQgkUntIu34s6/MW4gDBddk4yGgO KozciT1216IrO3iYczMqUNAHx05NqSM0cAyP4uW8W0uG0N7+MBv3cHdAaWqrzFEKm9Y5 qiSKoX7xt+SPecigfyzEayK4b5bqGHMNgeL8wUVmUGcgAZBN2USQYz0bEWeGJj70a3ZJ //n+V+LutxCbDyUpGI3Jjgy44rrIACMuXkVv2fPB7P7V7DR3SM5Xt/8AZLfW+KrnQ9MD uKa66jA997x8ZbUYomucJ4DPmEuOEojQExyiMmLHXrU7z5iZv3QrQuPgjRWVjd9CYsYR 2bhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gOYBjWcx; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si464325pln.251.2017.09.15.03.17.38; Fri, 15 Sep 2017 03:17:38 -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; dkim=pass header.i=@linaro.org header.s=google header.b=gOYBjWcx; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751423AbdIOKRg (ORCPT + 26 others); Fri, 15 Sep 2017 06:17:36 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:47074 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbdIOKRe (ORCPT ); Fri, 15 Sep 2017 06:17:34 -0400 Received: by mail-pg0-f49.google.com with SMTP id i130so1268050pgc.3 for ; Fri, 15 Sep 2017 03:17:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=MMGVQYzqJcGEblv/EuTEVlbRNTNfu1WVPu8Hy8hiwKY=; b=gOYBjWcxtui5cWM8Tynw678o7g1ImIxjpzvu3c1SUp0Toem4WrHzsTvakhQnSw8cNr jStXWOpO1V6bqnvtFAVD6l8EBc1CaPDt0QfB0eK+l8VkxVdOLsUq7Lf0QhftOz5Hcqkh aRAGfIuU5KyuyPaxliqS+0Zmak32WFNNbkZgo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MMGVQYzqJcGEblv/EuTEVlbRNTNfu1WVPu8Hy8hiwKY=; b=Z4BDyB688xanzqPu44iIyqRYfSr/ENWzWF9bLMLj2Rx+nNhU+lhlkRcH1S7os8Xirq awZJR9GWxtOEGXq9SgcnlnEaQSLmPhq20MkehwQFxARtkkUZ/Szj/LtWYcrUh9oRvh2I 2cedJtOf1k1Es7KAHwcSvemCrVZGj/bLE7zm/w/O2G0W/G2CDPMOlue++AxNi4N23nD5 b2mgMwQ6AINoSoSSHjQfyFzqE8cyD/tycJ//H+y2Tp57HeYKWznW0MjGKE11N+gANf9Q gly82oeLdAXlDQ5Qml6wJoSYphQ9l36wSsMRNuf70SDZ6IiATPaJy6SnWMD2gFWMjdqA IwVg== X-Gm-Message-State: AHPjjUilxzs+dGgVP6wUhzTxg2Q0ydtqUbzsmpcNfratnLisUuRkPqVB wBy2pI4c13YcxD2m X-Google-Smtp-Source: ADKCNb4NNRjnB9IBa1/T2iBf6xBu0FnBs+yxvtoBETCuIY+Z26VgU3iM0ts/2uk3gMW52kA6oo2n2Q== X-Received: by 10.159.252.75 with SMTP id t11mr18306774plz.441.1505470653709; Fri, 15 Sep 2017 03:17:33 -0700 (PDT) Received: from localhost.localdomain ([12.219.142.39]) by smtp.gmail.com with ESMTPSA id n2sm1794069pgq.30.2017.09.15.03.17.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Sep 2017 03:17:31 -0700 (PDT) From: Leo Yan To: linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Kim Phillips Cc: Leo Yan , Jonathan Corbet , Mathieu Poirier , Sudeep Holla Subject: [PATCH v2] doc: coresight: correct usage for disabling idle states Date: Fri, 15 Sep 2017 18:16:01 +0800 Message-Id: <1505470561-21982-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the coresight CPU debug document it suggests to use 'echo' command to set latency request to /dev/cpu_dma_latency so can disable all CPU idle states, but in fact this doesn't work. This is because when the command 'echo' exits, it releases the device node's file descriptor and the kernel release function removes the QoS constraint; finally when the command 'echo' finished there have no constraint imposed on cpu_dma_latency. This patch changes to use 'exec' to access '/dev/cpu_dma_latency', the command 'exec' can avoid the file descriptor to be closed so we can keep the constraint on cpu_dma_latency. This patch also adds the info for reference docs for PM QoS and cpuidle sysfs. Cc: Jonathan Corbet Cc: Mathieu Poirier Cc: Sudeep Holla Reported-by: Kim Phillips Signed-off-by: Leo Yan --- Documentation/trace/coresight-cpu-debug.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/Documentation/trace/coresight-cpu-debug.txt b/Documentation/trace/coresight-cpu-debug.txt index b3da1f9..205ff95 100644 --- a/Documentation/trace/coresight-cpu-debug.txt +++ b/Documentation/trace/coresight-cpu-debug.txt @@ -149,11 +149,15 @@ If you want to limit idle states at boot time, you can use "nohlt" or At the runtime you can disable idle states with below methods: -Set latency request to /dev/cpu_dma_latency to disable all CPUs specific idle -states (if latency = 0uS then disable all idle states): -# echo "what_ever_latency_you_need_in_uS" > /dev/cpu_dma_latency - -Disable specific CPU's specific idle state: +By using PM QoS interface '/dev/cpu_dma_latency', we can set latency +constraint to disable all CPUs specific idle states (see +Documentation/power/pm_qos_interface.txt, section 'From user mode'); +below is one example to set latency constraint to '00000000', it is +hexadecimal format with microsecond unit: +# exec 3<> /dev/cpu_dma_latency; echo '00000000' >&3 + +Disable specific CPU's specific idle state from cpuidle sysfs (see +Documentation/cpuidle/sysfs.txt): # echo 1 > /sys/devices/system/cpu/cpu$cpu/cpuidle/state$state/disable