From patchwork Wed Aug 23 07:23:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 110724 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp3745877qge; Wed, 23 Aug 2017 00:23:40 -0700 (PDT) X-Received: by 10.99.109.4 with SMTP id i4mr1791702pgc.281.1503473020221; Wed, 23 Aug 2017 00:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503473020; cv=none; d=google.com; s=arc-20160816; b=gtzfIQvOIxuU0GzPlkMogVFAXmPRZS6qAEid16+jfAn+2XFU24NMpA4NDIxgSU4p7d 8bwf7H6nPAuQF5T/jofyKvGS8hF/mjsLfaWIz4EDz7Unz79g196bVoerVvWY5L3brw5J YaDYsVf/B6rzuEWMt4AHAWO4D1eOxLDB/cjUvMc0mFBKsQBZk3w4nRNxZl5/ttWPA6Vo n/rLycDYOzasv5ZwjT10Rcr42QbOWwTlDwsU6FgktgiXNDgx5zVR93j/UW7a5z3Sv2Hp 8MUnQS6L89tEmtOO5NR16VRzVYb0TvsnM8VBriKN0yvL04vDnHllud+mHCgXOasZIq46 bJEQ== 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=o4sVjQalvQ57x3U/bM1GkbCO4xAtP1WbgkwjJFNdPmQ=; b=sTCZJ1BvVb+5EfzJaGdfamTQ8q/Cs20XFdxNIw3cVLuVXRoUJ4KTedIQ7WGIKWfkdq I4pCGDhBSH9BxOpvIv7GxQulXWBHT4cLvzV/5FmyKilv6fv9Nk2g2Wps3FxgyLEWSt2l IiQ7zrs+kLalr8EwPhTKtGryzMxe3ay5jhkEbQBgcXbLn/dylkWUmDEp383zhzwNKNEo lFGdj93cg/K15kURVJ6ke1QLbUHkhjT2Xs7HeUcazVuiXDaWprOt0dqv3Wfy+Zr6FUK3 WVjNvTL6AyVyHqUkQDRYPkcWGX9qnG17ydf8bQZFa5kccg/nkqgtFZY0Ih3wVVYg6wCo hAiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SMQuKIAK; 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 m6si616815pfa.578.2017.08.23.00.23.39; Wed, 23 Aug 2017 00:23:40 -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=SMQuKIAK; 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 S1753463AbdHWHXh (ORCPT + 26 others); Wed, 23 Aug 2017 03:23:37 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37557 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753396AbdHWHXf (ORCPT ); Wed, 23 Aug 2017 03:23:35 -0400 Received: by mail-wm0-f51.google.com with SMTP id b189so9165843wmd.0 for ; Wed, 23 Aug 2017 00:23:35 -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=o4sVjQalvQ57x3U/bM1GkbCO4xAtP1WbgkwjJFNdPmQ=; b=SMQuKIAKN5sW1ubvxkQ9XN8cz+tG+OkgZBdmPQo+StCzFGnGStBgORKdCGMMckw6c7 cJkgaSVlp0kzn59m4iGxedzgc3ImbLS9jW73yiOdGYyV6wN/GPGaDDw5/x6yjui2VqB1 mHv4y8fT8T6T3ujvw7tuVZsHTwOOK7AlMncrM= 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=o4sVjQalvQ57x3U/bM1GkbCO4xAtP1WbgkwjJFNdPmQ=; b=DPPcT1TEGhBSHoJzYzZ8qMWsRAqLRkR8MXWbiwCQ7locxoj3/0f3TETHCHmslr13td kj7aQSEF8eYktKO1N1USoapaDN0F6TS+S519CPSRRJYH0oqMFQniGG3TK9m+NNZJqIaX ObSjcMZB1RVqPqvbR26qMeP9q/wnB3AZSEin7E2XuDFACAIazoQOvJVa4d/+1DvL5qgr Zv6srXzsjAwnBN7L7MyvwLeR3xtiB1VGFttGSwyYeD82UmAJUGoSLsRWk1htGyzjWhY+ FTCwjENmYDdGbSJSeHy/NJV8yPDvuPZ6PeADEQU8cQ8P/VTcaK1k3K9syDRdaEmI5+4B oEKA== X-Gm-Message-State: AHYfb5ib4W1Eief4YhjX0SXPJ0TaawQ6NsKZ3YL0T6s3NHsWxWSCDF0s /9HQ7plCvXu5bAcz X-Received: by 10.80.194.82 with SMTP id t18mr2299764edf.113.1503473014244; Wed, 23 Aug 2017 00:23:34 -0700 (PDT) Received: from localhost.localdomain (li524-22.members.linode.com. [176.58.122.22]) by smtp.gmail.com with ESMTPSA id r1sm520349edb.38.2017.08.23.00.23.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Aug 2017 00:23:32 -0700 (PDT) From: Leo Yan To: Mathieu Poirier , Jonathan Corbet , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan , Kim Phillips Subject: [PATCH] doc: coresight: correct usage for '/dev/cpu_dma_latency' Date: Wed, 23 Aug 2017 15:23:18 +0800 Message-Id: <1503472998-9009-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 corrects the description when set latency = 0uS, in this case the idle state0 still can be selected by CPUIdle governor so this means on ARM platform the 'WFI' state is still enabled, but all other deeper states have been disabled so CPUs will not be powered off. Cc: Kim Phillips Reported-by: Kim Phillips Signed-off-by: Leo Yan --- Documentation/trace/coresight-cpu-debug.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/Documentation/trace/coresight-cpu-debug.txt b/Documentation/trace/coresight-cpu-debug.txt index b3da1f9..17ff8ed 100644 --- a/Documentation/trace/coresight-cpu-debug.txt +++ b/Documentation/trace/coresight-cpu-debug.txt @@ -150,8 +150,10 @@ 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 +states (if latency = 0uS then CPU Idle governor selects idle state0, so this +means 'WFI' is still enabled but other deeper states have be disabled, this +can avoid power off CPUs): +# exec 3<> /dev/cpu_dma_latency; echo "what_ever_latency_you_need_in_uS" >&3 Disable specific CPU's specific idle state: # echo 1 > /sys/devices/system/cpu/cpu$cpu/cpuidle/state$state/disable