Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1180420ybk; Thu, 14 May 2020 02:29:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIlV8euU5VHusU7+swzzntYDzWyKfWpos9JZHiPsWu7OQRxIIhVItVU5UulXfKMwAEDyNw X-Received: by 2002:a50:9f26:: with SMTP id b35mr2956747edf.98.1589448540691; Thu, 14 May 2020 02:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589448540; cv=none; d=google.com; s=arc-20160816; b=lHynPlraCAM3GZ+TfY+xZj3SLNcvRx4uOmG12fid9m3HA4bF6sWp42x/sH58mAG1lO aDXx+jL/PdPBg0KXXcmimKUdUhlPH5n4vEs0fRIPj7t924UD1qdr74daaTCfqWJTqDQt R1qk+/8BcxYR9P+mg1kWkBl9mvr3YIzVYcMJXMyyCPKlm1FvTRIT3m7rGfwr4d5DM0Vx pifiKmFvGktjbUhgeTOgHONqNWfgPsA1wGfz4ygqG4t4iYFOy8eMUuvcMq8QMeJofHwJ SSMLe9UxoLktT1g7yv8JpVrpR51DR2chaAkgSQQdPy78UkvRnTQ2Ym8zwZwDsL4DLIk7 7Guw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nZk+31pniUIu3YX3HPBnqYE7/FWix23XhFWqIs5bURU=; b=HRYMZ7NZCWW7FH9tT7FVL2CYtAum8Egs9bKnxGj4jFJExMfOiIrizLcVyJCAT82TA/ Ra2BG7PFOuBCSAdCbwVn4h7UAFxYUcTBbnsJ+raaNiGG8NkNpcaGIqxjlFekocQV+QvF 18g23YEiEnITb4mxVdBVYDC9GNCCKPUP4O4ofUjcvdcOKBMUYe+dR3KBayh15C9XnUq0 nWBNs7SYVyatl72ipnJ/d393u1y9VyD5c5+OzUtbd2wOCJM5WfMFMheA194GwdcQh4jX dPyBhdacK59C4Awr8Y5eIFpm72CkrmFD66JAamNeFMzCJy6HYEvQUNXlplEuJOX94xGP T7Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@unikie-com.20150623.gappssmtp.com header.s=20150623 header.b="1vlobRK/"; 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 e25si1169289edv.157.2020.05.14.02.28.36; Thu, 14 May 2020 02:29:00 -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; dkim=pass header.i=@unikie-com.20150623.gappssmtp.com header.s=20150623 header.b="1vlobRK/"; 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 S1726241AbgENJZD (ORCPT + 99 others); Thu, 14 May 2020 05:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726076AbgENJZC (ORCPT ); Thu, 14 May 2020 05:25:02 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3142C061A0E for ; Thu, 14 May 2020 02:25:01 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id x1so2178972ejd.8 for ; Thu, 14 May 2020 02:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unikie-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nZk+31pniUIu3YX3HPBnqYE7/FWix23XhFWqIs5bURU=; b=1vlobRK/LZFu0W4DpctQc74BE0OZggxftWAYyg9+kMh9UUhJxpacFHkwwXINlUM0Ql Y9vyMrrE3Zd9KrKDr8izLnm8GsKai/wdW6x37oyhAk1n++lI2+CC6pvBswySW+5aoS77 Xf5Q+GeknU8mke0serBKon4AuRd0lNJUyw87yLSMoyWgOJy1v4Pi9GyDpfmJd4LKc+KI gWRFWYp81EitWqScQBJ3IiapSvRNmLgKDryr6r+0bmMR/IO1dZBNd33L6bylGXS5A3Lf 556w5JsmiDWo9HVAZqJAIp2mIfTjiW447zFX4VD1IPk0mzhZvrWTitSEIV9ifw9HRe28 D8mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nZk+31pniUIu3YX3HPBnqYE7/FWix23XhFWqIs5bURU=; b=X72aWCwkQWEg06rfgehXZFmhzXNh0XXTsuLBLro2FqbTJUE79gOASXCC6Sn5XbOIhc UtGrJjrO1LMOWAaJrYtx+9zppBQedci5MaaeftPpZbI6okcz/Ve5knYZvZ2PRGheMZFM oA8FQbwzTR/j1U93w8BTzMxlQN9ZK1vyTcnSsUJFv0RHCp1NyUoVTPXFh6Zm4oh8Rjh/ ylmzjVvTUR/C1AOK35dNQnXokKnomwtAJRuCI54aWRgn+g9CkPXpZ+k3t9Q+semCOS7z +pAyo4qALNZE7/5Sf6bRTekDiaL7ipOb8jryE3nBCQgJACPr+x5R43Hlh+HDsw95oDxc Rz6Q== X-Gm-Message-State: AOAM531VGg6unFmQ+dHe++uEvy8NpSZBDjYpvuzMsFchEbJpBU7HmD42 rqyf2jzp674IwB5aloDfWc7BsM22EeXEhLUaaNuJEQ== X-Received: by 2002:a17:906:4e8a:: with SMTP id v10mr2808640eju.63.1589448300598; Thu, 14 May 2020 02:25:00 -0700 (PDT) MIME-Version: 1.0 References: <20200513134338.19688-1-John.Mathew@unikie.com> <20200513134338.19688-4-John.Mathew@unikie.com> In-Reply-To: From: John Mathew Date: Thu, 14 May 2020 12:24:49 +0300 Message-ID: Subject: Re: [RFC PATCH v4 2/3] docs: scheduler: Add scheduler overview documentation To: Valentin Schneider 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 , Dietmar Eggemann , rostedt@goodmis.org, Benjamin Segall , mgorman@suse.de, bristot@redhat.com, tsbogend@alpha.franken.de, Lukas Bulwahn , x86@kernel.org, linux-mips@vger.kernel.org, tglx@linutronix.de, mostafa.chamanara@gmail.com, willy@infradead.org, Mostafa Chamanara , Oleg Tsymbal , Randy Dunlap Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 13, 2020 at 5:03 PM Valentin Schneider wrote: > > > On 13/05/20 14:43, john mathew wrote: > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > > +Capacity-Aware Scheduling > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > > + > > 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 imp= roved > > +through the introduction of Capacity-Aware Scheduling. It identifies t= he > > +most efficient CPU to assign a task based on its capacity. This capaci= ty > > +may be asymmetric due to heterogeneous computing architecture such > > +as ARM big.LITTLE. Scheduler gets information about asymmetric capacit= ies > > +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 do= main > > +in the hierarchy where all CPU capacities are visible for any cpu's po= int > > +of view on asymmetric CPU capacity systems. The scheduler can then tak= e > > +capacity asymmetry into account when load balancing. > > + > > +Initial CPU capacities are derived from the Device Tree and CPU freque= ncy. > > +For RISC-V & ARM64 it is done in drivers/base/arch_topology.c. A cpu-m= ap > > +device tree is parsed to obtain the cpu topology and the initial CPU c= apacity > > +is set using the CPUFreq subsystem. A callback is registered to the CP= UFreq > > +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 capacitie= s > of the CPUs (which is a mix of =C2=B5arch and frequencies), i.e. we need = to > rebuild the SD's again once cpufreq comes up. Fixed in v5 of the patchset. Thanks