Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3083081imj; Mon, 11 Feb 2019 13:36:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IbGyRDpl7OMMJqWmchatuabAokcf/LwA6svR25hDv6bEKX7NGr98kEsEhUnDxuY/eK46FG1 X-Received: by 2002:a17:902:b48d:: with SMTP id y13mr315252plr.273.1549920989772; Mon, 11 Feb 2019 13:36:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549920989; cv=none; d=google.com; s=arc-20160816; b=KvNjmXEb4PFm8TWhHrxE/K44uQZ+OHbiOC7ip1K58xENUkLL6yyVo/klC9KL/4EYIn J6/aqeVGvNH+4Y9eAxPvjTRynfoYVnHWzEDm+DU9Gc8LrwOemZDHt4p3oY4ccHDn5VSM M3uzzxZKVszBRefalRJHa+LxBlEZua2HLs+sT6/454E0UT4c31bjKuh4wAnz37LeWNeB pTtdAJ1V4zBgy0w5K+oxjnt6Uewdi4zeM+DvMZD7JsVA4gJV+WtJKUNetkKm+ZY9mthJ qS4zjjmpI2dUa8ddKeUnBFfCjk7QeXAadi1n9qmMTY9Lkt3awaKRdcoV2ccrpKVuTj2o xkww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fs2joAK0y9U2nanZE4aHcmKCwBJbNzSo5xDzf8iGRPA=; b=ILMdM7Tvhmu/TLyPX2a6c3Y7cIv6ucpY7V61F6RDWjP4LmZWwT+IX8W+KoiE6DWUtD BsGGNzzJqxwu19z60LF0J7lCn5+z9kCBKU5wfq/APUfv8bWM+1ETLcY/phzhH7MB89Ig Q61Mx/2Wpqw0DMRCbzKFjSuj5tGUmHgYqyrjd5GlMh/PI24BHuAls0jdO66qL//NG8wt bePgeS+I5ONv0fVD57dPoxnbj8ehmoPiVM2wSqjWOhthhruf8t2PHXjDVOs3kkl8ygLz jGti9wIu5SMIZSwl4nF+C3cjm4VoSRY6YcMHS2g6y1u77l18dYMZmPTb6d84ne9nK4Qy TXWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IIfOezWw; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61si10758173plc.364.2019.02.11.13.36.13; Mon, 11 Feb 2019 13:36:29 -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=@chromium.org header.s=google header.b=IIfOezWw; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727576AbfBKVgF (ORCPT + 99 others); Mon, 11 Feb 2019 16:36:05 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36065 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727341AbfBKVgE (ORCPT ); Mon, 11 Feb 2019 16:36:04 -0500 Received: by mail-pg1-f193.google.com with SMTP id r124so177769pgr.3 for ; Mon, 11 Feb 2019 13:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fs2joAK0y9U2nanZE4aHcmKCwBJbNzSo5xDzf8iGRPA=; b=IIfOezWwDfoeAkMnrRLkeYuImGEuQZVAUeNQQFXWiUNc3WY2ThdrBtbzd3EdUb4e0+ WuoZ4G5jtrVaYis0Vu9s6DMm74jvr0/RO6+c57BQci7NC50+wjgLFUIWDWJk2n2ZiRay Xuix5PpMmW4psZuxjnK61SRhT/CxjhMS+loV4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fs2joAK0y9U2nanZE4aHcmKCwBJbNzSo5xDzf8iGRPA=; b=e0xXGINZGmm6R7N5ESzIo003T+rKYhtjLWBp7uYoRFZ4Eii2cZaq8DTeSXE9GqYvPy QC1lZiI2Zylq1CjOaM3dmZtminPcx7B1C/YTvcMVQQjryP5TIYHD6ThJeFTJm0nD01WD hdl9Q6r8hzWHeE8kUoeuBduRt0TMyhLhxL70you0VVEi28JGaFbkh0MJ32EPJwdqY971 JkdwaRtu2J2ElMXfMC/ADSUfEIMhFOoJLU9lVYxeq1MXZW87LJMzElqiJY0sFbn/4Vex n06OVDAZS9B+CCIapkzrFivGsiNJY9ySMf7PX5Bohe6eEwExjy15mkU8rRdtbFyGJwq/ tDpg== X-Gm-Message-State: AHQUAuYj73jIdsdGxhNYueRdSTLwDtwwYKV7bQB0PM2Ye9s9VnwOi2HB U5mCOE9z1IH0sim7ZeVf9rnj9Q== X-Received: by 2002:a62:5003:: with SMTP id e3mr354492pfb.23.1549920963992; Mon, 11 Feb 2019 13:36:03 -0800 (PST) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id 23sm4979515pfn.134.2019.02.11.13.36.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 13:36:03 -0800 (PST) Date: Mon, 11 Feb 2019 13:36:02 -0800 From: Matthias Kaehlcke To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, 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 Subject: Re: [PATCH v2 2/2] drivers: devfreq: change deferred work into delayed Message-ID: <20190211213602.GQ117604@google.com> References: <1549899005-7760-1-git-send-email-l.luba@partner.samsung.com> <1549899005-7760-3-git-send-email-l.luba@partner.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1549899005-7760-3-git-send-email-l.luba@partner.samsung.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lukasz, On Mon, Feb 11, 2019 at 04:30:05PM +0100, Lukasz Luba wrote: > 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)); I'd suggest to swap the order of the patches in this series. Why, you may ask, if the end product is the same? This patch ([2/2]) fixes an actual problem, while IIUC [1/2] is just an improvement, the fix doesn't really depend on it. If -stable wants to integrate the fix, they also need to pick the improvement (or resolve a conflict), which might not be desired. Otherwise this looks sane to me: Reviewed-by: Matthias Kaehlcke