From patchwork Thu Mar 28 13:33:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 161301 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp719874jan; Thu, 28 Mar 2019 06:34:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrugQrCzXUITke5Mh2UFZLYPsnF57oddBqaJOzeikOGWTSsKas2rV7/wiDtZu6nTqIhVPG X-Received: by 2002:a63:c104:: with SMTP id w4mr12756972pgf.409.1553780063913; Thu, 28 Mar 2019 06:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553780063; cv=none; d=google.com; s=arc-20160816; b=ixSCILKdyeny7IgnnpAU/Vmc3oAZk/Dw35m25FohnRkM2nOQ0VhZvryrr5y10zuQXW YmjrtnqWddUywTcU9aUJDRJJ/y8E5JsdZA4LaQgGh3puvpWDCDC3dH/y0kCM1qg8cg6D DfXH2XITP3RiSTrQ8INT3N44ZzKYUTOWoQcer2JW4/8rMgEMsv5wtqMf8egVwzCnbAAy SJ2JSAB+RtCJ2vSgGdlBtOcWmG039Fp+iX5G/rSFuwhmRK8tn+R03MFv3jFhx6jWyKFb PnnlAzZAD1m5/uHJBwdb7N1Mi+x1VO79vQB+BNoPV8hhw92/Mxgkg2ULHPjPn4yZMPr+ zdGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=p4AX2XkTSl1QR+qkvh1VClffO/EcWFBqxYrWQgYNSJ8=; b=dAZtqoMpU1GbUr4BaujE9Tl9/XM2sSuugE4+gihg9OncANCO2NJms/6rNuKEHyKUEt V1/5/0cuBgiCVVIA3BDj0dRXpoOK8kQbVsD076Qt0codaVkkh46gWeBvfx7jgzZZhT4H iRA38Up/CqDXWLjlsgmCL2s51D6n82FNn9SjscQYexxBxCTjryG7IHMBFjf0Sba1u8Vl kQzO7Sp0D2sUmxSlF5xIjUyN1AL/evTl+x+gpGmgXh+/5KOM1EP2lb8uj5AUKyF/0xL1 /Mx4F/Ivgoxz0uDhr4FUC01OLz6m0JmGvkvSTEGsG0YBh7wzvaK3lAnya76cqvaF4LAP v4IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=HGeJWQoF; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si21290232plt.198.2019.03.28.06.34.23; Thu, 28 Mar 2019 06:34:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=HGeJWQoF; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726046AbfC1NeX (ORCPT + 3 others); Thu, 28 Mar 2019 09:34:23 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:38785 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC1NeX (ORCPT ); Thu, 28 Mar 2019 09:34:23 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190328133421euoutp01fd1441e40f99d6bc9efd39b805ba71fc~QIrvOuS8d2538125381euoutp01P; Thu, 28 Mar 2019 13:34:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190328133421euoutp01fd1441e40f99d6bc9efd39b805ba71fc~QIrvOuS8d2538125381euoutp01P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553780061; bh=p4AX2XkTSl1QR+qkvh1VClffO/EcWFBqxYrWQgYNSJ8=; h=From:To:Cc:Subject:Date:References:From; b=HGeJWQoFHMehUDkbfNQsEDdh5AQ8HZnWh/VMZOMeWgpV6YhfvUl5HEbYkM2vrpP1i Jw8rYjsTNyG+jjdVQt3VBru28t0V3nLhHyHLt/us1w5zmt3oP5stSkLHonCSyHfBeG wv9DMxda0NkGk0QcSZlGAOyiwfoI0qHc8UvSh7p8= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190328133421eucas1p2f80731bda3196cb0f6073a137b4a5c45~QIru0lMOv2269822698eucas1p2R; Thu, 28 Mar 2019 13:34:21 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id B8.82.04377.C5DCC9C5; Thu, 28 Mar 2019 13:34:20 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190328133420eucas1p2859cc7d789c2b8c6aade473903d5149f~QIruDiNpG2464224642eucas1p2F; Thu, 28 Mar 2019 13:34:20 +0000 (GMT) X-AuditID: cbfec7f4-12dff70000001119-5c-5c9ccd5c42a2 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 50.39.04146.C5DCC9C5; Thu, 28 Mar 2019 13:34:20 +0000 (GMT) Received: from AMDC2765.DIGITAL.local ([106.120.51.73]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PP2004EEWD22630@eusync1.samsung.com>; Thu, 28 Mar 2019 13:34:20 +0000 (GMT) From: Marek Szyprowski To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Daniel Lezcano , "Rafael J. Wysocki" Subject: [PATCH] cpuidle: exynos: Unify target residency for AFTR and coupled AFTR states Date: Thu, 28 Mar 2019 14:33:58 +0100 Message-id: <20190328133358.6922-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIIsWRmVeSWpSXmKPExsWy7djP87oxZ+fEGMz+pmuxccZ6Vot5n2Ut zp/fwG7xufcIo8WM8/uYLNYeuctuceb0JVYHdo9NqzrZPO5c28PmseVqO4tH35ZVjB6fN8kF sEZx2aSk5mSWpRbp2yVwZTz5PIup4AZ/xYcZt5kaGB/ydDFyckgImEi82fmXrYuRi0NIYAWj xJ6JK5khnM+MEtNutjLCVO3a1Q6VWMYocXr7VKiW/4wSN35NYwWpYhMwlOh628UGYosI2EvM 3TaZCaSIWeApo8TRnVfBEsIC0RJ/J8wEGsvBwSKgKvHniSlImFfARuLdzMNQ2+QlVm84ALZN QuAtq0Tzm+/sEAkXiTdH97FB2DISnR0HmSCKmhklHp5byw7h9DBKXG6aATXKWuLw8Ytg5zEL 8ElM2jadGWSzhACvREebEESJh8SN+19YQGwhgViJi51vWScwii9gZFjFKJ5aWpybnlpslJda rlecmFtcmpeul5yfu4kRGFGn/x3/soNx15+kQ4wCHIxKPLwfds+JEWJNLCuuzD3EKMHBrCTC e2slUIg3JbGyKrUoP76oNCe1+BCjNAeLkjhvNcODaCGB9MSS1OzU1ILUIpgsEwenVAPj/OOH gxw9Gxkjzroo2stOPT3bS6nMsMnrwBrGdd9/5DCUL93V8vmoNdPHLs77C7kkJq5Z/rVSJ7D6 6JnrOe7XQm+9yVTuq7iUxi62R+9U1R9p5Yr3h3625l/ZeiTg1nXRcyxer69NCpVROXKnmNXo 9WbmFN6ZL5/v6tF0WbG4QkHY8IPZoo/mSizFGYmGWsxFxYkAUK4aeKQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLJMWRmVeSWpSXmKPExsVy+t/xy7oxZ+fEGPQ95rLYOGM9q8W8z7IW 589vYLf43HuE0WLG+X1MFmuP3GW3OHP6EqsDu8emVZ1sHneu7WHz2HK1ncWjb8sqRo/Pm+QC WKO4bFJSczLLUov07RK4Mp58nsVUcIO/4sOM20wNjA95uhg5OSQETCR27Wpn7mLk4hASWMIo cbrxEwuE08gkceflQkaQKjYBQ4mut11sILaIgL3E3G2TmUCKmAVeMkosP/cFKMHBISwQLbH7 eC6IySKgKvHniSlIOa+AjcS7mYcZIZbJS6zecIB5AiPXAkaGVYwiqaXFuem5xYZ6xYm5xaV5 6XrJ+bmbGIGBsO3Yz807GC9tDD7EKMDBqMTD+2H3nBgh1sSy4srcQ4wSHMxKIry3VgKFeFMS K6tSi/Lji0pzUosPMUpzsCiJ8543qIwSEkhPLEnNTk0tSC2CyTJxcEo1ME5Ov7xlrYVZ1Qxd du/J4qf+5Ew7Gi/7I/So/w6FN91Lzh9gs98/ofreNp3XJ1mMOs0eyHOuuyZYdE/6S6CibOj7 vIehrVsuXg/yVH3iJP16fur6t44rt83WswlwrvJJ2SHh8XSd7Lm9LhZvfy+625C56lDI9EfJ 8t+WG62Svb0nc2YPm/fKHwuVWIozEg21mIuKEwFZVVXFAAIAAA== X-CMS-MailID: 20190328133420eucas1p2859cc7d789c2b8c6aade473903d5149f CMS-TYPE: 201P X-CMS-RootMailID: 20190328133420eucas1p2859cc7d789c2b8c6aade473903d5149f References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Since commit 45f1ff59e27c ("cpuidle: Return nohz hint from cpuidle_select()") Exynos CPUidle driver stopped entering C1 (AFTR) mode on Exynos4412-based Trats2 board. Further analysis revealed that the CPUidle framework changed the way it handles predicted timer ticks and reported target residency for the given idle states. As a result, the C1 (AFTR) state was not chosen anymore on completely idle device. The main issue was to high target residency value. The similar C1 (AFTR) state for 'coupled' CPUidle version used 10 times lower value for the target residency, despite the fact that it is the same state from the hardware perspective. The 100000us value for standard C1 (AFTR) mode is there from the begining of the support for this idle state, added by the commit 67173ca492ab ("ARM: EXYNOS: Add support AFTR mode on EXYNOS4210"). That commit doesn't give any reason for it, instead it looks like it was blindly copied from the WFI/IDLE state of the same driver that time. That time, that value was probably not really used by the framework for any critical decision, so it didn't matter that much. Now it turned out to be an issue, so unify the target residency with the 'coupled' version, as it seems to better match the real use case values and restores the operation of the Exynos CPUidle driver on the idle device. Signed-off-by: Marek Szyprowski --- drivers/cpuidle/cpuidle-exynos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/cpuidle/cpuidle-exynos.c b/drivers/cpuidle/cpuidle-exynos.c index a95c7907a1fb..7284495d4869 100644 --- a/drivers/cpuidle/cpuidle-exynos.c +++ b/drivers/cpuidle/cpuidle-exynos.c @@ -84,7 +84,7 @@ static struct cpuidle_driver exynos_idle_driver = { [1] = { .enter = exynos_enter_lowpower, .exit_latency = 300, - .target_residency = 100000, + .target_residency = 10000, .name = "C1", .desc = "ARM power down", },