From patchwork Thu Jan 12 13:27:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 91149 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1914237obz; Thu, 12 Jan 2017 05:27:31 -0800 (PST) X-Received: by 10.99.184.18 with SMTP id p18mr17656834pge.33.1484227651188; Thu, 12 Jan 2017 05:27:31 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 123si9297742pfe.90.2017.01.12.05.27.30; Thu, 12 Jan 2017 05:27:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751132AbdALN1Y (ORCPT + 13 others); Thu, 12 Jan 2017 08:27:24 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:34669 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363AbdALN1W (ORCPT ); Thu, 12 Jan 2017 08:27:22 -0500 Received: by mail-pf0-f175.google.com with SMTP id 127so13448150pfg.1 for ; Thu, 12 Jan 2017 05:27:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+ZWcJ6q1nMa9Pm/K35tRiZgEU01+zQN4uJzIuVOykng=; b=UnqzJfQ3jXcmG86sPxDjPpPdq4VRo/S1wHNZPZDZrUagCJ+LBKFRUe0ujHrtXYUjce 1bVN1AALsZF+5fJPh/hOYrnsdVgaurC/km0sPBa5AzazK3SvWPn8DHZtS9pQO9vc5nGQ EgX746PMgDj9ooCbfnnkDsjEvuVXAypxXOIWw= 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:in-reply-to :references; bh=+ZWcJ6q1nMa9Pm/K35tRiZgEU01+zQN4uJzIuVOykng=; b=kKEc9I9JVtzUvC+FCfl9/6EamDpaoHmwewRChjzqOz30m0QezsELXXpe6F6bFPd5Uf jrDhkaji0/VaUMum/BspPN3Hn8bHzmSM4dZVw+o7osNL0Cry06OsfJ6yOyN6ZnUuCWJs yuLWIxJ7sjdzrZou5zlHlG5UwpYdkHF98lo9Ef5qY+K3q29LeEUtbLN+WQdCyB5RwzqW 11qbrApN1NgQW7oy5IMDbxeOrdhGY7ubIYZeS7xI2XdOEGnHDQwP8wBKYO5iIFV2bz2m CUTXdtQk2iYtPu29i53aPpigQmdz7k3IrfDocJOJNqXznPFNGyL5LBaoCP3l1kLsKVX4 ID+A== X-Gm-Message-State: AIkVDXJCCw/+2nYeigfF6FOmVmokcFZYotZcTLoxMYH06r/Y26SRjiDXA0tbFFU76li1+gPd X-Received: by 10.99.61.13 with SMTP id k13mr17467353pga.154.1484227641950; Thu, 12 Jan 2017 05:27:21 -0800 (PST) Received: from localhost.localdomain ([85.203.36.61]) by smtp.gmail.com with ESMTPSA id h17sm21849939pfh.62.2017.01.12.05.27.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 05:27:21 -0800 (PST) From: Alex Shi To: Greg Kroah-Hartman , Daniel Lezcano , "Rafael J . Wysocki" , vincent.guittot@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alex Shi , Ulf Hansson , Rasmus Villemoes , Arjan van de Ven , Rik van Riel Subject: [PATCH 1/3] cpuidle/menu: stop seeking deeper idle if current state is too deep Date: Thu, 12 Jan 2017 21:27:02 +0800 Message-Id: <1484227624-6740-2-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.8.1.101.g72d917a In-Reply-To: <1484227624-6740-1-git-send-email-alex.shi@linaro.org> References: <1484227624-6740-1-git-send-email-alex.shi@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The obsolete commit 71abbbf85 want to introduce a dynamic cstates, but it was removed for long time. Just left the nonsense deeper cstate checking. Since all target_residency and exit_latency are going longer in deeper idle state, no needs to waste some cpu cycle on useless seeking. Signed-off-by: Alex Shi Acked-by: Rik van Riel To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Ulf Hansson Cc: Daniel Lezcano Cc: Rasmus Villemoes Cc: Arjan van de Ven Cc: Rik van Riel Cc: "Rafael J. Wysocki" --- drivers/cpuidle/governors/menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.8.1.101.g72d917a -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index d9b5b93..07e36bb 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -357,9 +357,9 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) if (s->disabled || su->disable) continue; if (s->target_residency > data->predicted_us) - continue; + break; if (s->exit_latency > latency_req) - continue; + break; data->last_state_idx = i; }