Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp943699imw; Thu, 14 Jul 2022 14:00:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uWJB/S8wOr8tk8AzuObJ7XbfR6wf2F7uAb4SjPok446aMQAsY+0yX4NsJGJjl6SJV7bV8N X-Received: by 2002:a17:907:3e11:b0:72b:49d1:2054 with SMTP id hp17-20020a1709073e1100b0072b49d12054mr10717303ejc.78.1657832412299; Thu, 14 Jul 2022 14:00:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657832412; cv=pass; d=google.com; s=arc-20160816; b=x5FT+IlwemmrWIbKvGwlpAmHR/EPb4c8Z8w9at1lzu9f+0NvEiDFiYXzESqXHqRcbs gu4TporWUBF1jgByoIiAfRP5XsgLk7SXXpr7CMnjJfsC1+g87wDyHoVAU90kR2bH2dbb 8joJNO2Yj1pgJVkaRbK9cKMXY5+Xld1pDzB1op17hnX8OE3udwJSOYwj5WFG3maCM2Mm 8o/gMCGqya4CFJKCi7evpY/ube8NVbrWlA1JF/IEGzTFS3rjsiUsITVeZo/zBMzBS/wz M8pSaI/NMRKf/IdkksXT7VUw8Oc1f0oA6YpCIpyWZgmutCVLyNoV2yHuz0PPHhwRLUvQ icWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=rUUEVo6iktesGXmpygYWo7oo7fn9zrEW0UhTUt3NGbY=; b=gxbEqDE0ImoFcKMwMad6ob1rYIWVoEof9Hb9CFVSYZ0J2GsQ9e3PrXqysj7kUL8jQg aw9DX78NK+PNBzbdSYWMdf0O6GTQAXEKV5W6kW4sadubD1tjWV/LDQPTVqwZB9DlnUpv v+t8wikJP6BMqFXUidpgYhquJ/HQpJyd45JLGhGWCTYJv4Njy2orOk1FhMVa+vKJCwYG caJECwFmdN7Nf0GqFmhsPrIn1ha6zt6NrzxZPv+KONH0/PoiHzQmMtfU93N2RyXJA2n5 TQvC6qzZIDeLa6wXLg8tG9q9RYBTAm/EK2NqHL1KBL05kzZ/MD10RkH4r5an8E+TmL40 0mQw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=YBw2UK+N; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lT7KS19+; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a05640226c500b0042bd9d36e02si3438853edd.584.2022.07.14.13.59.46; Thu, 14 Jul 2022 14:00:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=YBw2UK+N; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lT7KS19+; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S240355AbiGNUWH (ORCPT + 99 others); Thu, 14 Jul 2022 16:22:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232299AbiGNUWG (ORCPT ); Thu, 14 Jul 2022 16:22:06 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA94E65D67 for ; Thu, 14 Jul 2022 13:21:59 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26EJd5w2013215; Thu, 14 Jul 2022 20:21:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=rUUEVo6iktesGXmpygYWo7oo7fn9zrEW0UhTUt3NGbY=; b=YBw2UK+NQR6GzirmGiPKKKeL6lPuarwHMz/xApZq8zZqEwYgsREdqTOcy9RBqK/SFEqu 2YKcXGLZ+Xqvjl6Gqf0aaoTunPV3NztssnuRhMLWc+4Eq3GIwMAFB5JDU04O+vmg2ear Uu0CFs1kHwrp1ZKilszPPr5WlPsOIB9CWtI2NRaphumPMUAMIbjg9r4OwkNWusHwUIGD Vvg2XrTSjL1hy+DHHvEceRoYmkWvyDkevBNOXfmaC+CR4drk8zsD2LnhfEn3pYannkAF F9nkp9mP2Vf9sR81EjYbalr31yZ+dfbguLHBhjOLOAMEK/XyfUZn2n67RuChPR2bISOK Bg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3h71r1dsu4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jul 2022 20:21:26 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 26EKBfQ9027807; Thu, 14 Jul 2022 20:21:26 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2049.outbound.protection.outlook.com [104.47.51.49]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3h7046sg7a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jul 2022 20:21:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b2eZKhfx4hPzmdoQeslMa9SZ47gh/7WVzLhPHBf2ibajo1UWqV/oLlhccOhOuXEmJP3aiS2uE4IrmwiP2ap/3It7m7XIk+pkhIsz3HsXZu8/9y9EC8b9JANqqH/cb7BVbv0s4IQjkBDMol35YEC/sutVyyow4n0D1hQGv6FPMzrgMl1XkgP2p7d8hKYnufgoxEAyBkydEHQnMNssUrXFBiLxCMi5rSGjU6FqrDod4h1idEDsdG+R5FlbdqwOF54183/s9JB7meYtyzKTc1uxgTd/LDNYxqtwrqiH1OkkvxcPhbFaIF3841+/HYDy3at57mN+cSqqWOtTXXi0jJTdOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rUUEVo6iktesGXmpygYWo7oo7fn9zrEW0UhTUt3NGbY=; b=mchcXVUqvMahreuY3Z5wGrsih9LS/XIUUCVF0wyeTCtZHgnuW7oHBGc2V75+0h9siSW+fuCNdHnIbn1/OdbDyCdUbMGZs3tJj28PLO6Uqc+2dnOyP2iDDgg8gb0xCP40d6mg0uFGxESo2sz3M1oK/a15QULzuercYnWSTp3A5Lc8HXkD6Is2J6H82/lOfUTaiD5tNKNDfua7TdhNODFJ92jEpsM6KJdyhIUoajsc5GFo/8mONAt16I9EoA3qScxMOLw3uhm0FvF0KdaVRbbqLTWfPoco0NHMsawvyu/Na4QtVzEpEcQ7GgjrgEvBsj5Zq17PMK2uo899yHlMBZvHnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rUUEVo6iktesGXmpygYWo7oo7fn9zrEW0UhTUt3NGbY=; b=lT7KS19+OlSYThVLGcZyH6S6OqS0M5NLMXTOHhDYN1/4BuGmLvq8CSrGP1RD/53lD19lTcf6uKnjEwbULcG2AKRkVDe8R2wz8Zlso+SaHQLG4XLC26V4S84mQC+uPp0X9767PYiMRrs2KuLItQTylpIYNPoffJkI77aVJRurDuI= Received: from SJ0PR10MB4576.namprd10.prod.outlook.com (2603:10b6:a03:2ae::5) by DM5PR10MB1292.namprd10.prod.outlook.com (2603:10b6:3:d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20; Thu, 14 Jul 2022 20:21:23 +0000 Received: from SJ0PR10MB4576.namprd10.prod.outlook.com ([fe80::2913:8783:edc2:af11]) by SJ0PR10MB4576.namprd10.prod.outlook.com ([fe80::2913:8783:edc2:af11%7]) with mapi id 15.20.5417.033; Thu, 14 Jul 2022 20:21:23 +0000 Message-ID: <0c0dab83-807d-317e-af1a-7bd898626b86@oracle.com> Date: Thu, 14 Jul 2022 13:21:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] sched/fair: no sync wakeup from interrupt context Content-Language: en-US To: Mel Gorman Cc: Tim Chen , peterz@infradead.org, vincent.guittot@linaro.org, 21cnbao@gmail.com, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, Konrad Rzeszutek Wilk References: <20220711224704.1672831-1-libo.chen@oracle.com> <2c0c61a1c4c54d06905279a9a724a9390d9ee5c3.camel@linux.intel.com> <0917f479-b6aa-19de-3d6a-6fd422df4d21@oracle.com> <20220714141834.GC3493@suse.de> From: Libo Chen In-Reply-To: <20220714141834.GC3493@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR05CA0100.namprd05.prod.outlook.com (2603:10b6:a03:334::15) To SJ0PR10MB4576.namprd10.prod.outlook.com (2603:10b6:a03:2ae::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 21257ef8-cee8-421e-063a-08da65d66bf3 X-MS-TrafficTypeDiagnostic: DM5PR10MB1292:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: InG5WnyoutKRuOMNGOAa9eJh1DbS3+5xNWKWDwpruHGAsvtY1ewbfWR/pYAcmiKqR+j1uXWnce/JY1f2qwsYKmQOQN+obwjSllZ/JOuGKlH9Ho74KTS4sRdH/z+3ZSF851ox7ZruH0lLhg7ZhlaL68LR2zRoKjIFVQmFvAFnsYVysNtDKf7B7gHvOIbZnd8C3klk9hOGuclscbNtSsX4/a1/b9JAmD7PDTMuoowkqepmh1c5tgSHXdZFtDMbMtSdpKjLabkMTZPuz6Z0SV8hF2/9FuFwPl+I/H01Hsoa1R1v0/+DsViwsNmYQfKdugepjXsOX7dlv+ypX217UfqGlSTAB36o9WtAigYQKqqpMnpCUB1eeenVmzV5au+tR2ycGFdn+A4llygk2sbSIe9P6kDsFtZCfvJibN6hG9MArbRMioPzEqnXBWa222zdHgUYR6WRjwNYWWi/+/K9c/Q9vbTxmZOlxtqzqIrj81Xvqrdi6Lc4nA9T/SWQfy5sdQGqcM3OBGIKgyLj0NbMtCQmf92mUcSML9iHGsxrE6W7uZGRMou3JOb9ggYIRpR3UuhqUewNv5v5WV0g8shcxJA1Yz9mpASlwLGFDxXzAUIYQIPC4YA+d9nYkI9flLslgM+cMyNofHWyG2wOrXdZ4uQ8JXRYo57D1L96zdS+uxs0wHOdzala1iSgEfXh60LoWpZSu52qu0H+nX5rmzXl7R4RSr+98YPytNmfK1Sbrzf9zlsVxx+5Ek9XQ7ez4EToEU3hex8T3TlnhMJO6/aSjeC/we4iZUmrBunJmyO1G/P/5tugTaBw+J0OdE5nv0Q9GPQp+tRgtDg4vWXeq3HvSmZXAzEwqPs8XDXiCadc2/afG/E= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB4576.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(346002)(396003)(136003)(376002)(366004)(44832011)(2906002)(8936002)(5660300002)(4326008)(8676002)(86362001)(83380400001)(31696002)(36756003)(38100700002)(478600001)(6486002)(6916009)(54906003)(316002)(66476007)(66556008)(66946007)(2616005)(186003)(107886003)(6506007)(41300700001)(52116002)(53546011)(31686004)(6512007)(6666004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZmtNaDg5alNQRExUU2lNMi9GOHMvQzdZTU8vZEUrRnNyT0pYQXlTc2tmSXln?= =?utf-8?B?RHR3SVluL0RPY0M1azdXRVI3RStQWE9mVStSbFZ4amNKK3dpOUFlSGEybk1a?= =?utf-8?B?Z3NlSHBQOStSWXR0VHZ1b3NKMjhpMDBXODFUU1pCcXByZXFPVGZY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MzL25SUUVpNzV5ZlM2TXJWUmt1UkhhVm5nUFVM?= =?utf-8?B?eHlTcU5IRXhxK1VsUG5nSTNGVnNWZllpazR1VlkzNjJsYi9USUdEaDBLQ1Bo?= =?utf-8?B?cWlNWE90bzc3RndwZ2EvbUFuaFVYZit0TE1raFRLb29WN3d6cDlmdjcvUEJK?= =?utf-8?B?TmE2VGZBOUF6NzMzejZhQW9HcjkrVFFoKzJQVkMzdWxReDc5RXR3S05UeUd3?= =?utf-8?B?OXc9PQ==?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21257ef8-cee8-421e-063a-08da65d66bf3 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB4576.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2022 20:21:23.6091 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pxL+0E6fhYc2BTR6+b44iUCPmt47F79cAD3XyPpyVQpn+i+hcuow9mLsdolnWd0INw46D053xMElCpVez+7JwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR10MB1292 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.883 definitions=2022-07-14_17:2022-07-14,2022-07-14 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 spamscore=0 adultscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207140089 X-Proofpoint-ORIG-GUID: vhKnw3G7qiL5PWrwp33VU6OCmm-BstXH X-Proofpoint-GUID: vhKnw3G7qiL5PWrwp33VU6OCmm-BstXH X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/14/22 07:18, Mel Gorman wrote: > On Wed, Jul 13, 2022 at 12:17:33PM -0700, Libo Chen wrote: >> >> On 7/13/22 09:40, Tim Chen wrote: >>> On Mon, 2022-07-11 at 15:47 -0700, Libo Chen wrote: >>>> Barry Song first pointed out that replacing sync wakeup with regular wakeup >>>> seems to reduce overeager wakeup pulling and shows noticeable performance >>>> improvement.[1] >>>> >>>> This patch argues that allowing sync for wakeups from interrupt context >>>> is a bug and fixing it can improve performance even when irq/softirq is >>>> evenly spread out. >>>> >>>> For wakeups from ISR, the waking CPU is just the CPU of ISR and the so-called >>>> waker can be any random task that happens to be running on that CPU when the >>>> interrupt comes in. This is completely different from other wakups where the >>>> task running on the waking CPU is the actual waker. For example, two tasks >>>> communicate through a pipe or mutiple tasks access the same critical section, >>>> etc. This difference is important because with sync we assume the waker will >>>> get off the runqueue and go to sleep immedately after the wakeup. The >>>> assumption is built into wake_affine() where it discounts the waker's presence >>>> from the runqueue when sync is true. The random waker from interrupts bears no >>>> relation to the wakee and don't usually go to sleep immediately afterwards >>>> unless wakeup granularity is reached. Plus the scheduler no longer enforces the >>>> preepmtion of waker for sync wakeup as it used to before >>>> patch f2e74eeac03ffb7 ("sched: Remove WAKEUP_SYNC feature"). Enforcing sync >>>> wakeup preemption for wakeups from interrupt contexts doesn't seem to be >>>> appropriate too but at least sync wakeup will do what it's supposed to do. >>> Will there be scenarios where you do want the task being woken up be pulled >>> to the CPU where the interrupt happened, as the data that needs to be accessed is >>> on local CPU/NUMA that interrupt happened? For example, interrupt associated with network >>> packets received. Sync still seems desirable, at least if there is no task currently >>> running on the CPU where interrupt happened. So maybe we should have some consideration >>> of the load on the CPU/NUMA before deciding whether we should do sync wake for such >>> interrupt. >>> >> There are only two places where sync wakeup matters: wake_affine_idle() and >> wake_affine_weight(). >> In wake_affine_idle(), it considers pulling if there is one runnable on the >> waking CPU because >> of the belief that this runnable will voluntarily get off the runqueue. In >> wake_affine_weight(), >> it basically takes off the waker's load again assuming the waker goes to >> sleep after the wakeup. >> My argument is that this assumption doesn't really hold for wakeups from the >> interrupt contexts >> when the waking CPU is non-idle. Wakeups from task context? sure, it seems >> to be a reasonable >> assumption. For your idle case, I totally agree but I don't think having >> sync or not will actually >> have any impacts here giving what the code does. Real impact comes fromMel's >> patch 7332dec055f2457c3 >> which makes it less likely to pull tasks when the waking CPU is idle. I >> believe we should consider >> reverting 7332dec055f2 because a significant RDS latency regression has been >> spotted recently on our >> system due to this patch. >> > The intent of 7332dec055f2 was to prevent harmful cross-node accesses. > It still allowed cache-local migrations on the assumption that the incoming > data was critical enough to justify losing any other cache-hot data. You I am not too against cache-local migrations here because they are still under the same LLC. We really focus on cross-node migrations that sometimes hurt us, sometimes don't because this is where you need to determine who has the warmer L3 cache. > state explicitly that "the interrupt CPU isn't as performance critical as > cache from its previous CPU" so that assumption was incorrect, at least > in your case. I don't have a counter example where the interrupt data *is* > more important than any other cache-hot data so the check can go. > > I think a revert would not achieve what you want as a plain revert would > still allow an interrupt to pull a task from an arbitrary location as sync This is the tricky part, I didn't explain it well. For rds-stress, it's a lot (~30%) better to allow pulling across nodes when the waking CPU is idle. I think this may be an example of interrupt data being more important. Something like below will help a lot for this particular benchmark (rds-stress): if (available_idle_cpu(this_cpu)) return this_cpu; But for db workloads, yes, in general, pulling does more damages than goods as said before esp. under light load. But I think pulling to an idle CPU across nodes is okay, because this usually happens at the beginning of a workload and once a task is pulled it stays there or at least in the same LLC sched domain for a while. What is not okay is when the waking CPU already has a task and the wakeup still pulls the wakee task to that CPU across nodes irrespective of its previous CPU. And that's what this patch tries to address. Mel, I am thinking about a follow-up patch like below then we can continue the discussion there since this is kinda a separate issue: - if (available_idle_cpu(this_cpu) && cpus_share_cache(this_cpu, prev_cpu)) - return available_idle_cpu(prev_cpu) ? prev_cpu : this_cpu; - +       if (available_idle_cpu(this_cpu)) +               if (cpus_share_cache(this_cpu, prev_cpu)) +                       return available_idle_cpu(prev_cpu) ? prev_cpu : this_cpu; +       else +               return this_cpu; > is not checked. A follow-up to your patch or an updated version should not > check available_idle_cpu at all in wake_affine_idle as it's only idle the > wake is from interrupt context and vcpu_is_preempted is not necessarily > justification for pulling a task due to an interrupt. > > Something like this but needs testing with your target loads, particularly > the RDS (Relational Database Service?) latency regression; Sorry, it's Reliable Datagram Sockets. We run rds-stress to measure rds bandwidth and latency. Libo > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index b7b275672c89..e55a3a67a442 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -5975,8 +5975,8 @@ static int wake_wide(struct task_struct *p) > * soonest. For the purpose of speed we only consider the waking and previous > * CPU. > * > - * wake_affine_idle() - only considers 'now', it check if the waking CPU is > - * cache-affine and is (or will be) idle. > + * wake_affine_idle() - only considers 'now', it checks if the waker task is a > + * sync wakeup from a CPU that should be idle soon. > * > * wake_affine_weight() - considers the weight to reflect the average > * scheduling latency of the CPUs. This seems to work > @@ -5985,21 +5985,6 @@ static int wake_wide(struct task_struct *p) > static int > wake_affine_idle(int this_cpu, int prev_cpu, int sync) > { > - /* > - * If this_cpu is idle, it implies the wakeup is from interrupt > - * context. Only allow the move if cache is shared. Otherwise an > - * interrupt intensive workload could force all tasks onto one > - * node depending on the IO topology or IRQ affinity settings. > - * > - * If the prev_cpu is idle and cache affine then avoid a migration. > - * There is no guarantee that the cache hot data from an interrupt > - * is more important than cache hot data on the prev_cpu and from > - * a cpufreq perspective, it's better to have higher utilisation > - * on one CPU. > - */ > - if (available_idle_cpu(this_cpu) && cpus_share_cache(this_cpu, prev_cpu)) > - return available_idle_cpu(prev_cpu) ? prev_cpu : this_cpu; > - > if (sync && cpu_rq(this_cpu)->nr_running == 1) > return this_cpu; >