Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2723522imj; Mon, 11 Feb 2019 07:32:01 -0800 (PST) X-Google-Smtp-Source: AHgI3IYuxqdzAC+1UjiMboTJgK+2RoJqB/YjStctqJUSs4eYV6CG2//jUm5UpUEXXqXuQjrREL9D X-Received: by 2002:a63:d70a:: with SMTP id d10mr5806350pgg.286.1549899121365; Mon, 11 Feb 2019 07:32:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549899121; cv=none; d=google.com; s=arc-20160816; b=S1DnMIqTzcb6NcxfLo4+oqTrldR0nC7gHxZYPf9F0sVQNUNvBqFAeqePsY1k4ZxSfZ Sg7xWKCIt8A/XYpsNGZNSOZZPT1H3ybwMASxw5L9UfoN/DnZfOay+lZdtKnF5PwoM82y eVgsNpYSz4isGcQNA0uzAHHK2mpdG1LzHEi67vC8nf02aoij7oxcut8q4vKpjNVuZo1k BxRQKxVOXyQYW6bQDo5rv1LuVKJYzIxb08/3xwTlXVl7oTkhdfOCKm/2rIokaG48qG+/ 3O3TKP9xlM584getncJmr+xZCCxMdosly2GNj9qbCao+G8I0INvAEw/LAfqh2VlYhow2 iOzQ== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=iZNbU3hmnXw0xfWxPScdUv+9QbhmsMCOAZDV9PAQsXA=; b=IqvPxkgjGh903lg6xHLpml6XxmUHJ5EUFBPdmrlFKh4B2nqCdzFJk8VuVUmlizPhGg 667U8foETu2fnjeqY0IAZ4FEk1nhsrpNtu32yjJXNcWA1WjfNgSa4so0m/R+0ZH8UObm WJbXYKoi/30JnAgPsVu1e0rlfPjNDXeXoZEw5AIxay7BJn/rb17LFGkKO/OhB3LWfsCD 7yFfF3ccflPtxuuTCNw6DT6FMg4lLzoE6ABQNEiF12yC7NaS7UagKfmTIDDvMoCdEZ0A N6izBTnATr/xOnMfuYotae7/jmQqLjhbAkDSAAJY4ecu16Vd2pyMQXr9OkzVwaE/CsmA +ROw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=PhjfGmVB; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d65si10489886pfc.201.2019.02.11.07.31.42; Mon, 11 Feb 2019 07:32:01 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=PhjfGmVB; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389988AbfBKPat (ORCPT + 99 others); Mon, 11 Feb 2019 10:30:49 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:44383 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387658AbfBKPaj (ORCPT ); Mon, 11 Feb 2019 10:30:39 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190211153038euoutp029528efe8c2e21b9cb89b24bc201797be~CWPazJq2x0337003370euoutp02z for ; Mon, 11 Feb 2019 15:30:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190211153038euoutp029528efe8c2e21b9cb89b24bc201797be~CWPazJq2x0337003370euoutp02z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1549899038; bh=iZNbU3hmnXw0xfWxPScdUv+9QbhmsMCOAZDV9PAQsXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PhjfGmVBI4k/m50GFcmG/UnBziVSsr55PfG1yoKg7Jxi2EAIB3LYdPAK5sZMYWObc W2gTsTReI+P8q4xw3D8EtM2q/bSH4Q7TmSduhpFLCDOmwLPGrfQwyMi9JbJf4g6kM+ w1Z0K7BRQ/Keokaxl4pZVuYMPAvecTqFo4hvPKAU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190211153037eucas1p1d4d8a65f0338177232d86a7ee091ceda~CWPaVeZLV1161511615eucas1p1g; Mon, 11 Feb 2019 15:30:37 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id F5.F4.04806.D15916C5; Mon, 11 Feb 2019 15:30:37 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190211153037eucas1p20b80e44795e3599dabd9c2fc0291c063~CWPZkULYp2542525425eucas1p24; Mon, 11 Feb 2019 15:30:37 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190211153036eusmtrp18836f963a6412fcd44145f88061f7d43~CWPZVcEWh0170801708eusmtrp1B; Mon, 11 Feb 2019 15:30:36 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-a1-5c61951ddd71 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id AF.C1.04128.C15916C5; Mon, 11 Feb 2019 15:30:36 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190211153036eusmtip162663b36549b3bc2517b4d9ca6281bc3~CWPYuPO_42441124411eusmtip1y; Mon, 11 Feb 2019 15:30:36 +0000 (GMT) From: Lukasz Luba To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: b.zolnierkie@samsung.com, myungjoo.ham@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, tkjos@google.com, joel@joelfernandes.org, chris.diamand@arm.com, mka@chromium.org, Lukasz Luba Subject: [PATCH v2 2/2] drivers: devfreq: change deferred work into delayed Date: Mon, 11 Feb 2019 16:30:05 +0100 Message-Id: <1549899005-7760-3-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549899005-7760-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDKsWRmVeSWpSXmKPExsWy7djP87qyUxNjDA7fV7HYOGM9q8W0T5dZ LK5/ec5qsaxB1eJs0xt2i1sNMhaXd81hs/jce4TRYu2Ru+wWnzc8ZrS43biCzeLwm3ZWi/eT ix14PdbMW8PoMbvhIovHgk2lHgs/fWX1OPhuD5NH35ZVjB6fN8kFsEdx2aSk5mSWpRbp2yVw Zayf6lCwnauia/IC1gbG1xxdjJwcEgImEus/3WDrYuTiEBJYwSgx8fUnJgjnC6NEy9E7LCBV QgKfGSU2fwiB6ehZOI0domg5o8Sjm5ugioA65s5J62Lk4GAT0JPYsaoQJCwiYCXxov0VWD2z wHwmiTNd61hBEsIC3hI933qZQGwWAVWJdS1PmUFsXgFPiRdvu9ghlslJ3DzXCRbnFPCSuLXu KtipEgLL2CXmb98HVeQi8f3QVBYIW1ji1fEtUHEZidOTe6DixRJnO1axQdg1Eu0nd0DVWEsc Pn6RFeRoZgFNifW79CHCjhLnNrWzgYQlBPgkbrwVBAkzA5mTtk1nhgjzSnS0CUFUa0hs6bnA BGGLSSxfMw1quIfE7LeXoI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8lsVQv+2p8ct3q6g8SZ/nOzAl/lj9bhvmmxNVzs/sDP/9POxm0 KOTDnJ23vqqkhrFrX1CxevJaX8xu4cqdi2Mu1/u8+hDvubjYKlyNpUsoSyd30/NJme1srCkr P27luHVXoG7n3n9Tfrfv8jrn4emcd5Hde3Faftty91ObPq9LMthvMuGxEktxRqKhFnNRcSIA 9CREvZMCAAA= X-CMS-MailID: 20190211153037eucas1p20b80e44795e3599dabd9c2fc0291c063 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190211153037eucas1p20b80e44795e3599dabd9c2fc0291c063 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190211153037eucas1p20b80e44795e3599dabd9c2fc0291c063 References: <1549899005-7760-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch changes deferred work to delayed work, which is now not missed when timer is put on CPU that entered idle state. The devfreq framework governor was not called, thus changing the device's frequency did not happen. Benchmarks for stressing Dynamic Memory Controller show x2 (in edge cases even x5) performance boost with this patch when 'simpleondemand_governor' is responsible for monitoring the device load and frequency changes. With this patch, the delayed work is done no mater CPUs' idle. All of the drivers in devfreq which rely on periodic, guaranteed wakeup intervals should benefit from it. Signed-off-by: Lukasz Luba --- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 882e717..c200b3c 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -400,7 +400,7 @@ static void devfreq_monitor(struct work_struct *work) */ void devfreq_monitor_start(struct devfreq *devfreq) { - INIT_DEFERRABLE_WORK(&devfreq->work, devfreq_monitor); + INIT_DELAYED_WORK(&devfreq->work, devfreq_monitor); if (devfreq->profile->polling_ms) schedule_delayed_work(&devfreq->work, msecs_to_jiffies(devfreq->profile->polling_ms)); -- 2.7.4