Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp315851rdh; Mon, 18 Dec 2023 22:42:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2+1tKSU/bdcTfxWdGL8Plg7RdEfLdz96WWL5UmPEwH6EIqBJTBpVRS+vAIY4oXhRDmh7M X-Received: by 2002:a17:907:9189:b0:a23:6c63:30a3 with SMTP id bp9-20020a170907918900b00a236c6330a3mr452767ejb.32.1702968154263; Mon, 18 Dec 2023 22:42:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702968154; cv=pass; d=google.com; s=arc-20160816; b=giWZj9dBeJ5P5e2t5ORnA9ahHhhrzJJd30hLnyciZCfoWFp3w2lQKRPPtuNQ7sjNlE 9PZ+OlnDpC+tWMxxgMBAbwZn/4dt2Qq4J7IbvY1iAn1S7+rJcCb3aaXi4F4UbOSdzFly WcUvGXHmy6qM8EjMgHuuEKz3FVWV24Nks8V3k5CKfa7um4nTcjPHy0YXEIOCBNMX7CBf tBrwvWC1IIOU6SHykGQaaK/BDCG9bZ19BjeRNjBEn1V1X4iu5rNV41AUqyaHJMZC+7N1 uo5xDRR3kloTOYo1GpaC2olHrkZUsW0/ANJ+ae/pNBi8Qb0zTYDBzTwoKSVaMu7Rw2nq V8gg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:date:message-id:dkim-signature :dkim-signature; bh=M9FwYRUuknOPK057Bfy7g4jcFzIf6x+oXZaRLcU/Raw=; fh=zhNkQaTcWJwCNh0vIdsk0Cx+XW/8UJNiQSyeo/gCrF0=; b=Uc1fJH+hbH+RbWUqInBNHHdP7G7F0PIqiZSKyi9vtn4oUbvGUuhSfPrpTxRb3cW10Y y8NeODJXzaCsWn/T0A9Geu/2J0+vYCYra4ooMcZUB5pIJWnTQaDcPMda3REyA4TqcgU+ bDbmMG+gtDhyLR1lwI6CCkF1G0fKOwlqXvxIUiovy1Q9d40I27e5pin5+umO5eG7nuwv wp1BMRPYyHX3ilU9fE4/V7ST4krQWL10eaB0XwTWkEOXxuVLsSFF/EfbDoE5ukFfsSKv bZpZGj5LjvEy4U1OacAM96hewPVvHhrLbKQptltbjNfVgMy9GaeymBzMsZIlPhcQLgpS sKBA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=V+kuRftP; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=W9ROcfdx; 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+bounces-4757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k10-20020a17090627ca00b00a2357305816si1543984ejc.709.2023.12.18.22.42.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 22:42:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=V+kuRftP; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=W9ROcfdx; 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+bounces-4757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D510E1F248BB for ; Tue, 19 Dec 2023 06:42:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AB7C8493; Tue, 19 Dec 2023 06:42:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="V+kuRftP"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="W9ROcfdx" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4330579D0 for ; Tue, 19 Dec 2023 06:42:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BJ0JvBF019051; Tue, 19 Dec 2023 06:42:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=M9FwYRUuknOPK057Bfy7g4jcFzIf6x+oXZaRLcU/Raw=; b=V+kuRftPYVShD98MRG2xwXTgvdSYLRoTLpnS/VnnqQMjbH6NPyFLvopKblCdJ+lkZI1W +R0UuAUpi3XtmDx1lb//nyJ4W9EDo5kGTqZ3ovj/VKtnfAMgJUhDK0adZSrN432NDDRj A5iuc2F+a8X9vP+Ok6Dud4VB27Jpkod6eLt3LpY1Qvdt7D/EvK07XNY+FmvIlEHoq6AG iaN7FRhpP8m2km23ZdzNseoMPDrEEzrdso3wjjo7sd61jOGKCuxq9Et7fLJsI+sVUClX cH50596KZG1EzcZZvyHsbzomJcLfGll58cex/EdanVoVg1g8NsPzHMAytkFNf5IoPSdi Yw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3v13gud52t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Dec 2023 06:42:04 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3BJ6c3ec022281; Tue, 19 Dec 2023 06:42:04 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3v12b6g2k8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Dec 2023 06:42:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fbrJFwYIBpXMcvJcUDvBUGaFkESxkC17E2unSJNbVQW89fhNPQEEHQsz/1BOevu5bbtp477pQmQNrqrsasUomJsOLyCAq5SBW/RTDxtmMR8N0IU0eGOXtQCEIecz69ket9nW9VR8excmGX0uLosVQq+XhU/12uHJik1K/YOq05MYnTvmz4mzy25C8On8wL82cZgdjyTGDpYPo2ymSUzkNJ6r4LaYulfCvNWAWx/TP1Dyd2zBokcYEJpnnApyGm8N6rVXl3zdyzccXNFo1JFVWXBVHXYz4fvFXCPgSiwCPGjkJIEZ6FG3/Sc0nZnlUJUeYxViSWb4CDUNN7gX6dUFXA== 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=M9FwYRUuknOPK057Bfy7g4jcFzIf6x+oXZaRLcU/Raw=; b=UDRnhpAxZ250BgJZj7nJmkOZndNqGbLHjFEkxSNrn+MwTJEcREAnUww12NTVicX+3/BBcWRQeHxaMN9rP3qmR9z3VqHTHoqvqYxBhAyv/Akh1VfRu6VWnVqcQpX/slP5YcZ3RsNX/qY95D6dpeG385cPTL5rcKt7WcsnQiQJHryWjxekji/sJdYim7sntmPAYBmd7rpmnRrZCUpRGSGfs5N+e8yb5TwiNPKHr9L0lLGFzQbcNdOzHMKdTe4kOiQIhdYvSJz676+gOf/e+L6mNpwAeW5zNcn2sjI5azEVPG/y4qNGEIjxKyUfpkJ1IdZS5andOimItKOWgDyDDEHeSg== 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=M9FwYRUuknOPK057Bfy7g4jcFzIf6x+oXZaRLcU/Raw=; b=W9ROcfdx9GzxWbwWkb+9kAfr6nWsdXclZzrSllZJ0Hm+oyx7IbU2tCMmCGOY5dTSFHvkpuEclYSpnKgol0gHTniJvR3WHyp4VRa8D6T1wE5NcUFAdQHQ6LbuI609El5Tn57Y65AM3sR64hxTPUFWb/S64lgHcJrlKqhzgI8skL8= Received: from CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) by DS0PR10MB6751.namprd10.prod.outlook.com (2603:10b6:8:136::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 06:42:01 +0000 Received: from CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::5a0:6591:b3e7:75fc]) by CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::5a0:6591:b3e7:75fc%6]) with mapi id 15.20.7113.016; Tue, 19 Dec 2023 06:42:01 +0000 Message-ID: <1c13b0cc-098c-4f75-9f37-a53a66965409@oracle.com> Date: Tue, 19 Dec 2023 17:41:51 +1100 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH] sched: fair: reset task_group.load_avg when there are no running tasks. From: Imran Khan To: Vincent Guittot Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org References: <20231215052652.917741-1-imran.f.khan@oracle.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: TYCPR01CA0135.jpnprd01.prod.outlook.com (2603:1096:400:26d::15) To SJ0PR10MB4479.namprd10.prod.outlook.com (2603:10b6:a03:2af::22) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4468:EE_|DS0PR10MB6751:EE_ X-MS-Office365-Filtering-Correlation-Id: 726feaad-00c1-4d81-7610-08dc005d9a64 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DHGdKymzEXxRLn7Cl8I82rbnNlTJVtsECCthKCTlN7ridG+aPSAtMtc4E6CVbzoP++MUu1GbMiGCCXgpWTPrPAEieDYZkKNkBDnXrpFbDWcY2svV3TPLc8aEBcFarUgWbE/O0m7dn6RtH4Vx29+lzO/PKcbarPDMN6HQYMeqPBtUmAe4dBkSKUamWRxplWepLu3F68z3eEqvCbP5KpZqqvm6itNDPGsYkR0oCQVTtSG6rPFp7yPVZKQqJi505bYAauqVhSyg4C/sDf3EaGR6e2CCXKW3fI9TEqUaeUCHMPdRqzXbvQ+TvtWhowajlAjEflx9Jqhi1QKQpG7U0fCqq0hH4yhejYzfTc9DsKQuG/KusVXLzRr/S/ivQkP9wTjlGTWbUSYMU4TQHtRjpZXmRKB7GogBlx70cE/7/YwrihCzFJqthB066q6vRefVeHxALmRg9KgHmgNE8VDfTEcvj24ilIt3NyzsATsQjCRwUxL2SELtZMMAj0SUg4MpFVK9Y98FcTPkb8ifJodU9lUtlOP3FPLorxjw8ghaqO8m7Rn2SVjxWyAqgr7OnXS47HOnQwWr2RwM0b+wz3OO3Y+Y3Pl94Oc7CW/vaz5rf/2mdNcfb5IFgLQGENJ8PSN62cOsz4O39uDtcSmZhmcybIj34w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4468.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(376002)(346002)(39860400002)(136003)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(31696002)(86362001)(36756003)(31686004)(6666004)(478600001)(6506007)(53546011)(41300700001)(66946007)(66476007)(6916009)(66556008)(26005)(2616005)(6512007)(38100700002)(83380400001)(2906002)(7416002)(6486002)(5660300002)(316002)(8676002)(4326008)(8936002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R2J1VEFYcTVxVkRFSlA1dVh2YWU3N1dqK1hCUG5uUVVBTExGVVdIckducURv?= =?utf-8?B?RVEyckIyYVhJV3dNbFVlZFBJMFd0VFZqQ3ZxeTA4a1dQdmxpMXNzZW03U3dP?= =?utf-8?B?d01Pd1VrZ0F2cklQWkpPbzRSRXNWNS9jeUVRQjljbTVnWTlzbDY0T041S2tY?= =?utf-8?B?U2ZncXBCTUg3QmhrUlRPOE9nMWQrUWhTaUIyMEw4Y2xub3lxdDA2ZlVBYnRR?= =?utf-8?B?UDJ6d2V6dUFwb2FKZW5pZU5QQXNjVDd2TTJLLzlWdnFDQUFoQml4QkIrbUlI?= =?utf-8?B?MnhBdUFrQkNFTU9WUTM0UitYaEh6cjJCL1NHNWw1OVBLV05ybVpHcGpwOS9D?= =?utf-8?B?M1FXRVJISlZSSkFqbDBUb2ZsNklZeG1wMVJJWVdzampmampLSWs5aHNNQkw2?= =?utf-8?B?Um05OXVEcnJtODM4MktLc1AweUIvMEJvQjVmK3VScHg2dGUzMEVSM1BIcEJR?= =?utf-8?B?VGtNdDQvMVlsY1Vnb3FsQTZUS3BtUkZUQ2xpeTY1UXRKMWo2UFZsSm5ITCtn?= =?utf-8?B?TVNqbmNLNW5kNk84SEREVmpTTHBxb3RkZ2lrdXl2MDZwRWxYNGI3d3Rrd2Y3?= =?utf-8?B?NkRXaGd0KzF1eUFVMU5JQ3k3NG9OQ28xYzV0VnptcldaYzhjclllUy9yTFp6?= =?utf-8?B?bTZTMmphYWZkN0FpbDIxZmxLNnN2V3YrRkF5ZDE1RDVMd2Q4Z2FwUlAzVEla?= =?utf-8?B?YXZKR1NOKyttN0owVFppSUJQMzNvZy9PWi9XTWkvOVV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e1K51c5WGm5cTw1AWyvkbtJ3SijoOPECRDJ24OyYNxk5DYkH9MWiH4hAOa/hH2syHxa6QTDrJxTxq8Aq+V47yV5Gusm6cf521aS0G7UHkLM78WkUiXtPHPudAImz662uSrAbiSMnF1I4WU9qzKtcYsuvO931GT1rnYgMoFFeHNqv+/06i5Mbsv32tGFicZI8BGasbPvQDUo0/nJ1mmE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 726feaad-00c1-4d81-7610-08dc005d9a64 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB4479.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 06:42:01.1140 (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: ZHW14JnMfKvnutpBhqwx/IjI6ppbqBrQUSSA8/g/eB8NmusU+vq/NJqEgYlhGT680lkY0mGZ66CPtyxzLtP7xQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6751 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-19_02,2023-12-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312190047 X-Proofpoint-ORIG-GUID: 76SyY8QB4KJf2YZnzEnhEYEwSudmhH6E X-Proofpoint-GUID: 76SyY8QB4KJf2YZnzEnhEYEwSudmhH6E Hello Vincent, On 15/12/2023 8:59 pm, Imran Khan wrote: > Hello Vincent, > Thanks a lot for having a look and getting back. > > On 15/12/2023 7:11 pm, Vincent Guittot wrote: >> On Fri, 15 Dec 2023 at 06:27, Imran Khan wrote: >>> >>> It has been found that sometimes a task_group has some residual >>> load_avg even though the load average at each of its owned queues >>> i.e task_group.cfs_rq[cpu].avg.load_avg and task_group.cfs_rq[cpu]. >>> tg_load_avg_contrib have become 0 for a long time. >>> Under this scenario if another task starts running in this task_group, >>> it does not get proper time share on CPU since pre-existing >>> load average of task group inversely impacts the new task's CPU share >>> on each CPU. >>> >>> This change looks for the condition when a task_group has no running >>> tasks and sets the task_group's load average to 0 in such cases, so >>> that tasks that run in future under this task_group get the CPU time >>> in accordance with the current load. >>> >>> Signed-off-by: Imran Khan >>> --- >>> >> >> [...] >> >>> >>> 4. Now move systemd-udevd to one of these test groups, say test_group_1, and >>> perform scale up to 124 CPUs followed by scale down back to 4 CPUs from the >>> host side. >> >> Could it be the root cause of your problem ? >> >> The cfs_rq->tg_load_avg_contrib of the 120 CPUs that have been plugged >> then unplugged, have not been correctly removed from tg->load_avg. If >> the cfs_rq->tg_load_avg_contrib of the 4 remaining CPUs is 0 then >> tg->load_avg should be 0 too. >> > Agree and this was my understanding as well. The issue only happens > with large number of CPUs. For example if I go from 4 to 8 and back to > 4 , the issue does not happen and even if it happens the residual load > avg is very little. > >> Could you track that the cfs_rq->tg_load_avg_contrib is correctly >> removed from tg->load_avg when you unplug the CPUs ? I can easily >> imagine that the rate limit can skip some update of tg- >load_avg >> while offlining the cpu >> > > I will try to trace it but just so you know this issue is happening on other > kernel versions (which don't have rate limit feature) as well. I started > with v4.14.x but have tested and found it on v5.4.x and v5.15.x as well. > I collected some debug trace to understand the missing load avg context better. From the traces it looks like during scale down, the task_group.cfs_rq[cpu].avg.load_avg is not getting updated properly for CPU(s) being hotplugged out. For example if we look at following snippet (I have kept only the relevant portion of trace in the mail), we can see that, in the last invocation of update_tg_load_avg for task_group.cfs_rq[11] both the load avg and contribution of this cfs_rq were 1024. So delta was zero and this contribution eventually remains undeducted. In this case scale down was done from 16 to 8 CPUs, so CPU 11 has been offlined. cpuhp/15-131605 [015] d... 6112.350658: update_tg_load_avg.constprop.124: cfs_of_cpu=5 cfs_rq->avg.load_avg = 0, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 0 delta = 0 ### systemd-udevd-894 [005] d... 6112.351096: update_tg_load_avg.constprop.124: cfs_of_cpu=11 cfs_rq->avg.load_avg = 1024, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 0 delta = 1024 ### systemd-udevd-894 [005] d... 6112.351165: update_tg_load_avg.constprop.124: cfs_of_cpu=5 cfs_rq->avg.load_avg = 10, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 1024 delta = 10 ### ......................... ......................... cat-128667 [006] d... 6112.504633: update_tg_load_avg.constprop.124: cfs_of_cpu=11 cfs_rq->avg.load_avg = 0, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 3085 delta = 0 ### ......................... sh-142414 [006] d... 6112.505392: update_tg_load_avg.constprop.124: cfs_of_cpu=11 cfs_rq->avg.load_avg = 1024, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 4041 delta = 1024 ### ......................... cat-128667 [006] d... 6112.504633: update_tg_load_avg.constprop.124: cfs_of_cpu=11 cfs_rq->avg.load_avg = 0, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 3085 delta = 0 ### .......................... sh-142414 [006] d... 6112.505392: update_tg_load_avg.constprop.124: cfs_of_cpu=11 cfs_rq->avg.load_avg = 1024, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 4041 delta = 1024 ### .......................... systemd-run-142416 [011] d.h. 6112.506547: update_tg_load_avg.constprop.124: cfs_of_cpu=11 cfs_rq->avg.load_avg = 1024, cfs_rq->tg_load_avg_contrib = 1024 tg->load_avg = 3010 delta = 0 ### .......................... systemd-run-142416 [011] d.h. 6112.507546: update_tg_load_avg.constprop.124: cfs_of_cpu=11 cfs_rq->avg.load_avg = 1024, cfs_rq->tg_load_avg_contrib = 1024 tg->load_avg = 3010 delta = 0 ### <-- last invocation for cfs_rq[11] .......................... .......................... -0 [001] d.s. 6113.868542: update_tg_load_avg.constprop.124: cfs_of_cpu=2 cfs_rq->avg.load_avg = 0, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 1027 delta = 0 ### -0 [001] d.s. 6113.869542: update_tg_load_avg.constprop.124: cfs_of_cpu=2 cfs_rq->avg.load_avg = 0, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 1027 delta = 0 ### -0 [001] d.s. 6113.870541: update_tg_load_avg.constprop.124: cfs_of_cpu=2 cfs_rq->avg.load_avg = 0, cfs_rq->tg_load_avg_contrib = 0 tg->load_avg = 1027 delta = 0 ### If I understand correctly, when CPU 11 is offlined the task(s) on its cfs_rq will be migrated and its cfs_rq.avg.load_avg will be updated accordingly. This drop is cfs_rq.avg.load_avg will be detected by update_tg_load_avg and hence the contribution of this cfs_rq will get deducted from tg->load_avg. It looks like during hotplug load of one or more tasks, being migrated are not getting accounted in the source cfs_rq and this is ending up as residual load_avg at task_group (if these tasks are members of a task_group). Moreover this looks racy and dependent on number of CPUs or some delay. For example for scale down from 124 to 4 CPUs I always hit this issue but for scale down from 16 to 4 CPUs I hit this issue 8-9 out of 10 times. Also for the cases when residual load_avg at task group is low (like < 10), I can see that both of my test cgroups get similar CPU times which further proves that the unaccounted load avg ending up in a task_group is eventually leading to uneven CPU allotment between task groups. I am debugging it further but in the mean time if you have some suggestions or need traces from some specific portion of sched code, please let me know. Thanks, Imran > Thanks, > Imran >