Received: by 10.223.176.5 with SMTP id f5csp927372wra; Tue, 6 Feb 2018 09:36:14 -0800 (PST) X-Google-Smtp-Source: AH8x225SvTASjAK5ZU/CqX2B8sy5NEj6R22g99dsquhNnrI5eNzP1+0bFGT0qzbhzhypRLToQboj X-Received: by 10.99.104.194 with SMTP id d185mr2559057pgc.404.1517938574229; Tue, 06 Feb 2018 09:36:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517938574; cv=none; d=google.com; s=arc-20160816; b=sCsPWf6+ki6zKYbjmUuUxJagvzOsRj0DwpjoyXBEYe3uRvJ3E+JUwVSYcnh2rt2cXi 11KZtAHwMqyT4i59wbFPx3BG6NfNKb67jppBvelASrAnvoUKFDqZIk1czr3V7b06391m KZQqqjg5MAg5y0wvX08w2a2nxk7233yH1d2Sm/Y888Mh98J40DRMr582Ckh+KcZ7NMnO EArvrtTcUiwgZ7BBRtoFx0x6j6hBMLqymzthiMlyDZgLIAiFN/0tAuvz1mb0TP2I1VrW 2BG6Wa2GSflC2pbmA/A+5q1Uf0Bjuk5onsN6KqDp8ZkM3+RxeLJSZWt+70DHv9b56ckb Oxvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=1JeCU/3sX7KkdW4CXVzNo6Do5ANCoktp2TatuhmWmHk=; b=ouv2U8ue75nH6rfGgOncDdKeb9TnXB2DTZGZtZBan6MJiis2oJsLK//MwEfVVhOE0f +q8I56UEUdJ9hiIc6+82KT/q/5RXNy9EOGgP/ojVu3msBzTCtwwwiqgHV0hcpWW3PfFg +P1uAN33afBc3XEc/zSuVP0T6V721ZOZiWYcHsF7QqH36KPTRMLZxhphHfKRJANR0yLG nXeQH3u5GkOj7F63buTcwCMPjl+bJtW740wdigXjHi+qRdCdDVWO526u0vYYX30YykqV OHZ3jnj3D265zJka3eijBISF3mkyajHKggKwyXDud/9z4pO04WVVJVxERT2BWUhyOlmb BdKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=mWsMEvKO; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s126si236387pgc.597.2018.02.06.09.36.00; Tue, 06 Feb 2018 09:36:14 -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=@oracle.com header.s=corp-2017-10-26 header.b=mWsMEvKO; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752873AbeBFRcy (ORCPT + 99 others); Tue, 6 Feb 2018 12:32:54 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:50298 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753090AbeBFRcJ (ORCPT ); Tue, 6 Feb 2018 12:32:09 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w16HQjIC074948; Tue, 6 Feb 2018 17:31:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=1JeCU/3sX7KkdW4CXVzNo6Do5ANCoktp2TatuhmWmHk=; b=mWsMEvKOBk9VORSlwwx0/HiIdnpvnfkLd54JJJRwAXXYzE5+mRT/JvZNocGia6+nHkv/ +hL7nB2iKymLjkDQ8wfhYogm9QOhu6v1ZNyQDajMm8CaNaWetBxb7Uh+KGeEW3qXPWfF LGHJjUH5PdG3axa35/jZZh6EFLhC2EbK/LxaigEWo0fMyGFhaK3DSdiLDX4bqPw2XabG eNTeihe+qf1MFrB7WDuhxoe7p172qKx4oo38w5ZFyO7xaZlJ9c2VktcBQ17ib0m3Veyw wna2GY59r3JA1qS2DlkDmXXCab3ZkvGAIbpxnySJ88+SCqJi4IaV8NpkYP4Z8ah7lOGk Vw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2fyg0fgd54-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Feb 2018 17:31:25 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w16HVOGi007155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Feb 2018 17:31:24 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w16HVNse001391; Tue, 6 Feb 2018 17:31:23 GMT Received: from [10.132.91.66] (/10.132.91.66) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 06 Feb 2018 09:31:23 -0800 Subject: Re: [RESEND PATCH] sched/fair: consider RT/IRQ pressure in select_idle_sibling To: Joel Fernandes Cc: Peter Zijlstra , Ingo Molnar , LKML , steven.sistare@oracle.com, dhaval.giani@oracle.com, Dietmar Eggemann , Vincent Guittot , Morten Rasmussen , "Cc: EAS Dev" References: <1517268429-933-1-git-send-email-rohit.k.jain@oracle.com> <6967b972-129a-a7f0-06ab-c48dc9709726@oracle.com> From: Rohit Jain Message-ID: <39c72c93-b00b-f59c-ad75-af43daac77e9@oracle.com> Date: Tue, 6 Feb 2018 09:36:19 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8796 signatures=668662 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802060221 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/05/2018 10:42 PM, Joel Fernandes wrote: > On Tue, Jan 30, 2018 at 11:47 AM, Rohit Jain wrote: > [...] >>>> @@ -6102,7 +6107,8 @@ static int select_idle_core(struct task_struct *p, >>>> struct sched_domain *sd, int >>>> */ >>>> static int select_idle_smt(struct task_struct *p, struct sched_domain >>>> *sd, int target) >>>> { >>>> - int cpu; >>>> + int cpu, rcpu = -1; >>>> + unsigned long max_cap = 0; >>>> >>>> if (!static_branch_likely(&sched_smt_present)) >>>> return -1; >>>> @@ -6110,11 +6116,13 @@ static int select_idle_smt(struct task_struct *p, >>>> struct sched_domain *sd, int t >>>> for_each_cpu(cpu, cpu_smt_mask(target)) { >>>> if (!cpumask_test_cpu(cpu, &p->cpus_allowed)) >>>> continue; >>>> - if (idle_cpu(cpu)) >>>> - return cpu; >>>> + if (idle_cpu(cpu) && (capacity_of(cpu) > max_cap)) { >>>> + max_cap = capacity_of(cpu); >>>> + rcpu = cpu; >>> At the SMT level, do you need to bother with choosing best capacity >>> among threads? If RT is eating into one of the SMT thread's underlying >>> capacity, it would eat into the other's. Wondering what's the benefit >>> of doing this here. >> >> Yes, you are right because of SD_SHARE_CPUCAPACITY, however the benefit >> is that if don't do this check, we might end up picking a SMT thread >> which has "high" RT/IRQ activity and be on the run queue for a while, >> till the pull side can bail us out. > Do your tests show a difference in results though with such change > (for select_idle_smt)? I don't have the numbers readily available, but I did see a measurable difference with the select_idle_smt changes. Thanks, Rohit > > thanks, > > - Joel