Received: by 10.192.165.148 with SMTP id m20csp5217172imm; Wed, 9 May 2018 01:06:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo6rT5q/Yuc/+OsxxSVgchSPIjE/LCfrKnJZrgy7hq+RDuTSBqisFbTf4GUxCl+d69x6vAp X-Received: by 10.98.82.129 with SMTP id g123mr20399572pfb.22.1525853202112; Wed, 09 May 2018 01:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525853202; cv=none; d=google.com; s=arc-20160816; b=btPTtNgXuSNzLGlh47MszPvfab6WQe8rooK3wyd+s7qs/UMtwYcE/VbZZo2FOZzs3p yyOd6BVh0RldJP0E3cTLL/IOsxQTy35kAnztX+705bDfSZ9ycyd0lI/OZZwdnAGK5zlN j2w0uyDk2w4Qowsn9csAzvI9LrQpMraZbKCjZzLYXAbfRGnZfHJ2oAXX0MpS3oBiLIqB EYCj15VFj72gNVsunDPXR035f00EkrrTiYbzuDvkodCemT+uUnJW4kN+D+6s2lXRxy9p fjI2wjt0Y4w8CHvpQD3XrY+PFrps2oe+Z3Le43ik/DyPe6JO1kOmMK1ephnpqYNG52x/ c6+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ihmEDETw2t5vU8PPqNDmAA4ZRDgSvMr8w6LwevXbrYE=; b=BKVCTFBbS/sZ1wbL4UHo92FJxPCIGFy+gPdW4YXtYNP+yz/zEbmkE/o3mngUg6s1+p y0KzQfv6WjY9gKONUAww6tnEarG9f3+/MzSadW4dqt8ztCAvv64J3TvKaTZS/QhiInkf y5pvNAJa5RaQYRmp6gMDZYYiMzlHnA46CbhPWRdAaU2TlRtAiyUl5hA3CbriP9DjniUO EJ6HS9W6ZeEjg8UZJiQ/IaGcaMYR4TqgUbGDdt+liCTuO2qAb05aSynd3ClUOu0+UN7k uxaS+mTCth6/fmInw6bLXdkKh12Lo9uZrJgx1NFiroyEwGYmniEamtKVHhB1PU1ufIjD KOsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kDsV2G0W; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a204si24320472pfa.148.2018.05.09.01.06.27; Wed, 09 May 2018 01:06:42 -0700 (PDT) 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=fail header.i=@gmail.com header.s=20161025 header.b=kDsV2G0W; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933923AbeEIIFR (ORCPT + 99 others); Wed, 9 May 2018 04:05:17 -0400 Received: from mail-ot0-f175.google.com ([74.125.82.175]:41262 "EHLO mail-ot0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753339AbeEIIFK (ORCPT ); Wed, 9 May 2018 04:05:10 -0400 Received: by mail-ot0-f175.google.com with SMTP id t1-v6so39173421oth.8; Wed, 09 May 2018 01:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ihmEDETw2t5vU8PPqNDmAA4ZRDgSvMr8w6LwevXbrYE=; b=kDsV2G0W7FCaDbLISnBo9p+c5XccFnPXcakq9rAFhEcPksxvKgrgPAQrpeNxWh/+9b oIhIxChYJpAtsiqr5TgUfznkrMcN0XYHn7zR7/6Y/EP4k4FaTSzix/AZ0Q9kxSEj8GPF BJwAemaYxJZKmm0gZUVF3jXiYm3+aaieZtqxlFFqVzVYr0MkxY7740fnFgPGpJbwEKn5 WrxgYmUxJcP1Miecxnm+wP4P3beuUDxzPZbwoySCYT14RrtGpegciujV6mqG8GxJUZod o48HeR7YslzGVrAZZC/+bANXHLTHgyLz2vCK2CwYhJZPGwIB/lcp8PEkMSLsuVXFL8Ji Hsig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ihmEDETw2t5vU8PPqNDmAA4ZRDgSvMr8w6LwevXbrYE=; b=dyjT9aZEjETp4dVZcUHsFRTD6m/Gp2c59jPyAEgafnGhiOUAUeWtaYVvubG4hAQjzM Xh6P6ny98W/K/KqODCEDwbvYY1Gt61LSQZkgvxjquQMEge59pPmFowMMKP/AN3H0sGo4 r1ErdDpH9206x1kljlWmYTWPdH3uZHSGbqXLdkacbCYzh67lUdtycabfPRlNU+bHoqz1 M+vnq0jpsBHTJ9CA1y9dHsD9GnQHvnUzh5cK/zI2S7v6exR6i0lJW3hU1DJoPAicVooS rRxmyivIkc1RA26AE73+oCfpbYNkgUcCD0sQ/Vv6RCyzgQWhBx528WLxRWFVFjhk/FgC vjsQ== X-Gm-Message-State: ALKqPwfVT/QOKt8ImU2i8m6d11yQeJtcN49zRDXvoj9oW/Ldfo4FsjzB 3I62ejJXEvwVgJRfawAVxoWyHaf+SqTqK35G3H4= X-Received: by 2002:a9d:9d6:: with SMTP id 22-v6mr1170495otz.291.1525853109774; Wed, 09 May 2018 01:05:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1468:0:0:0:0:0 with HTTP; Wed, 9 May 2018 01:05:09 -0700 (PDT) In-Reply-To: <20180509070113.GB52784@joelaf.mtv.corp.google.com> References: <1525704215-8683-1-git-send-email-claudio@evidence.eu.com> <20180508065435.bcht6dyb3rpp6gk5@vireshk-i7> <20180509045425.GA158882@joelaf.mtv.corp.google.com> <20180509064530.GA1681@localhost.localdomain> <20180509065449.c5zotxqmuyatjgfd@vireshk-i7> <20180509070113.GB52784@joelaf.mtv.corp.google.com> From: "Rafael J. Wysocki" Date: Wed, 9 May 2018 10:05:09 +0200 X-Google-Sender-Auth: mldvmnP5vG1BsKAeM-Kj_2cs1oc Message-ID: Subject: Re: [RFC PATCH] sched/cpufreq/schedutil: handling urgent frequency requests To: Joel Fernandes , Juri Lelli Cc: Viresh Kumar , Claudio Scordino , Linux Kernel Mailing List , "Rafael J . Wysocki" , Peter Zijlstra , Ingo Molnar , Patrick Bellasi , Luca Abeni , Joel Fernandes , Linux PM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 9, 2018 at 9:01 AM, Joel Fernandes wrote: > On Wed, May 09, 2018 at 12:24:49PM +0530, Viresh Kumar wrote: >> On 09-05-18, 08:45, Juri Lelli wrote: >> > On 08/05/18 21:54, Joel Fernandes wrote: >> > Isn't this potentially introducing unneeded irq pressure (and doing the >> > whole wakeup the kthread thing), while the already active kthread could >> > simply handle multiple back-to-back requests before going to sleep? >> >> And then we may need more instances of the work item and need to store >> a different value of next_freq with each work item, as we can't use >> the common one anymore as there would be races around accessing it ? > > Exactly. I think it also doesn't make sense to over write an already > committed request either so better to store them separate (?). After the > "commit", that previous request is done.. Why is it? In the non-fast-switch case the "commit" only means queuing up an irq_work. Which BTW is one of the reasons for having work_in_progress even if your kthread can handle multiple work items in one go. You may try to clear work_in_progress in sugov_irq_work() instead of in sugov_work(), though. BTW, I'm not sure if the comment in sugov_irq_work() still applies. Juri?