Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp555574ybk; Wed, 13 May 2020 07:08:23 -0700 (PDT) X-Google-Smtp-Source: APiQypLCps0zeAhM8Yc9V2ekeOXi/dX50srKTIAb+mv28vBSq1YYoa/QTLym7HVnSP3F6JxwAySe X-Received: by 2002:a50:a985:: with SMTP id n5mr22174706edc.338.1589378903172; Wed, 13 May 2020 07:08:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589378903; cv=none; d=google.com; s=arc-20160816; b=yAlIyaNASOz4Sv/wRC2aIrruCMS0VrUEgcqjFshu6KIrwehnlT7O/RrySCbdmXOyqT PRvtT9oFdldwRp4Hb2wOr/baIlxXBlksjb7R5QBCUTxHVgsQCrKjQ4jJ6y4ZHwaYWO83 58JCtZNEn7+t0Soul8URp8pBds9HYioTesju28XGUFVsVb4wttepZ8ncklssCZ0cmr0X yWYYvxh4v5RxSJGNqV+4yUU8nS4ex3t5ToK27r+cNNmF80Xn2OkiE2QSVU2iu46tWSUh p3iw3US4+/qYkH8oriNy06uR2IOIBSELKZoHqoXauYithWCEZyBdC6mrYT0i5qCYh+H2 YIfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:in-reply-to:subject:cc:to:from:user-agent :references; bh=zYIelI/Y5YoxeMdxB+VA9CgIGXc95pLq6ZL3iEb8glM=; b=QyVijEDc/Z/foCzbTA93qOO+T9oasSad6J14wqOaWlXswCl/x0zNXX69VSlufNw3BN EHnBUypqew93wwXemZaidW4UHQkh3NVOOqWB7r6KM3Jj4wpS4SP9BFojJT1WZx8KgodH +/djMwaSS4SGXJXmuVyYgdIuMe3dXtHMI7465Y3zZMU6l56+/1qUYXOZ/3jhSg+fZ3K0 gx+IiZK5ST+E4DtWOIManwFAmk02GVfoVoVfZJT8UAbSSKcTkSd1gmG6jf66sbCjWV4t yU+KbbpKeHmsZDDYRNRSU0fyTa66yMU1YGGiPofkbP3KIxO1MD+oIK2eyo7drNqx22hd KPTQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i6si4270615ejv.83.2020.05.13.07.07.59; Wed, 13 May 2020 07:08:23 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388900AbgEMOD3 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 13 May 2020 10:03:29 -0400 Received: from foss.arm.com ([217.140.110.172]:47444 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388783AbgEMOD1 (ORCPT ); Wed, 13 May 2020 10:03:27 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 25E5D31B; Wed, 13 May 2020 07:03:27 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7E06D3F71E; Wed, 13 May 2020 07:03:24 -0700 (PDT) References: <20200513134338.19688-1-John.Mathew@unikie.com> <20200513134338.19688-4-John.Mathew@unikie.com> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: john mathew Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, 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, bristot@redhat.com, tsbogend@alpha.franken.de, lukas.bulwahn@gmail.com, x86@kernel.org, linux-mips@vger.kernel.org, tglx@linutronix.de, mostafa.chamanara@gmail.com, willy@infradead.org, Mostafa Chamanara , Oleg Tsymbal Subject: Re: [RFC PATCH v4 2/3] docs: scheduler: Add scheduler overview documentation In-reply-to: <20200513134338.19688-4-John.Mathew@unikie.com> Date: Wed, 13 May 2020 15:03:17 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/05/20 14:43, john mathew wrote: > +========================= > +Capacity-Aware Scheduling > +========================= > + Thanks for taking a jab at this. At a glance it looks okay, with one comment below. FWIW I still intend to write a more pamphlet-sized thing, I'll toss something out in the coming weeks - depending on where this goes, I might base it on this. > +Scheduling load balancing on Asymmetric Multiprocessor systems was improved > +through the introduction of Capacity-Aware Scheduling. It identifies the > +most efficient CPU to assign a task based on its capacity. This capacity > +may be asymmetric due to heterogeneous computing architecture such > +as ARM big.LITTLE. Scheduler gets information about asymmetric capacities > +when the scheduler domain hierarchy is built using build_sched_domains(). > +CPU capacities are provided to the scheduler topology code through the > +architecture specific implementation of the arch_scale_cpu_capacity(). > +The SD_ASYM_CPUCAPACITY flag is set by the scheduler topology for a domain > +in the hierarchy where all CPU capacities are visible for any cpu's point > +of view on asymmetric CPU capacity systems. The scheduler can then take > +capacity asymmetry into account when load balancing. > + > +Initial CPU capacities are derived from the Device Tree and CPU frequency. > +For RISC-V & ARM64 it is done in drivers/base/arch_topology.c. A cpu-map > +device tree is parsed to obtain the cpu topology and the initial CPU capacity > +is set using the CPUFreq subsystem. A callback is registered to the CPUFreq > +subsystem to rebuild sched_domains when CPU frequency changes. > + We don't rebuild domains on frequency changes (that would be ludicrous!), rather we do that on policy changes. It's mostly because we need to wait for cpufreq to be loaded before having a complete view over the capacities of the CPUs (which is a mix of µarch and frequencies), i.e. we need to rebuild the SD's again once cpufreq comes up.