Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp297946pxb; Thu, 12 Nov 2020 04:15:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8fIZsfkBelmOqcmc/wItO7BKxz914M4eFxIhlL4uisD/26E1FBuiICvxhqKWZv2868w9q X-Received: by 2002:a17:906:f10e:: with SMTP id gv14mr11717514ejb.346.1605183315214; Thu, 12 Nov 2020 04:15:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605183315; cv=none; d=google.com; s=arc-20160816; b=A1LjctOwdkUC3oUlEelQFrS9Sl/nc70kvzhyl8wW3OVAqQVLtiqgbBvcSSvJVtHPzU wr2Wj0FHym7S5NSbV8O+ygvo6OlA6xcqGa8IHwfryAOLnLqsAwD8ob1HjXznCwmQnT6l qDxKlABjWVHtVur15KoU1hgjkUVkSMdPu+akDqVBkG0KEbd5IbiwHiJ4vfc/tY2UWjit xi7DE7OZJpdh+xPJD9BCM8H5ieO5paGNu84yYUZ2hP2kFrxNZR+P/Dyi2XpYOavJxyRk 1dBw8poxu2b5PVsbZYYXOEUylvJVwPgfqAt+gFgPbaaipRP+7W/DF8HuJowR06YvlPP6 SLAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=vYmm4BraZ1J7/RhbSXzBCUv2dJQQLimpEufqyrcznaE=; b=KCi5vNbGaYqYT1Ml2jvVaFjd0fsEv45niiu3vi30L9Jw6z6fnaezKmCn4YxF0sxVwa ZgxOMZMFHYkFqbFyBaLQi8ePkODpDNb/PeY9y+Pq0JH32cgXptrC+81lQVZUVoo0RqOv xAMkJ9IpYh4Huqrfwt/W10G3EmxJww73ZiBeEn0HNkyoWfK0VeZ5C5OV/pf0yh7lAeOL y77xyrSF3GF3DO4gCQUX/B5A5IOIk66F5k2XeT7tGqIEz5PanBkAURsyz776sj7D4laN etFUhptfGEfYHuSfRMz8Gr5tpEg3w2ayzX+PlrNi+mfIjdf5j7Yf1FMtNdUzyZzPgBXn kMkA== 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 me16si3491983ejb.454.2020.11.12.04.14.49; Thu, 12 Nov 2020 04:15:15 -0800 (PST) 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 S1728072AbgKLMMN (ORCPT + 99 others); Thu, 12 Nov 2020 07:12:13 -0500 Received: from mga12.intel.com ([192.55.52.136]:14178 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728003AbgKLMMK (ORCPT ); Thu, 12 Nov 2020 07:12:10 -0500 IronPort-SDR: OPpR/SqyXNCcPjMVGvsrhzXZhJgwS83izM+ZqGVJe73xOgV+pWAqs4MjsAf4v1HcmNgG+ENGGR 7sRW5XpOuLDw== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="149571167" X-IronPort-AV: E=Sophos;i="5.77,472,1596524400"; d="scan'208";a="149571167" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 04:12:09 -0800 IronPort-SDR: ZVifTGtvj6pJEdIfU1GbY7kG3uxdgSNjKDLOF0TFGlG58gJbKs7bKM9RcGAW9ZETIt/gl5TbLL 2x0PcyHDjmfg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,472,1596524400"; d="scan'208";a="366315954" Received: from cli6-desk1.ccr.corp.intel.com (HELO [10.239.161.125]) ([10.239.161.125]) by FMSMGA003.fm.intel.com with ESMTP; 12 Nov 2020 04:12:02 -0800 Subject: Re: [RFC PATCH v3] sched/fair: select idle cpu from idle cpumask for task wakeup To: Qais Yousef Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, valentin.schneider@arm.com, tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org, Aubrey Li , Jiang Biao References: <20201021150335.1103231-1-aubrey.li@linux.intel.com> <20201112105713.xz3f52tcvjhk7si5@e107158-lin.cambridge.arm.com> From: "Li, Aubrey" Message-ID: <713b4681-3bdb-b25c-9afb-5896ca255309@linux.intel.com> Date: Thu, 12 Nov 2020 20:12:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20201112105713.xz3f52tcvjhk7si5@e107158-lin.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/11/12 18:57, Qais Yousef wrote: > On 10/21/20 23:03, Aubrey Li wrote: >> From: Aubrey Li >> >> Added idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, its corresponding bit in the idle cpumask will be set, >> and when the CPU exits idle, its bit will be cleared. >> >> When a task wakes up to select an idle cpu, scanning idle cpumask >> has low cost than scanning all the cpus in last level cache domain, >> especially when the system is heavily loaded. >> >> v2->v3: >> - change setting idle cpumask to every idle entry, otherwise schbench >> has a regression of 99th percentile latency. >> - change clearing idle cpumask to nohz_balancer_kick(), so updating >> idle cpumask is ratelimited in the idle exiting path. >> - set SCHED_IDLE cpu in idle cpumask to allow it as a wakeup target. >> >> v1->v2: >> - idle cpumask is updated in the nohz routines, by initializing idle >> cpumask with sched_domain_span(sd), nohz=off case remains the original >> behavior. > > Did you intend to put the patch version history in the commit message? > > I started looking at this last week but got distracted. I see you already got > enough reviews, so my 2p is that I faced some compilation issues: > > aarch64-linux-gnu-ld: kernel/sched/idle.o: in function `set_next_task_idle': > /mnt/data/src/linux/kernel/sched/idle.c:405: undefined reference to `update_idle_cpumask' > aarch64-linux-gnu-ld: kernel/sched/fair.o: in function `nohz_balancer_kick': > /mnt/data/src/linux/kernel/sched/fair.c:10150: undefined reference to `update_idle_cpumask' > aarch64-linux-gnu-ld: /mnt/data/src/linux/kernel/sched/fair.c:10148: undefined reference to `update_idle_cpumask' > > Because of the missing CONFIG_SCHED_SMT in my .config. I think > update_idle_cpumask() should be defined unconditionally. Thanks to point this out timely, :), I'll fix it in the next version. -Aubrey