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: 9499195 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B0B27606B4 for ; Thu, 5 Jan 2017 15:30:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6ACD2840E for ; Thu, 5 Jan 2017 15:30:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9917128416; Thu, 5 Jan 2017 15:30:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B23928416 for ; Thu, 5 Jan 2017 15:30:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970948AbdAEPaY (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP 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" Acked-by: Rik van Riel --- drivers/cpuidle/governors/menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }