Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1457868ybj; Fri, 8 May 2020 01:38:17 -0700 (PDT) X-Google-Smtp-Source: APiQypJE0pQgrRr7sMN3+6AYbKLM1qxHyWEJ5UUwsUVxHpk6pUugt+bOOGeFw7cJ6dMDQqf6oH4h X-Received: by 2002:a17:906:f90e:: with SMTP id lc14mr927804ejb.156.1588927096839; Fri, 08 May 2020 01:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588927096; cv=none; d=google.com; s=arc-20160816; b=vexNmd788brku9DlPuxUx2JDw8Q5y2sZXIcKMgqaFIy4FTcpTsNIjDcRNy6fHhxECS dz1WU2aZa68YgMA0xwsreW9fcrw9NPTLDpIa/HQk4tgWivoiuHv4YLaiAL8QjazhaAlI weeTL7gAk6u6ZCXx9x3YydbRHtWmbxIhZ7pM/8nLjqENYIRArtxK1x840As23N/MG465 n5MKW3VJJh7Ykg9Y6/oU8zfa5pKd/KuGPKDrgIfVQeRxVQCVu8rP7x+I24swaQFx6EAr 2AxBxvcMnTO/QdqR4/xm48cEP9R9qpIy3ay1IXheCo4PGNoLUTnN1Ckr9FqRQFPvlCwU abTg== 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:dmarc-filter:dkim-signature; bh=xToEuf7RL5FDW474RM1SPI7R/HT+y5ChXzD5Cb8GZkU=; b=XvP2LIBz2zaQa7VDM4esGNZ2WnL0kLtg5hYUbQI1AvJI+UDwuU9sbvYmpdQz5S394q Js2FzqaGmdJm0I2TsRw6oA0bxFOEZFOAw+xGHlMHHahzPYmQX0b9TkaV4h/bXPzQ0KrY gZ5JUWhS2mol5SraBk+Q/382GpPcH26eUkaJOlL4gRCm6V+X8G6wc0Yz9j8hVz/q03ix dLcRziIwoJIQ86/5QemmJpp8NvMxsQPiTIjIfPaqnKQNUNaNPjKVmvIqeLfWrRK+hOy+ 2PdtVHcebVmkdTSopCMB1PWJcNMxs+jUugo8tKeKbwxzC3ACzFepN/dZnYi/UNAONPNC /rVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=SDbhMdBM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y10si584390edt.393.2020.05.08.01.37.53; Fri, 08 May 2020 01:38:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=SDbhMdBM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbgEHIgP (ORCPT + 99 others); Fri, 8 May 2020 04:36:15 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:37480 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbgEHIgP (ORCPT ); Fri, 8 May 2020 04:36:15 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1588926974; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=xToEuf7RL5FDW474RM1SPI7R/HT+y5ChXzD5Cb8GZkU=; b=SDbhMdBMa497ONYRlO76OVzE/Rx3rCw5FOw12Rl560bXU6jVoTM03eAOf7+I5ExKFHR+et2U ffhaXDfotcC7kiCzNDy5Q344T/+XXrxRJa0apyQ7VDSHqUEEDJOdkTfmygshWBAof5Yf2oiC UUwEaw2PTqzgBmGRXyxPWBgGoNU= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5eb519fb.7f54e99aa030-smtp-out-n02; Fri, 08 May 2020 08:36:11 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id DB89BC432C2; Fri, 8 May 2020 08:36:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pkondeti) by smtp.codeaurora.org (Postfix) with ESMTPSA id 261DBC433F2; Fri, 8 May 2020 08:36:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 261DBC433F2 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=pkondeti@codeaurora.org Date: Fri, 8 May 2020 14:06:01 +0530 From: Pavan Kondeti To: Parth Shah Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, qais.yousef@arm.com, chris.hyser@oracle.com, valentin.schneider@arm.com, rjw@rjwysocki.net Subject: Re: [RFC 3/4] sched/idle: Disable idle call on least latency requirements Message-ID: <20200508083601.GJ19464@codeaurora.org> References: <20200507133723.18325-1-parth@linux.ibm.com> <20200507133723.18325-4-parth@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200507133723.18325-4-parth@linux.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 07, 2020 at 07:07:22PM +0530, Parth Shah wrote: > Restrict the call to deeper idle states when the given CPU has been set for > the least latency requirements > > Signed-off-by: Parth Shah > --- > kernel/sched/idle.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c > index b743bf38f08f..85d72a6e2521 100644 > --- a/kernel/sched/idle.c > +++ b/kernel/sched/idle.c > @@ -262,7 +262,8 @@ static void do_idle(void) > * broadcast device expired for us, we don't want to go deep > * idle as we know that the IPI is going to arrive right away. > */ > - if (cpu_idle_force_poll || tick_check_broadcast_expired()) { > + if (cpu_idle_force_poll || tick_check_broadcast_expired() || > + per_cpu(nr_lat_sensitive, cpu)) { > tick_nohz_idle_restart_tick(); > cpu_idle_poll(); > } else { > -- > 2.17.2 > Since nr_lat_sensitive updates can happen remotely (when a latency sensitive task becomes non-latency sensitive task), we may need to add this condition in cpu_idle_poll() as well. Thanks, Pavan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.