Re: [PATCH v8 0/7] Boot time cpupools

2022-05-09 Thread Stefano Stabellini
On Fri, 6 May 2022, Luca Fancellu wrote:
> *** Resending the serie adding the maintainers ***
> *** Patches #4 and #6 needs a review from the maintainer of that area ***

Committed, thanks!



[PATCH v8 0/7] Boot time cpupools

2022-05-06 Thread Luca Fancellu
*** Resending the serie adding the maintainers ***
*** Patches #4 and #6 needs a review from the maintainer of that area ***

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 = <_0 _1>;
  cpupool-sched = "credit2";
};

cp1: cpupool1 {
  compatible = "xen,cpupool";
  cpupool-cpus = <_0 _1 _2 _3>;
  cpupool-sched = "null";
};

module@0 {
  reg = <0x8008 0x130>;
  compatible = "multiboot,module";
};

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

  module@9200 {
compatible = "multiboot,kernel", "multiboot,module";
reg = <0x9200 0x1ff>;
bootargs = "...";
  };
};
  };

  [...]

The example DT is instructing Xen to have two cpu pools, one having two phisical
cpus and the one having 4 phisical cpus, the last mentioned 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 (7):
  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
  xen/cpupool: Don't allow removing cpu0 from cpupool0
  arm/dom0less: assign dom0less guests to cpupools
  xen/cpupool: Allow cpupool0 to use different scheduler

 MAINTAINERS|   2 +-
 docs/misc/arm/device-tree/booting.txt  |   5 +
 docs/misc/arm/device-tree/cpupools.txt | 140 +++
 tools/helpers/xen-init-dom0.c  |  37 +++-
 tools/libs/light/libxl_utils.c |   3 +-
 xen/arch/arm/domain_build.c|  19 +-
 xen/arch/arm/include/asm/smp.h |   3 +
 xen/common/domain.c|   2 +-
 xen/common/sched/Kconfig   |   7 +
 xen/common/sched/Makefile  |   1 +
 xen/common/sched/boot-cpupool.c| 234 +
 xen/common/sched/core.c|  40 +++--
 xen/common/sched/cpupool.c |  43 -
 xen/include/public/domctl.h|   5 +-
 xen/include/xen/sched.h|  53 ++
 15 files changed, 563 insertions(+), 31 deletions(-)
 create mode 100644 docs/misc/arm/device-tree/cpupools.txt
 create mode 100644 xen/common/sched/boot-cpupool.c

-- 
2.17.1




Re: [PATCH v8 0/7] Boot time cpupools

2022-05-06 Thread Luca Fancellu
>>> 
>>> Luca Fancellu (7):
>>> 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
>>> xen/cpupool: Don't allow removing cpu0 from cpupool0
>>> arm/dom0less: assign dom0less guests to cpupools
>>> xen/cpupool: Allow cpupool0 to use different scheduler
>>> 
>>> MAINTAINERS | 2 +-
>>> docs/misc/arm/device-tree/booting.txt | 5 +
>>> docs/misc/arm/device-tree/cpupools.txt | 140 +++
>>> tools/helpers/xen-init-dom0.c | 37 +++-
>>> tools/libs/light/libxl_utils.c | 3 +-
>>> xen/arch/arm/domain_build.c | 19 +-
>>> xen/arch/arm/include/asm/smp.h | 3 +
>>> xen/common/domain.c | 2 +-
>>> xen/common/sched/Kconfig | 7 +
>>> xen/common/sched/Makefile | 1 +
>>> xen/common/sched/boot-cpupool.c | 234 +
>>> xen/common/sched/core.c | 40 +++--
>>> xen/common/sched/cpupool.c | 43 -
>>> xen/include/public/domctl.h | 5 +-
>>> xen/include/xen/sched.h | 53 ++
>>> 15 files changed, 563 insertions(+), 31 deletions(-)
>>> create mode 100644 docs/misc/arm/device-tree/cpupools.txt
>>> create mode 100644 xen/common/sched/boot-cpupool.c
>>> 
>>> -- 
>>> 2.17.1
>>> 
>> Ping?
> 
> You seemed to have forgotten to CC the relevant maintainers on each patch and 
> the cover letter. I only got this e-mail because I have a filter for some 
> keywords.
> 
>> The v8 seems to be reviewed for all patch
>> https://patchwork.kernel.org/project/xen-devel/list/?series=634064
> 
> AFAICT, patchwork only tells you the number of reviewed-by tag. It doesn't 
> tell you whether the patch was suitably reviewed.
> 
> Looking through the patches:
> #1: Ready
> #2: Ready
> #3: Ready
> #4: Missing review from the cpupool maintainers (Juergen or Dario)
> #5: Ready
> #6: Missing review from the cpupool maintainers
> #7: Ready
> 

Thanks Julien, indeed my ping didn’t CC the maintainers, I will ping separately 
on the #4 and #6 patches.

Cheers,
Luca

> Cheers,
> 
> -- 
> Julien Grall



Re: [PATCH v8 0/7] Boot time cpupools

2022-05-06 Thread Julien Grall

Hi Luca,

On 06/05/2022 12:25, Luca Fancellu wrote:



The example DT is instructing Xen to have two cpu pools, one having two phisical
cpus and the one having 4 phisical cpus, the last mentioned 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 (7):
  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
  xen/cpupool: Don't allow removing cpu0 from cpupool0
  arm/dom0less: assign dom0less guests to cpupools
  xen/cpupool: Allow cpupool0 to use different scheduler

MAINTAINERS|   2 +-
docs/misc/arm/device-tree/booting.txt  |   5 +
docs/misc/arm/device-tree/cpupools.txt | 140 +++
tools/helpers/xen-init-dom0.c  |  37 +++-
tools/libs/light/libxl_utils.c |   3 +-
xen/arch/arm/domain_build.c|  19 +-
xen/arch/arm/include/asm/smp.h |   3 +
xen/common/domain.c|   2 +-
xen/common/sched/Kconfig   |   7 +
xen/common/sched/Makefile  |   1 +
xen/common/sched/boot-cpupool.c| 234 +
xen/common/sched/core.c|  40 +++--
xen/common/sched/cpupool.c |  43 -
xen/include/public/domctl.h|   5 +-
xen/include/xen/sched.h|  53 ++
15 files changed, 563 insertions(+), 31 deletions(-)
create mode 100644 docs/misc/arm/device-tree/cpupools.txt
create mode 100644 xen/common/sched/boot-cpupool.c

--
2.17.1



Ping?


You seemed to have forgotten to CC the relevant maintainers on each 
patch and the cover letter. I only got this e-mail because I have a 
filter for some keywords.




The v8 seems to be reviewed for all patch

https://patchwork.kernel.org/project/xen-devel/list/?series=634064


AFAICT, patchwork only tells you the number of reviewed-by tag. It 
doesn't tell you whether the patch was suitably reviewed.


Looking through the patches:
  #1: Ready
  #2: Ready
  #3: Ready
  #4: Missing review from the cpupool maintainers (Juergen or Dario)
  #5: Ready
  #6: Missing review from the cpupool maintainers
  #7: Ready

Cheers,

--
Julien Grall



Re: [PATCH v8 0/7] Boot time cpupools

2022-05-06 Thread Luca Fancellu


> The example DT is instructing Xen to have two cpu pools, one having two 
> phisical
> cpus and the one having 4 phisical cpus, the last mentioned 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 (7):
>  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
>  xen/cpupool: Don't allow removing cpu0 from cpupool0
>  arm/dom0less: assign dom0less guests to cpupools
>  xen/cpupool: Allow cpupool0 to use different scheduler
> 
> MAINTAINERS|   2 +-
> docs/misc/arm/device-tree/booting.txt  |   5 +
> docs/misc/arm/device-tree/cpupools.txt | 140 +++
> tools/helpers/xen-init-dom0.c  |  37 +++-
> tools/libs/light/libxl_utils.c |   3 +-
> xen/arch/arm/domain_build.c|  19 +-
> xen/arch/arm/include/asm/smp.h |   3 +
> xen/common/domain.c|   2 +-
> xen/common/sched/Kconfig   |   7 +
> xen/common/sched/Makefile  |   1 +
> xen/common/sched/boot-cpupool.c| 234 +
> xen/common/sched/core.c|  40 +++--
> xen/common/sched/cpupool.c |  43 -
> xen/include/public/domctl.h|   5 +-
> xen/include/xen/sched.h|  53 ++
> 15 files changed, 563 insertions(+), 31 deletions(-)
> create mode 100644 docs/misc/arm/device-tree/cpupools.txt
> create mode 100644 xen/common/sched/boot-cpupool.c
> 
> -- 
> 2.17.1
> 

Ping?

The v8 seems to be reviewed for all patch

https://patchwork.kernel.org/project/xen-devel/list/?series=634064

Any other thought about that?

Cheers,
Luca




[PATCH v8 0/7] Boot time cpupools

2022-04-21 Thread Luca Fancellu
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 = <_0 _1>;
  cpupool-sched = "credit2";
};

cp1: cpupool1 {
  compatible = "xen,cpupool";
  cpupool-cpus = <_0 _1 _2 _3>;
  cpupool-sched = "null";
};

module@0 {
  reg = <0x8008 0x130>;
  compatible = "multiboot,module";
};

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

  module@9200 {
compatible = "multiboot,kernel", "multiboot,module";
reg = <0x9200 0x1ff>;
bootargs = "...";
  };
};
  };

  [...]

The example DT is instructing Xen to have two cpu pools, one having two phisical
cpus and the one having 4 phisical cpus, the last mentioned 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 (7):
  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
  xen/cpupool: Don't allow removing cpu0 from cpupool0
  arm/dom0less: assign dom0less guests to cpupools
  xen/cpupool: Allow cpupool0 to use different scheduler

 MAINTAINERS|   2 +-
 docs/misc/arm/device-tree/booting.txt  |   5 +
 docs/misc/arm/device-tree/cpupools.txt | 140 +++
 tools/helpers/xen-init-dom0.c  |  37 +++-
 tools/libs/light/libxl_utils.c |   3 +-
 xen/arch/arm/domain_build.c|  19 +-
 xen/arch/arm/include/asm/smp.h |   3 +
 xen/common/domain.c|   2 +-
 xen/common/sched/Kconfig   |   7 +
 xen/common/sched/Makefile  |   1 +
 xen/common/sched/boot-cpupool.c| 234 +
 xen/common/sched/core.c|  40 +++--
 xen/common/sched/cpupool.c |  43 -
 xen/include/public/domctl.h|   5 +-
 xen/include/xen/sched.h|  53 ++
 15 files changed, 563 insertions(+), 31 deletions(-)
 create mode 100644 docs/misc/arm/device-tree/cpupools.txt
 create mode 100644 xen/common/sched/boot-cpupool.c

-- 
2.17.1