All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/6] Boot time cpupools
@ 2022-04-05  8:57 Luca Fancellu
  2022-04-05  8:57 ` [PATCH v5 1/6] tools/cpupools: Give a name to unnamed cpupools Luca Fancellu
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Luca Fancellu @ 2022-04-05  8:57 UTC (permalink / raw)
  To: xen-devel
  Cc: bertrand.marquis, wei.chen, Wei Liu, Anthony PERARD,
	Juergen Gross, Dario Faggioli, George Dunlap, Andrew Cooper,
	Jan Beulich, Julien Grall, Stefano Stabellini, Volodymyr Babchuk

This serie introduces a feature for Xen to create cpu pools at boot time, the
feature is enabled using a configurable that is disabled by default.
The boot time cpupool feature relies on the device tree to describe the cpu
pools.
Another feature is introduced by the serie, the possibility to assign a
dom0less guest to a cpupool at boot time.

Here follows an example, Xen is built with CONFIG_BOOT_TIME_CPUPOOLS=y.

From the DT:

  [...]

  a72_0: cpu@0 {
    compatible = "arm,cortex-a72";
    reg = <0x0 0x0>;
    device_type = "cpu";
    [...]
  };

  a72_1: cpu@1 {
    compatible = "arm,cortex-a72";
    reg = <0x0 0x1>;
    device_type = "cpu";
    [...]
  };

  a53_0: cpu@100 {
    compatible = "arm,cortex-a53";
    reg = <0x0 0x100>;
    device_type = "cpu";
    [...]
  };

  a53_1: cpu@101 {
    compatible = "arm,cortex-a53";
    reg = <0x0 0x101>;
    device_type = "cpu";
    [...]
  };

  a53_2: cpu@102 {
    compatible = "arm,cortex-a53";
    reg = <0x0 0x102>;
    device_type = "cpu";
    [...]
  };

  a53_3: cpu@103 {
    compatible = "arm,cortex-a53";
    reg = <0x0 0x103>;
    device_type = "cpu";
    [...]
  };

  chosen {
    #size-cells = <0x1>;
    #address-cells = <0x1>;
    xen,dom0-bootargs = "...";
    xen,xen-bootargs = "...";

    cpupool0 {
      compatible = "xen,cpupool";
      cpupool-cpus = <&a72_0 &a72_1>;
      cpupool-sched = "credit2";
    };

    cp1: cpupool1 {
      compatible = "xen,cpupool";
      cpupool-cpus = <&a53_0 &a53_1 &a53_2 &a53_3>;
    };

    module@0 {
      reg = <0x80080000 0x1300000>;
      compatible = "multiboot,module";
    };

    domU1 {
      #size-cells = <0x1>;
      #address-cells = <0x1>;
      compatible = "xen,domain";
      cpus = <1>;
      memory = <0 0xC0000>;
      vpl011;
      domain-cpupool = <&cp1>;

      module@92000000 {
        compatible = "multiboot,kernel", "multiboot,module";
        reg = <0x92000000 0x1ffffff>;
        bootargs = "...";
      };
    };
  };

  [...]

The example DT is instructing Xen to have two cpu pools, the one with id 0
having two phisical cpus and the one with id 1 having 4 phisical cpu, the
second cpu pool uses the null scheduler and from the /chosen node we can see
that a dom0less guest will be started on that cpu pool.

In this particular case Xen must boot with different type of cpus, so the
boot argument hmp_unsafe must be enabled.

Luca Fancellu (6):
  tools/cpupools: Give a name to unnamed cpupools
  xen/sched: create public function for cpupools creation
  xen/sched: retrieve scheduler id by name
  xen/cpupool: Create different cpupools at boot time
  arm/dom0less: assign dom0less guests to cpupools
  xen/cpupool: Allow cpupool0 to use different scheduler

 docs/misc/arm/device-tree/booting.txt  |   5 +
 docs/misc/arm/device-tree/cpupools.txt | 136 +++++++++++++++
 tools/helpers/xen-init-dom0.c          |  35 +++-
 tools/libs/light/libxl_utils.c         |   3 +-
 xen/arch/arm/domain_build.c            |  14 +-
 xen/arch/arm/include/asm/smp.h         |   3 +
 xen/common/Kconfig                     |   7 +
 xen/common/Makefile                    |   1 +
 xen/common/boot_cpupools.c             | 230 +++++++++++++++++++++++++
 xen/common/domain.c                    |   2 +-
 xen/common/sched/core.c                |  40 +++--
 xen/common/sched/cpupool.c             |  35 +++-
 xen/include/public/domctl.h            |   4 +-
 xen/include/xen/sched.h                |  53 ++++++
 14 files changed, 540 insertions(+), 28 deletions(-)
 create mode 100644 docs/misc/arm/device-tree/cpupools.txt
 create mode 100644 xen/common/boot_cpupools.c

-- 
2.17.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-04-07 14:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05  8:57 [PATCH v5 0/6] Boot time cpupools Luca Fancellu
2022-04-05  8:57 ` [PATCH v5 1/6] tools/cpupools: Give a name to unnamed cpupools Luca Fancellu
2022-04-06 14:55   ` Anthony PERARD
2022-04-07  8:26     ` Luca Fancellu
2022-04-05  8:57 ` [PATCH v5 2/6] xen/sched: create public function for cpupools creation Luca Fancellu
2022-04-07  6:07   ` Juergen Gross
2022-04-07  8:25     ` Luca Fancellu
2022-04-05  8:57 ` [PATCH v5 3/6] xen/sched: retrieve scheduler id by name Luca Fancellu
2022-04-05  8:57 ` [PATCH v5 4/6] xen/cpupool: Create different cpupools at boot time Luca Fancellu
2022-04-06 20:47   ` Stefano Stabellini
2022-04-07  6:15   ` Juergen Gross
2022-04-07  8:58   ` Julien Grall
2022-04-07  9:52     ` Luca Fancellu
2022-04-07 14:36       ` Julien Grall
2022-04-05  8:57 ` [PATCH v5 5/6] arm/dom0less: assign dom0less guests to cpupools Luca Fancellu
2022-04-05  8:57 ` [PATCH v5 6/6] xen/cpupool: Allow cpupool0 to use different scheduler Luca Fancellu
2022-04-07  6:45   ` Juergen Gross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.