Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp741830ybj; Thu, 7 May 2020 06:40:54 -0700 (PDT) X-Google-Smtp-Source: APiQypLkh9AqeiJbRve7lATVGLAiJtB+e/3iRCNmp2jOGKhW+vvYUUZxNg5pYPpU4PlUJfyIy4ja X-Received: by 2002:a05:6402:b2e:: with SMTP id bo14mr8502904edb.90.1588858854495; Thu, 07 May 2020 06:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588858854; cv=none; d=google.com; s=arc-20160816; b=K0oWKHclB0Y1abizEZZSU8UBBZU2pt2ID52cTkTfEm0dERBl8Ve9IzcOtgln72FrkY ddD6fu+VwjerPNWXetQwnnOH8PoCNCN3Z0YslaaK08LA+I8F2VJ2F4YnxGmJ/ARLpfwj Y71izWlVeczWnHh40jRMtorwWNlZ3PjiD5JDF+C89aXUQYTGkFH8cC7XOULRZoUByfiT GPsX9082262GBjMAOEvGhJv15HDB5i5gCPZdddMNZGeRgRRnDnbGnef/KwKQfnwf79TG 3uCkCmjhDDgySaXofI7AG6f0D3T9QzQFfFWmVNsJyJplzYtPWdoKeh7QX4XxLNnI9c+r 6q4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=G+VMlsIIhyftuIL0BwRyuAOpjT+ApUZekKFeUTfr71w=; b=zXG6Gj3YA5n0bNU/4fgdFiXHKuUcwRJJuPnEwuTUlRw80yoGl8dTUA3P1sPJZMh2/D CCgMPOpElaN607dfZhzkbs2i6m4gdhl42TXJYeOU1w87iNsMPcvqOfwwjmEcAZoRR/Ta JmW6FFTBRSM8p+qnGpnhU59JuaQ74qGTW6o2XVCeK1cifWfWgbWUiS1CXlOd5pxjWqya No8E+A8MdE+iUtHW2fuwEXtQ6kKmlQcLyCUa0o0aNgcKN54pKIi07FxOwnRLJ8dltBd/ CSJmghkYMpCP8f66xHp5oianLxDCydzYVfimb4v09AgC9ii5KGbTvxPvi87bqZjttO2U I4zw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si3112102ejr.55.2020.05.07.06.40.28; Thu, 07 May 2020 06:40:54 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbgEGNh7 (ORCPT + 99 others); Thu, 7 May 2020 09:37:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:25806 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgEGNh6 (ORCPT ); Thu, 7 May 2020 09:37:58 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047DXNDl089609; Thu, 7 May 2020 09:37:48 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 30ux6ex6gf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 09:37:47 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 047DY3Hx093587; Thu, 7 May 2020 09:37:47 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 30ux6ex6fb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 09:37:47 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 047DUJpu009647; Thu, 7 May 2020 13:37:44 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04ams.nl.ibm.com with ESMTP id 30s0g5ue83-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 13:37:44 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 047Dbg1M8978928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 13:37:42 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 14E68AE04D; Thu, 7 May 2020 13:37:42 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 580E3AE045; Thu, 7 May 2020 13:37:37 +0000 (GMT) Received: from localhost.in.ibm.com (unknown [9.85.97.135]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 7 May 2020 13:37:37 +0000 (GMT) From: Parth Shah To: linux-kernel@vger.kernel.org Cc: peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, qais.yousef@arm.com, chris.hyser@oracle.com, pkondeti@codeaurora.org, valentin.schneider@arm.com, rjw@rjwysocki.net Subject: [RFC 3/4] sched/idle: Disable idle call on least latency requirements Date: Thu, 7 May 2020 19:07:22 +0530 Message-Id: <20200507133723.18325-4-parth@linux.ibm.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200507133723.18325-1-parth@linux.ibm.com> References: <20200507133723.18325-1-parth@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.676 definitions=2020-05-07_08:2020-05-07,2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxscore=0 bulkscore=0 mlxlogscore=801 malwarescore=0 spamscore=0 suspectscore=1 phishscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070111 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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