Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp892321pxb; Wed, 27 Oct 2021 14:35:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6rwblN83Tvp9+UmFL1dkYlj/xJV/vfDGlrXdTXdpljxhVpSW1/qYvLJGlLQRY/UI23kSF X-Received: by 2002:a17:907:608c:: with SMTP id ht12mr178303ejc.78.1635370532282; Wed, 27 Oct 2021 14:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370532; cv=none; d=google.com; s=arc-20160816; b=nz/gUdS3mnhBtXHIA2cNnI/k58fGwdbp16J7nn6bAUR2ErIRQu8wVnr47CyDqPzH9L kDOiSmcoINn+TVIAyXaZm9pXQG6raF8GTccuBmjqkiIorblvdC74L/wgYAqffa6XvMQD 8zYLSaiFN8QX8/jBvzrjMS3K7wbeOWinTOAGP2RrRmpK57CJwMyTpes/6JVKGJURZM4V celvQvC/x+AXWGIbR0aMZXM65FVwlerjzgKssi622HzYIWGcXBnpJ/AuH/07eNVdJQMi WHeUCve0Vnb36ZOH2WN8RMFysme7eODJ/nrfGhKBfxDwfJ/mLPBaX/Se0suXFjEdr9MK H+Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=a0dHXzHDGiBVQUmRRGOcWw8AADd0TC1/VlGy3k6yR+8=; b=xYJ3kU9N79QORlSLe4YJx4HWbD+hQfBTr4MuBinhkP1h0/dWP3VMO4I+jZVDXmUFLl 5+J2LjAb3OzQLzwPa2jNWRY9RZdAX/JyxKHVhJxw4q27MVD5hNEEHlMGkQaAa+3k0thB EiSPZSNJ6XSJN2sFKx/8gdxfW1HwcXKs4354hM/YI/q3mNZkdyhlB+hX98sG11MTZB+F De+uAx5M4SmPo2Ovh8VJeQmmdZgs4xiPJqvVLarsD+6YcCLl2W6GQczyGxWU6bhhX5b/ OQXYTd0fOv80P0wqyWx2EGPgwV0SQzLBCYYsb2SiiheHOy7MwjbpVXBryrHDGLyc/aQb N0OQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si1149013ejx.273.2021.10.27.14.35.09; Wed, 27 Oct 2021 14:35:32 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244098AbhJ0U4C (ORCPT + 97 others); Wed, 27 Oct 2021 16:56:02 -0400 Received: from mga07.intel.com ([134.134.136.100]:4134 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244102AbhJ0U4A (ORCPT ); Wed, 27 Oct 2021 16:56:00 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="293725206" X-IronPort-AV: E=Sophos;i="5.87,187,1631602800"; d="scan'208";a="293725206" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 13:53:34 -0700 X-IronPort-AV: E=Sophos;i="5.87,187,1631602800"; d="scan'208";a="635879473" Received: from schen9-mobl.amr.corp.intel.com ([10.209.74.43]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 13:53:33 -0700 Message-ID: <720fd26424927dd27fea4e5719dafe8a0afaa8c4.camel@linux.intel.com> Subject: Re: [PATCH v3 0/5] Improve newidle lb cost tracking and early abort From: Tim Chen 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, linux-kernel@vger.kernel.org Date: Wed, 27 Oct 2021 13:53:32 -0700 In-Reply-To: References: <20211019123537.17146-1-vincent.guittot@linaro.org> <7128695d64e9161637b67315b5beb51c4accdc82.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-10-27 at 10:49 +0200, Vincent Guittot wrote: > > > Looking at the profile on update_blocked_averages a bit more, > > the majority of the call to update_blocked_averages > > happens in run_rebalance_domain. And we are not > > including that cost of update_blocked_averages for > > run_rebalance_domains in our current patch set. I think > > the patch set should account for that too. > > nohz_newidle_balance keeps using sysctl_sched_migration_cost to > trigger a _nohz_idle_balance(cpu_rq(cpu), NOHZ_STATS_KICK, CPU_IDLE); > This would probably benefit to take into account the cost of > update_blocked_averages instead > For the case where this_rq->avg_idle < sysctl_sched_migration_cost in newidle_balance(), we skip to the out: label out: /* Move the next balance forward */ if (time_after(this_rq->next_balance, next_balance)) this_rq->next_balance = next_balance; if (pulled_task) this_rq->idle_stamp = 0; else nohz_newidle_balance(this_rq); and we call nohz_newidle_balance as we don't have a pulled_task. It seems to make sense to skip the call to nohz_newidle_balance() for this case? We expect a very short idle and a task to wake shortly. So we do not have to pull a task to this idle cpu and incur the migration cost. Tim