Received: by 10.192.165.148 with SMTP id m20csp5245897imm; Wed, 9 May 2018 01:43:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqjpO0vSVHEPUCkGqafQlqMlmu7urgDZSvtY+xXGIMDg6YQYhgbqmG6droFDeUNm+FoqFBh X-Received: by 10.98.147.200 with SMTP id r69mr43167939pfk.59.1525855423307; Wed, 09 May 2018 01:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525855423; cv=none; d=google.com; s=arc-20160816; b=nij+M699UtCBpEl/fZ9KIcrUcwPli7a4xP7OjuZTlBDcAMD8FZ/s/Zp1S+4c1oa7NP R/LmZV7ogJLii78Z7+vLd3tO/dizusqGhN67JBB6UigwrACIzJVRow9K73R6cvYzyUhR ioGkVzrUlz3Y1CnvATGRbkMKQn4psfhIqQ2jK8+Fv3TeA0i/inA3R0rromIhUmocBuUr r5iCzkE/NfiBWxblk1gj2hpbZg0320zaU6gj2qsnpLAkV2PTzcDG508uBWyOYXYAplEQ nrhIHp4qlWSDHD9cj9n/cAu+UUCFwqn7qXAcHRJV7D/i1hH7I1IqNp8PB2o2vUCikP0N hMlg== 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:arc-authentication-results; bh=IW9CnavzERmEv12KE9fnBy70MseXEuW51oOrEnw9aR4=; b=cEi9gXLY27woqR130voUjlrjzwquKjQkmcD3UM6qGYoc9m1uba+TSQKzpyYWY4713R 5kux/edUd7Tuq1EGy4nhTu2G6fWSasxm8XjnCQKl6DxUhzO41otXnMBV9LgxLYu+PssT 8vhYJ5WrwZkY2HtKchXTGQDj7wTls8GEZZfRj96RTX1EU0TDpc4xHeOhyOTYbjtte+V2 yj/AJbdZH3rDvayVpr8XymWKAISdyiUSAFVeOIpV4l2RGer/HG8nqTur57tPRPUuca7p iJe03d5h2OO21XSqbcCzL07Ao/ceSqjhq7ETbBYooYzemApjkhSleba9mTrpKVvd0UNq NKHw== ARC-Authentication-Results: i=1; mx.google.com; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w64si17787658pfw.201.2018.05.09.01.43.28; Wed, 09 May 2018 01:43:43 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934337AbeEIIm3 (ORCPT + 99 others); Wed, 9 May 2018 04:42:29 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:44588 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934371AbeEIIlv (ORCPT ); Wed, 9 May 2018 04:41:51 -0400 Received: by mail-wr0-f195.google.com with SMTP id y15-v6so23146888wrg.11 for ; Wed, 09 May 2018 01:41:50 -0700 (PDT) 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=IW9CnavzERmEv12KE9fnBy70MseXEuW51oOrEnw9aR4=; b=UtaFvwXapoKfLGcEur8BciDwpy5b5HUao7gaXbNLufiEIVBCtPPb6B2y8QNmhvYAMW O1hAucfLgyau2YVsSL0LnrF4Dfh9qUSiSDCe1zrefbTZzBLal5OxujHw5MlvtJRT+lqJ DUnmKNHKSXyfQPCMMMaE2tD3LqeMVp8Ce2QOf4WiFTf0rPs7jCnVTPNWIQIOOPXU0nqX 9Ebp5q0AvZOEgEKx5fXHn3OKAL1z1XzQTyIj429/Rob6lAd6dsE22/vQ03iuu8VEMP3P XLBm8zK8PC+Hb2xAeYFOPosTj7D//vUIKLVE8GhZESnBsPIefCcmtLgyjAhTPkoujeI5 djjw== X-Gm-Message-State: ALQs6tAukNgF8w0reQOu8rGAkywR4OG2YlswfASlSVs8MU3vtbA4k2kW pcCPYs6++vn1q6+nVEVVdxRO/w== X-Received: by 2002:adf:e3c1:: with SMTP id k1-v6mr37409066wrm.94.1525855310098; Wed, 09 May 2018 01:41:50 -0700 (PDT) Received: from localhost.localdomain ([151.15.207.48]) by smtp.gmail.com with ESMTPSA id w31-v6sm65648096wrb.93.2018.05.09.01.41.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 01:41:49 -0700 (PDT) Date: Wed, 9 May 2018 10:41:47 +0200 From: Juri Lelli To: "Rafael J. Wysocki" Cc: Joel Fernandes , Viresh Kumar , Claudio Scordino , Linux Kernel Mailing List , "Rafael J . Wysocki" , Peter Zijlstra , Ingo Molnar , Patrick Bellasi , Luca Abeni , Joel Fernandes , Linux PM Subject: Re: [RFC PATCH] sched/cpufreq/schedutil: handling urgent frequency requests Message-ID: <20180509084147.GC1681@localhost.localdomain> 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> <20180509082350.GB1681@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/05/18 10:25, Rafael J. Wysocki wrote: > On Wed, May 9, 2018 at 10:23 AM, Juri Lelli wrote: > > On 09/05/18 10:05, Rafael J. Wysocki wrote: > >> 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? > > > > It doesn't anymore. sugov kthreads are now being "ignored". Should have > > remove it with the DL set of changes, sorry about that. > > No worries, you can still do that. ;-) Indeed! Done. :)