Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp978323pxp; Wed, 16 Mar 2022 23:16:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYVEVrpH43FDQxaHLBGS8APadzUemBmtY2MobbIS9MIJFQEWWC9QCfLVoFE0lOCXkpODn5 X-Received: by 2002:a17:90a:5986:b0:1bf:7515:67df with SMTP id l6-20020a17090a598600b001bf751567dfmr3519323pji.86.1647497776226; Wed, 16 Mar 2022 23:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647497776; cv=none; d=google.com; s=arc-20160816; b=bTHZVPU4dcSrEzxv8xyV0tXsa4iRjSxhzCAc6WvIp6j5/O2g8/4yDPhNS3D+ykGFh9 j/MrEHqzEjKBfKT1VlsILybSJ0giRdl8vICPS0BtQ3xHlNdl+wW27uoxJrO/cK6ZgrwT HrbOVDtBqBFMs5sRnn+VV67fy0O7TvrMGp4pMAMQ/rweILK4eI1IIwZFT2NBOY2f7QGF qVVXTZeTncLu1gVbYdxzvbeG/gIv8Vqmj98uMp9MVpR2aM0WKuMQQRVClgyv+QqSdmjN 1Pj5/Dg6+rMAt2l+MlTpRktWwPaT1lDGqbQ1dYVtsEAP+XL2ARIFrpFHX/xPf5IuW6EL /YbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6X12kOzx8hLkgevmcdPoYE0Gc9TJz+yvwiZkMQ7Tr+Q=; b=ULNKlnrFAZ3uhF/TptFmXBHBW5wXpI5KcsBMhDpbJXY/PPGrGRDnHNjHhtFfrYmVcX ugNT+Al+aP4huulm6ZhVozX+nhmpaeN+d1q52ybr54Z5+csuOP2Qr3L340RiYlJoXYR3 FPS9uyKWEsOD3CtND5pAJ+d94K47ZPK5dvNSDGl3/5XHbAyn/97airaoYT74DYTbEGH/ q9L7VcWPF6wxUDB1JmTlVL3RLzAas0gZ6jA5ZE/JIKvv+w83jW1JIexU//42OncnUryf 0Bn5/z0yo3RjuRrW4LcOAupg+eGsJh4Si6SbYsrWmI7GW1GeWhqd8r0Uz5vV6Wo87Pm0 TCww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iFOKtCzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p1-20020a056a000b4100b004f78b67867bsi4363838pfo.222.2022.03.16.23.16.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:16:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iFOKtCzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F78B217C67; Wed, 16 Mar 2022 21:59:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353776AbiCPQRh (ORCPT + 99 others); Wed, 16 Mar 2022 12:17:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240622AbiCPQRg (ORCPT ); Wed, 16 Mar 2022 12:17:36 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3967BBC2F for ; Wed, 16 Mar 2022 09:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647447382; x=1678983382; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DEtLWo8Ecdeq9AIs99N5iWens02agHgLncfV1oWxOY0=; b=iFOKtCzEghX99cx6i0uj7dBDOlpCIHUAHh3sR+5yGWB51odT97K9dFji RCJRhbD0DsOuPPpedPoaSwM/FcqcZUWzkkusoYnGlpGX6kVbt69i81Fvw niZ6LJLESdb8Ih9dTStq5aFxtD3b7fA9EL7SCvIcg55GN4QJrKWl+W7n/ NCBpw38yTt5GSX+FuXVskWQqji4HrVaE0P0rijLrqIa7AHxSK6LlBvi83 HPP4ojiFArz5FjJgFPNXlakn9g/9ID9aTg/UxVsYxSyI3vIW42Xu7U6IH G7WGXFRZZMD/vMAPC8bcfcOiAJ+HodLG0zOOBPOxszyQg6riZ2LGv07r6 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10288"; a="256601188" X-IronPort-AV: E=Sophos;i="5.90,187,1643702400"; d="scan'208";a="256601188" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2022 09:13:26 -0700 X-IronPort-AV: E=Sophos;i="5.90,187,1643702400"; d="scan'208";a="557523347" Received: from zhaoq-mobl1.ccr.corp.intel.com (HELO chenyu5-mobl1) ([10.255.29.55]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2022 09:13:16 -0700 Date: Thu, 17 Mar 2022 00:13:11 +0800 From: Chen Yu To: Tim Chen Cc: Abel Wu , linux-kernel@vger.kernel.org, Tim Chen , Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Mel Gorman , Viresh Kumar , Barry Song <21cnbao@gmail.com>, Barry Song , Yicong Yang , Srikar Dronamraju , Len Brown , Ben Segall , Daniel Bristot de Oliveira , Aubrey Li , K Prateek Nayak Subject: Re: [PATCH v2][RFC] sched/fair: Change SIS_PROP to search idle CPU based on sum of util_avg Message-ID: <20220316161311.GA41632@chenyu5-mobl1> References: <20220310005228.11737-1-yu.c.chen@intel.com> <444bfebb-ac1c-42b9-58f5-332780e749f7@bytedance.com> <20220314125657.GA30418@chenyu5-mobl1> <87541edf7b46c1475f73cf464a9edca932f65da5.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87541edf7b46c1475f73cf464a9edca932f65da5.camel@linux.intel.com> X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Mon, Mar 14, 2022 at 10:34:30AM -0700, Tim Chen wrote: > On Mon, 2022-03-14 at 20:56 +0800, Chen Yu wrote: > > > > > > > > So nr_scan will probably be updated at llc-domain-lb-interval, which > > > is llc_size milliseconds. Since load can be varied a lot during such > > > a period, would this brought accuracy issues? > > > > > I agree there might be delay in reflecting the latest utilization. > > The sum_util calculated by periodic load balance after 112ms would be > > decay to about 0.5 * 0.5 * 0.5 * 0.7 = 8.75%. > > But consider that this is a server platform, I have an impression that > > the CPU utilization jitter during a small period of time is not a regular > > scenario? It seems to be a trade-off. Checking the util_avg in newidle > > load balance path would be more frequent, but it also brings overhead - > > multiple CPUs write/read the per-LLC shared variable and introduces cache > > false sharing. But to make this more robust, maybe we can add time interval > > control in newidle load balance too. > > > > > > Also the idea is we allow ourselves to be non-optimal in terms of > scheduling for the short term variations. But we want to make sure that if > there's a long term trend in the load behavior, the scheduler should > adjust for that. I think if you see high utilization and CPUs are > all close to fully busy for quite a while, that is a long term trend > that overwhelms any short load jitters. > Agree. From long term trend, the scheduler should approach an optimization status. thanks, Chenyu > Tim >