From patchwork Thu Jan 5 15:29:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 90039 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9021945qgi; Thu, 5 Jan 2017 07:30:34 -0800 (PST) X-Received: by 10.84.225.148 with SMTP id u20mr143406853plj.93.1483630234329; Thu, 05 Jan 2017 07:30:34 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si76389412plw.75.2017.01.05.07.30.34; Thu, 05 Jan 2017 07:30:34 -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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970948AbdAEPaY (ORCPT + 13 others); Thu, 5 Jan 2017 10:30:24 -0500 Received: from mail-it0-f41.google.com ([209.85.214.41]:35089 "EHLO mail-it0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969402AbdAEPaS (ORCPT ); Thu, 5 Jan 2017 10:30:18 -0500 Received: by mail-it0-f41.google.com with SMTP id c20so329079593itb.0 for ; Thu, 05 Jan 2017 07:30:18 -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=JS0clUdpmQaBBnZ2Xt0BJ+v5tzaOZ6JM77zZutZw7ik=; b=GYCyEXBNeXA/u0I+W9TsfJwXrq0aIsJS3U2YA3nibsvAyG8HvCUaxk1uVdDNPZYo1n 0TXfhuZzHZSB/FOB7jD/tyTZGq9NOONbMzxH+cS6NnRvIRYM86Ki+Z4nniIOKCz/DmhA fzSn6yGVJLRZ8KBDdZuJW4gwH/I8JNPQtX0LY= 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=JS0clUdpmQaBBnZ2Xt0BJ+v5tzaOZ6JM77zZutZw7ik=; b=PhhzNVPC33lRzKKEq2qxSqMnjyuYeVG1Ifzq05++ifqPa/fDo7KmKhFjgycitrEuDw 4NI77U6ga8OQdfA03+zQN7NOVB89ilW7fKY3dfEMpoB5ac6l5R1HgHH/uAeHRbXONkJt D4tXZVNDfumLDbUCi/z9nXcLTpmwLIhV7/E5IimTwf9cN+ltjON2Boly2iQLqxhq4QF6 ffueUqgHhzzf7xEzeFSm6CQzv7r+KP9Ih9uMEEPTgsDrD0S+tEsiiT/jTzfwhyZFV2+u PH4nwf7WLPYYqkSJ2Yi9KUWAY2LN0TGHliCgM9LOId2PEoSvZS1iRH9tcooIFPebes/S Hwsw== X-Gm-Message-State: AIkVDXJKG9u9tTGPe454S/PmNVsf9IjZhRtVN6cFmtEg0YoQq6CZbNMwUXOEHGJvq6d9oA2E X-Received: by 10.36.210.193 with SMTP id z184mr56436913itf.4.1483630218014; Thu, 05 Jan 2017 07:30:18 -0800 (PST) Received: from localhost.localdomain ([85.203.36.82]) by smtp.gmail.com with ESMTPSA id 130sm36051198ity.5.2017.01.05.07.30.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Jan 2017 07:30:17 -0800 (PST) From: Alex Shi To: Daniel Lezcano , "Rafael J . Wysocki" , vincent.guittot@linaro.org, linux-kernel@vger.kernel.org (open list) Cc: linux-pm@vger.kernel.org, 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, 5 Jan 2017 23:29:45 +0800 Message-Id: <1483630187-29622-2-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.8.1.101.g72d917a In-Reply-To: <1483630187-29622-1-git-send-email-alex.shi@linaro.org> References: <1483630187-29622-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 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 Acked-by: Rik van Riel 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; }