RE: [PATCHv4 00/12] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems

2018-08-19 Thread Gaku Inami
Hi,

> -Original Message-
> From: Morten Rasmussen 
> Sent: Wednesday, July 4, 2018 7:18 PM
> To: pet...@infradead.org; mi...@redhat.com
> Cc: valentin.schnei...@arm.com; dietmar.eggem...@arm.com; 
> vincent.guit...@linaro.org; Gaku Inami
> ; linux-kernel@vger.kernel.org; Morten Rasmussen 
> 
> Subject: [PATCHv4 00/12] sched/fair: Migrate 'misfit' tasks on asymmetric 
> capacity systems

[snip]

> The patches have been tested on:
>1. Arm Juno (r0): 2+4 Cortex A57/A53
>2. Hikey960: 4+4 Cortex A73/A53
> 
> Test case:
> Big cpus are always kept busy. Pin a shorter running sysbench tasks to
> big cpus, while creating a longer running set of unpinned sysbench
> tasks.

I have tested v4 patches on Renesas SoC again. It looks fine.

You can add:

Tested-by: Gaku Inami 

The patches have been tested on:
   3. Renesas R-Car H3 : 4+4 Cortex A57/A53

Results:
Single runs with completion time of each task
R-Car H3 (tip)
total time:  0.9488s
total time:  0.9766s
total time:  1.3243s
total time:  1.6740s

R-Car H3 (misfit)
total time:  0.9313s
total time:  0.9214s
total time:  0.9493s
total time:  0.9606s

10 run summary (tracking longest running task for each run)
R-Car H3
avg max
tip 1.6744  1.6780
misfit  0.9616  1.0290

Also, I confirmed that these patches bring performance improvement
to some benchmarks(UnixBench, LMbench). So they have very useful
for Renesas SoC.

[snip]

Regards,
Inami


RE: [PATCHv4 00/12] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems

2018-08-19 Thread Gaku Inami
Hi,

> -Original Message-
> From: Morten Rasmussen 
> Sent: Wednesday, July 4, 2018 7:18 PM
> To: pet...@infradead.org; mi...@redhat.com
> Cc: valentin.schnei...@arm.com; dietmar.eggem...@arm.com; 
> vincent.guit...@linaro.org; Gaku Inami
> ; linux-kernel@vger.kernel.org; Morten Rasmussen 
> 
> Subject: [PATCHv4 00/12] sched/fair: Migrate 'misfit' tasks on asymmetric 
> capacity systems

[snip]

> The patches have been tested on:
>1. Arm Juno (r0): 2+4 Cortex A57/A53
>2. Hikey960: 4+4 Cortex A73/A53
> 
> Test case:
> Big cpus are always kept busy. Pin a shorter running sysbench tasks to
> big cpus, while creating a longer running set of unpinned sysbench
> tasks.

I have tested v4 patches on Renesas SoC again. It looks fine.

You can add:

Tested-by: Gaku Inami 

The patches have been tested on:
   3. Renesas R-Car H3 : 4+4 Cortex A57/A53

Results:
Single runs with completion time of each task
R-Car H3 (tip)
total time:  0.9488s
total time:  0.9766s
total time:  1.3243s
total time:  1.6740s

R-Car H3 (misfit)
total time:  0.9313s
total time:  0.9214s
total time:  0.9493s
total time:  0.9606s

10 run summary (tracking longest running task for each run)
R-Car H3
avg max
tip 1.6744  1.6780
misfit  0.9616  1.0290

Also, I confirmed that these patches bring performance improvement
to some benchmarks(UnixBench, LMbench). So they have very useful
for Renesas SoC.

[snip]

Regards,
Inami


RE: [PATCHv3 0/9] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems

2018-07-02 Thread Gaku Inami
Hi,

> -Original Message-
> From: Morten Rasmussen 
> Sent: Wednesday, June 20, 2018 6:06 PM
> To: pet...@infradead.org; mi...@redhat.com
> Cc: valentin.schnei...@arm.com; dietmar.eggem...@arm.com; 
> vincent.guit...@linaro.org; Gaku Inami
> ; linux-kernel@vger.kernel.org; Morten Rasmussen 
> 
> Subject: [PATCHv3 0/9] sched/fair: Migrate 'misfit' tasks on asymmetric 
> capacity systems
[snip]
> 
> The patches have been tested on:
>1. Arm Juno (r0): 2+4 Cortex A57/A53
>2. Hikey960: 4+4 Cortex A73/A53
> 
> Test case:
> Big cpus are always kept busy. Pin a shorter running sysbench tasks to
> big cpus, while creating a longer running set of unpinned sysbench
> tasks.

I have tested v3 patches on Renesas SoC again. It looks fine.

You can add:

Tested-by: Gaku Inami 

The patches have been tested on:
   3. Renesas R-Car H3 : 4+4 Cortex A57/A53

Results:
Single runs with completion time of each task
R-Car H3 (tip)
total time:  0.9391s
total time:  0.9865s
total time:  1.3691s
total time:  1.6740s

R-Car H3 (misfit)
total time:  0.9368s
total time:  0.9475s
total time:  0.9471s
total time:  0.9505s

10 run summary (tracking longest running task for each run)
R-Car H3
avg max
tip 1.6742  1.6750
misfit  0.9784  0.9905

Regards,
Inami

[snip]


RE: [PATCHv3 0/9] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems

2018-07-02 Thread Gaku Inami
Hi,

> -Original Message-
> From: Morten Rasmussen 
> Sent: Wednesday, June 20, 2018 6:06 PM
> To: pet...@infradead.org; mi...@redhat.com
> Cc: valentin.schnei...@arm.com; dietmar.eggem...@arm.com; 
> vincent.guit...@linaro.org; Gaku Inami
> ; linux-kernel@vger.kernel.org; Morten Rasmussen 
> 
> Subject: [PATCHv3 0/9] sched/fair: Migrate 'misfit' tasks on asymmetric 
> capacity systems
[snip]
> 
> The patches have been tested on:
>1. Arm Juno (r0): 2+4 Cortex A57/A53
>2. Hikey960: 4+4 Cortex A73/A53
> 
> Test case:
> Big cpus are always kept busy. Pin a shorter running sysbench tasks to
> big cpus, while creating a longer running set of unpinned sysbench
> tasks.

I have tested v3 patches on Renesas SoC again. It looks fine.

You can add:

Tested-by: Gaku Inami 

The patches have been tested on:
   3. Renesas R-Car H3 : 4+4 Cortex A57/A53

Results:
Single runs with completion time of each task
R-Car H3 (tip)
total time:  0.9391s
total time:  0.9865s
total time:  1.3691s
total time:  1.6740s

R-Car H3 (misfit)
total time:  0.9368s
total time:  0.9475s
total time:  0.9471s
total time:  0.9505s

10 run summary (tracking longest running task for each run)
R-Car H3
avg max
tip 1.6742  1.6750
misfit  0.9784  0.9905

Regards,
Inami

[snip]


RE: [PATCHv2 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems

2018-03-19 Thread Gaku Inami
Hi

> -Original Message-
> From: Morten Rasmussen [mailto:morten.rasmus...@arm.com]
> Sent: Thursday, March 15, 2018 11:47 PM
> To: pet...@infradead.org; mi...@redhat.com
> Cc: valentin.schnei...@arm.com; dietmar.eggem...@arm.com; 
> vincent.guit...@linaro.org; Gaku Inami
> <gaku.inami...@renesas.com>; linux-kernel@vger.kernel.org; Morten Rasmussen 
> <morten.rasmus...@arm.com>
> Subject: [PATCHv2 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric 
> capacity systems
[snip]
> 
> The patches have been tested on:
>1. Arm Juno (r0): 2+4 Cortex A57/A53
>2. Hikey960: 4+4 Cortex A73/A53
> 

I have tested this on our R-Car again and it works well. In addition,
I confirmed that this patch-set also brings performance improvement to
other benchmarks(e.g. memory load latency in LMbench). You can add:

Tested-by: Gaku Inami <gaku.inami...@renesas.com>

The patches have been tested on:
   3. Renesas R-Car H3 : 4+4 Cortex A57/A53

Results:
Single runs with completion time of each task
R-Car H3 (tip)
total time:  0.9435s
total time:  0.9952s
total time:  1.3511s
total time:  1.6747s

R-Car H3 (misfit)
total time:  0.9387s
total time:  0.9280s
total time:  0.9616s
total time:  0.9934s

10 run summary (tracking longest running task for each run)
R-Car H3
avg max
tip 1.6737  1.6758
misfit  0.9980  1.0409

Regards,
Inami

[snip]


RE: [PATCHv2 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems

2018-03-19 Thread Gaku Inami
Hi

> -Original Message-
> From: Morten Rasmussen [mailto:morten.rasmus...@arm.com]
> Sent: Thursday, March 15, 2018 11:47 PM
> To: pet...@infradead.org; mi...@redhat.com
> Cc: valentin.schnei...@arm.com; dietmar.eggem...@arm.com; 
> vincent.guit...@linaro.org; Gaku Inami
> ; linux-kernel@vger.kernel.org; Morten Rasmussen 
> 
> Subject: [PATCHv2 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric 
> capacity systems
[snip]
> 
> The patches have been tested on:
>1. Arm Juno (r0): 2+4 Cortex A57/A53
>2. Hikey960: 4+4 Cortex A73/A53
> 

I have tested this on our R-Car again and it works well. In addition,
I confirmed that this patch-set also brings performance improvement to
other benchmarks(e.g. memory load latency in LMbench). You can add:

Tested-by: Gaku Inami 

The patches have been tested on:
   3. Renesas R-Car H3 : 4+4 Cortex A57/A53

Results:
Single runs with completion time of each task
R-Car H3 (tip)
total time:  0.9435s
total time:  0.9952s
total time:  1.3511s
total time:  1.6747s

R-Car H3 (misfit)
total time:  0.9387s
total time:  0.9280s
total time:  0.9616s
total time:  0.9934s

10 run summary (tracking longest running task for each run)
R-Car H3
avg max
tip 1.6737  1.6758
misfit  0.9980  1.0409

Regards,
Inami

[snip]


RE: [PATCH v2] Revert "base: arch_topology: fix section mismatch build warnings"

2018-03-13 Thread Gaku Inami
Hi,

Greg, would you review this? I confirmed it can be applied rebased on 4.16-rc5.

Regards
Inami

> -Original Message-
> From: Gaku Inami
> Sent: Tuesday, February 13, 2018 11:07 AM
> To: gre...@linuxfoundation.org; linux-kernel@vger.kernel.org
> Cc: dietmar.eggem...@arm.com; sudeep.ho...@arm.com; juri.le...@redhat.com; 
> psoda...@codeaurora.org; Gaku Inami
> <gaku.inami...@renesas.com>
> Subject: [PATCH v2] Revert "base: arch_topology: fix section mismatch build 
> warnings"
> 
> This reverts commit 452562abb5b7 ("base: arch_topology: fix section
> mismatch build warnings"). It causes the notifier call hangs in some
> use-cases.
> 
> In some cases with using maxcpus, some of cpus are booted first and
> then the remaining cpus are booted. As an example, some users who want
> to realize fast boot up often use the following procedure.
> 
>   1) Define all CPUs on device tree (CA57x4 + CA53x4)
>   2) Add "maxcpus=4" in bootargs
>   3) Kernel boot up with CA57x4
>   4) After kernel boot up, CA53x4 is booted from user
> 
> When kernel init was finished, CPUFREQ_POLICY_NOTIFIER was not still
> unregisterd. This means that "__init init_cpu_capacity_callback()"
> will be called after kernel init sequence. To avoid this problem,
> it needs to remove __init{,data} annotations by reverting this commit.
> 
> Also, this commit was needed to fix kernel compile issue below.
> However, this issue was also fixed by another patch: commit 82d8ba717ccb
> ("arch_topology: Fix section miss match warning due to
> free_raw_capacity()") in v4.15 as well.
> Whereas commit 452562abb5b7 added all the missing __init annotations,
> commit 82d8ba717ccb removed it from free_raw_capacity().
> 
> WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference
> from the function init_cpu_capacity_callback() to the variable
> .init.text:$x
> The function init_cpu_capacity_callback() references
> the variable __init $x.
> This is often because init_cpu_capacity_callback lacks a __init
> annotation or the annotation of $x is wrong.
> 
> Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due
> to free_raw_capacity()")
> Signed-off-by: Gaku Inami <gaku.inami...@renesas.com>
> Reviewed-by: Dietmar Eggemann <dietmar.eggem...@arm.com>
> Tested-by: Dietmar Eggemann <dietmar.eggem...@arm.com>
> Acked-by: Sudeep Holla <sudeep.ho...@arm.com>
> ---
> 
> Changes from v1:
>  - rebase on v4.16-rc1
>  - add short tags for fixes.
>  - add tested-by, review-by and acked-by tags.
> 
>  drivers/base/arch_topology.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 52ec517..e7cb0c6 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -169,11 +169,11 @@ bool __init topology_parse_cpu_capacity(struct 
> device_node *cpu_node, int cpu)
>  }
> 
>  #ifdef CONFIG_CPU_FREQ
> -static cpumask_var_t cpus_to_visit __initdata;
> -static void __init parsing_done_workfn(struct work_struct *work);
> -static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
> +static cpumask_var_t cpus_to_visit;
> +static void parsing_done_workfn(struct work_struct *work);
> +static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
> 
> -static int __init
> +static int
>  init_cpu_capacity_callback(struct notifier_block *nb,
>  unsigned long val,
>  void *data)
> @@ -209,7 +209,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
>   return 0;
>  }
> 
> -static struct notifier_block init_cpu_capacity_notifier __initdata = {
> +static struct notifier_block init_cpu_capacity_notifier = {
>   .notifier_call = init_cpu_capacity_callback,
>  };
> 
> @@ -242,7 +242,7 @@ static int __init register_cpufreq_notifier(void)
>  }
>  core_initcall(register_cpufreq_notifier);
> 
> -static void __init parsing_done_workfn(struct work_struct *work)
> +static void parsing_done_workfn(struct work_struct *work)
>  {
>   cpufreq_unregister_notifier(_cpu_capacity_notifier,
>CPUFREQ_POLICY_NOTIFIER);
> --
> 2.7.4



RE: [PATCH v2] Revert "base: arch_topology: fix section mismatch build warnings"

2018-03-13 Thread Gaku Inami
Hi,

Greg, would you review this? I confirmed it can be applied rebased on 4.16-rc5.

Regards
Inami

> -Original Message-
> From: Gaku Inami
> Sent: Tuesday, February 13, 2018 11:07 AM
> To: gre...@linuxfoundation.org; linux-kernel@vger.kernel.org
> Cc: dietmar.eggem...@arm.com; sudeep.ho...@arm.com; juri.le...@redhat.com; 
> psoda...@codeaurora.org; Gaku Inami
> 
> Subject: [PATCH v2] Revert "base: arch_topology: fix section mismatch build 
> warnings"
> 
> This reverts commit 452562abb5b7 ("base: arch_topology: fix section
> mismatch build warnings"). It causes the notifier call hangs in some
> use-cases.
> 
> In some cases with using maxcpus, some of cpus are booted first and
> then the remaining cpus are booted. As an example, some users who want
> to realize fast boot up often use the following procedure.
> 
>   1) Define all CPUs on device tree (CA57x4 + CA53x4)
>   2) Add "maxcpus=4" in bootargs
>   3) Kernel boot up with CA57x4
>   4) After kernel boot up, CA53x4 is booted from user
> 
> When kernel init was finished, CPUFREQ_POLICY_NOTIFIER was not still
> unregisterd. This means that "__init init_cpu_capacity_callback()"
> will be called after kernel init sequence. To avoid this problem,
> it needs to remove __init{,data} annotations by reverting this commit.
> 
> Also, this commit was needed to fix kernel compile issue below.
> However, this issue was also fixed by another patch: commit 82d8ba717ccb
> ("arch_topology: Fix section miss match warning due to
> free_raw_capacity()") in v4.15 as well.
> Whereas commit 452562abb5b7 added all the missing __init annotations,
> commit 82d8ba717ccb removed it from free_raw_capacity().
> 
> WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference
> from the function init_cpu_capacity_callback() to the variable
> .init.text:$x
> The function init_cpu_capacity_callback() references
> the variable __init $x.
> This is often because init_cpu_capacity_callback lacks a __init
> annotation or the annotation of $x is wrong.
> 
> Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due
> to free_raw_capacity()")
> Signed-off-by: Gaku Inami 
> Reviewed-by: Dietmar Eggemann 
> Tested-by: Dietmar Eggemann 
> Acked-by: Sudeep Holla 
> ---
> 
> Changes from v1:
>  - rebase on v4.16-rc1
>  - add short tags for fixes.
>  - add tested-by, review-by and acked-by tags.
> 
>  drivers/base/arch_topology.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 52ec517..e7cb0c6 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -169,11 +169,11 @@ bool __init topology_parse_cpu_capacity(struct 
> device_node *cpu_node, int cpu)
>  }
> 
>  #ifdef CONFIG_CPU_FREQ
> -static cpumask_var_t cpus_to_visit __initdata;
> -static void __init parsing_done_workfn(struct work_struct *work);
> -static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
> +static cpumask_var_t cpus_to_visit;
> +static void parsing_done_workfn(struct work_struct *work);
> +static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
> 
> -static int __init
> +static int
>  init_cpu_capacity_callback(struct notifier_block *nb,
>  unsigned long val,
>  void *data)
> @@ -209,7 +209,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
>   return 0;
>  }
> 
> -static struct notifier_block init_cpu_capacity_notifier __initdata = {
> +static struct notifier_block init_cpu_capacity_notifier = {
>   .notifier_call = init_cpu_capacity_callback,
>  };
> 
> @@ -242,7 +242,7 @@ static int __init register_cpufreq_notifier(void)
>  }
>  core_initcall(register_cpufreq_notifier);
> 
> -static void __init parsing_done_workfn(struct work_struct *work)
> +static void parsing_done_workfn(struct work_struct *work)
>  {
>   cpufreq_unregister_notifier(_cpu_capacity_notifier,
>CPUFREQ_POLICY_NOTIFIER);
> --
> 2.7.4



RE: [PATCH 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems

2018-02-27 Thread Gaku Inami
Hi

> -Original Message-
> From: linux-kernel-ow...@vger.kernel.org 
> [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Morten Rasmussen
> Sent: Friday, February 16, 2018 1:21 AM
> To: pet...@infradead.org; mi...@redhat.com
> Cc: valentin.schnei...@arm.com; dietmar.eggem...@arm.com; 
> vincent.guit...@linaro.org; linux-kernel@vger.kernel.org;
> Morten Rasmussen <morten.rasmus...@arm.com>
> Subject: [PATCH 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric 
> capacity systems
> 

> 
> The patches have been tested on:
>1. Arm Juno (r0): 2+4 Cortex A57/A53
>2. Hikey960: 4+4 Cortex A73/A53
> 
> Test case:
> Big cpus are always kept busy. Pin a shorter running sysbench tasks to
> big cpus, while creating a longer running set of unpinned sysbench
> tasks.

Tested-by: Gaku Inami <gaku.inami...@renesas.com>

I tested as same in other SoC. It looks fine.

The patches have been tested on:
   3. Renesas R-Car H3 : 4+4 Cortex A57/A53

Results:
Single runs with completion time of each task
R-Car H3 (tip)
total time:  0.9415s
total time:  0.9582s
total time:  1.3275s
total time:  1.6752s

R-Car H3 (misfit)
total time:  0.9312s
total time:  0.9429s
total time:  0.9525s
total time:  0.9660s

10 run summary (tracking longest running task for each run)
R-Car H3
avg max
tip 1.6752  1.6753
misfit  0.9890  1.0204

Regards,
Inami


RE: [PATCH 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems

2018-02-27 Thread Gaku Inami
Hi

> -Original Message-
> From: linux-kernel-ow...@vger.kernel.org 
> [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Morten Rasmussen
> Sent: Friday, February 16, 2018 1:21 AM
> To: pet...@infradead.org; mi...@redhat.com
> Cc: valentin.schnei...@arm.com; dietmar.eggem...@arm.com; 
> vincent.guit...@linaro.org; linux-kernel@vger.kernel.org;
> Morten Rasmussen 
> Subject: [PATCH 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric 
> capacity systems
> 

> 
> The patches have been tested on:
>1. Arm Juno (r0): 2+4 Cortex A57/A53
>2. Hikey960: 4+4 Cortex A73/A53
> 
> Test case:
> Big cpus are always kept busy. Pin a shorter running sysbench tasks to
> big cpus, while creating a longer running set of unpinned sysbench
> tasks.

Tested-by: Gaku Inami 

I tested as same in other SoC. It looks fine.

The patches have been tested on:
   3. Renesas R-Car H3 : 4+4 Cortex A57/A53

Results:
Single runs with completion time of each task
R-Car H3 (tip)
total time:  0.9415s
total time:  0.9582s
total time:  1.3275s
total time:  1.6752s

R-Car H3 (misfit)
total time:  0.9312s
total time:  0.9429s
total time:  0.9525s
total time:  0.9660s

10 run summary (tracking longest running task for each run)
R-Car H3
avg max
tip 1.6752  1.6753
misfit  0.9890  1.0204

Regards,
Inami


[PATCH v2] Revert "base: arch_topology: fix section mismatch build warnings"

2018-02-12 Thread Gaku Inami
This reverts commit 452562abb5b7 ("base: arch_topology: fix section
mismatch build warnings"). It causes the notifier call hangs in some
use-cases.

In some cases with using maxcpus, some of cpus are booted first and
then the remaining cpus are booted. As an example, some users who want
to realize fast boot up often use the following procedure.

  1) Define all CPUs on device tree (CA57x4 + CA53x4)
  2) Add "maxcpus=4" in bootargs
  3) Kernel boot up with CA57x4
  4) After kernel boot up, CA53x4 is booted from user

When kernel init was finished, CPUFREQ_POLICY_NOTIFIER was not still
unregisterd. This means that "__init init_cpu_capacity_callback()"
will be called after kernel init sequence. To avoid this problem,
it needs to remove __init{,data} annotations by reverting this commit.

Also, this commit was needed to fix kernel compile issue below.
However, this issue was also fixed by another patch: commit 82d8ba717ccb
("arch_topology: Fix section miss match warning due to
free_raw_capacity()") in v4.15 as well.
Whereas commit 452562abb5b7 added all the missing __init annotations,
commit 82d8ba717ccb removed it from free_raw_capacity().

WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference
from the function init_cpu_capacity_callback() to the variable
.init.text:$x
The function init_cpu_capacity_callback() references
the variable __init $x.
This is often because init_cpu_capacity_callback lacks a __init
annotation or the annotation of $x is wrong.

Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due
to free_raw_capacity()")
Signed-off-by: Gaku Inami <gaku.inami...@renesas.com>
Reviewed-by: Dietmar Eggemann <dietmar.eggem...@arm.com>
Tested-by: Dietmar Eggemann <dietmar.eggem...@arm.com>
Acked-by: Sudeep Holla <sudeep.ho...@arm.com>
---

Changes from v1:
 - rebase on v4.16-rc1
 - add short tags for fixes.
 - add tested-by, review-by and acked-by tags. 

 drivers/base/arch_topology.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 52ec517..e7cb0c6 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -169,11 +169,11 @@ bool __init topology_parse_cpu_capacity(struct 
device_node *cpu_node, int cpu)
 }
 
 #ifdef CONFIG_CPU_FREQ
-static cpumask_var_t cpus_to_visit __initdata;
-static void __init parsing_done_workfn(struct work_struct *work);
-static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
+static cpumask_var_t cpus_to_visit;
+static void parsing_done_workfn(struct work_struct *work);
+static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
 
-static int __init
+static int
 init_cpu_capacity_callback(struct notifier_block *nb,
   unsigned long val,
   void *data)
@@ -209,7 +209,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
return 0;
 }
 
-static struct notifier_block init_cpu_capacity_notifier __initdata = {
+static struct notifier_block init_cpu_capacity_notifier = {
.notifier_call = init_cpu_capacity_callback,
 };
 
@@ -242,7 +242,7 @@ static int __init register_cpufreq_notifier(void)
 }
 core_initcall(register_cpufreq_notifier);
 
-static void __init parsing_done_workfn(struct work_struct *work)
+static void parsing_done_workfn(struct work_struct *work)
 {
cpufreq_unregister_notifier(_cpu_capacity_notifier,
 CPUFREQ_POLICY_NOTIFIER);
-- 
2.7.4



[PATCH v2] Revert "base: arch_topology: fix section mismatch build warnings"

2018-02-12 Thread Gaku Inami
This reverts commit 452562abb5b7 ("base: arch_topology: fix section
mismatch build warnings"). It causes the notifier call hangs in some
use-cases.

In some cases with using maxcpus, some of cpus are booted first and
then the remaining cpus are booted. As an example, some users who want
to realize fast boot up often use the following procedure.

  1) Define all CPUs on device tree (CA57x4 + CA53x4)
  2) Add "maxcpus=4" in bootargs
  3) Kernel boot up with CA57x4
  4) After kernel boot up, CA53x4 is booted from user

When kernel init was finished, CPUFREQ_POLICY_NOTIFIER was not still
unregisterd. This means that "__init init_cpu_capacity_callback()"
will be called after kernel init sequence. To avoid this problem,
it needs to remove __init{,data} annotations by reverting this commit.

Also, this commit was needed to fix kernel compile issue below.
However, this issue was also fixed by another patch: commit 82d8ba717ccb
("arch_topology: Fix section miss match warning due to
free_raw_capacity()") in v4.15 as well.
Whereas commit 452562abb5b7 added all the missing __init annotations,
commit 82d8ba717ccb removed it from free_raw_capacity().

WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference
from the function init_cpu_capacity_callback() to the variable
.init.text:$x
The function init_cpu_capacity_callback() references
the variable __init $x.
This is often because init_cpu_capacity_callback lacks a __init
annotation or the annotation of $x is wrong.

Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due
to free_raw_capacity()")
Signed-off-by: Gaku Inami 
Reviewed-by: Dietmar Eggemann 
Tested-by: Dietmar Eggemann 
Acked-by: Sudeep Holla 
---

Changes from v1:
 - rebase on v4.16-rc1
 - add short tags for fixes.
 - add tested-by, review-by and acked-by tags. 

 drivers/base/arch_topology.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 52ec517..e7cb0c6 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -169,11 +169,11 @@ bool __init topology_parse_cpu_capacity(struct 
device_node *cpu_node, int cpu)
 }
 
 #ifdef CONFIG_CPU_FREQ
-static cpumask_var_t cpus_to_visit __initdata;
-static void __init parsing_done_workfn(struct work_struct *work);
-static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
+static cpumask_var_t cpus_to_visit;
+static void parsing_done_workfn(struct work_struct *work);
+static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
 
-static int __init
+static int
 init_cpu_capacity_callback(struct notifier_block *nb,
   unsigned long val,
   void *data)
@@ -209,7 +209,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
return 0;
 }
 
-static struct notifier_block init_cpu_capacity_notifier __initdata = {
+static struct notifier_block init_cpu_capacity_notifier = {
.notifier_call = init_cpu_capacity_callback,
 };
 
@@ -242,7 +242,7 @@ static int __init register_cpufreq_notifier(void)
 }
 core_initcall(register_cpufreq_notifier);
 
-static void __init parsing_done_workfn(struct work_struct *work)
+static void parsing_done_workfn(struct work_struct *work)
 {
cpufreq_unregister_notifier(_cpu_capacity_notifier,
 CPUFREQ_POLICY_NOTIFIER);
-- 
2.7.4



RE: [PATCH] Revert "base: arch_topology: fix section mismatch build warnings"

2018-02-12 Thread Gaku Inami
> -Original Message-
> From: Sudeep Holla [mailto:sudeep.ho...@arm.com]
> Sent: Monday, February 12, 2018 9:29 PM
> To: Gaku Inami <gaku.inami...@renesas.com>; gre...@linuxfoundation.org; 
> linux-kernel@vger.kernel.org
> Cc: Sudeep Holla <sudeep.ho...@arm.com>; dietmar.eggem...@arm.com; 
> juri.le...@redhat.com;
> psoda...@codeaurora.org
> Subject: Re: [PATCH] Revert "base: arch_topology: fix section mismatch build 
> warnings"


> 
> Ah I see commit 82d8ba717ccb made the commit 452562abb5b7 redundant
> by removing the __init. Both attempt to solve the same problem in
> different ways :)
> 
> Can you please add the the tag, so that it gets picked up accordingly ?
> 
> Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due
> to free_raw_capacity()")
> 
> 
> FWIW,
> 
> Acked-by: Sudeep Holla <sudeep.ho...@arm.com>

Thanks for your review and ack. I will send v2 patch soon.

Regards,
Inami


RE: [PATCH] Revert "base: arch_topology: fix section mismatch build warnings"

2018-02-12 Thread Gaku Inami
> -Original Message-
> From: Sudeep Holla [mailto:sudeep.ho...@arm.com]
> Sent: Monday, February 12, 2018 9:29 PM
> To: Gaku Inami ; gre...@linuxfoundation.org; 
> linux-kernel@vger.kernel.org
> Cc: Sudeep Holla ; dietmar.eggem...@arm.com; 
> juri.le...@redhat.com;
> psoda...@codeaurora.org
> Subject: Re: [PATCH] Revert "base: arch_topology: fix section mismatch build 
> warnings"


> 
> Ah I see commit 82d8ba717ccb made the commit 452562abb5b7 redundant
> by removing the __init. Both attempt to solve the same problem in
> different ways :)
> 
> Can you please add the the tag, so that it gets picked up accordingly ?
> 
> Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due
> to free_raw_capacity()")
> 
> 
> FWIW,
> 
> Acked-by: Sudeep Holla 

Thanks for your review and ack. I will send v2 patch soon.

Regards,
Inami


[PATCH] Revert "base: arch_topology: fix section mismatch build warnings"

2018-02-07 Thread Gaku Inami
This reverts commit 452562abb5b7 ("base: arch_topology: fix section
mismatch build warnings"). It causes the notifier call hangs in some
use-cases.

In some cases with using maxcpus, some of cpus are booted first and
then the remaining cpus are booted. As an example, some users who want
to realize fast boot up often use the following procedure.

  1) Define all CPUs on device tree (CA57x4 + CA53x4)
  2) Add "maxcpus=4" in bootargs
  3) Kernel boot up with CA57x4
  4) After kernel boot up, CA53x4 is booted from user

When kernel init was finished, CPUFREQ_POLICY_NOTIFIER was not still
unregisterd. This means that "__init init_cpu_capacity_callback()"
will be called after kernel init sequence. To avoid this problem,
it needs to remove __init{,data} annotations by reverting this commit.

Also, this commit was needed to fix kernel compile issue below.
However, this issue was also fixed by another patch: commit 82d8ba717ccb
("arch_topology: Fix section miss match warning due to
free_raw_capacity()") in v4.15 as well.
Whereas commit 452562abb5b7 added all the missing __init annotations,
commit 82d8ba717ccb removed it from free_raw_capacity().

WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference
from the function init_cpu_capacity_callback() to the variable
.init.text:$x
The function init_cpu_capacity_callback() references
the variable __init $x.
This is often because init_cpu_capacity_callback lacks a __init
annotation or the annotation of $x is wrong.

Signed-off-by: Gaku Inami <gaku.inami...@renesas.com>
---
 drivers/base/arch_topology.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 4de87b0..8bfd498 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -175,11 +175,11 @@ bool __init topology_parse_cpu_capacity(struct 
device_node *cpu_node, int cpu)
 }
 
 #ifdef CONFIG_CPU_FREQ
-static cpumask_var_t cpus_to_visit __initdata;
-static void __init parsing_done_workfn(struct work_struct *work);
-static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
+static cpumask_var_t cpus_to_visit;
+static void parsing_done_workfn(struct work_struct *work);
+static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
 
-static int __init
+static int
 init_cpu_capacity_callback(struct notifier_block *nb,
   unsigned long val,
   void *data)
@@ -215,7 +215,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
return 0;
 }
 
-static struct notifier_block init_cpu_capacity_notifier __initdata = {
+static struct notifier_block init_cpu_capacity_notifier = {
.notifier_call = init_cpu_capacity_callback,
 };
 
@@ -248,7 +248,7 @@ static int __init register_cpufreq_notifier(void)
 }
 core_initcall(register_cpufreq_notifier);
 
-static void __init parsing_done_workfn(struct work_struct *work)
+static void parsing_done_workfn(struct work_struct *work)
 {
cpufreq_unregister_notifier(_cpu_capacity_notifier,
 CPUFREQ_POLICY_NOTIFIER);
-- 
2.7.4



[PATCH] Revert "base: arch_topology: fix section mismatch build warnings"

2018-02-07 Thread Gaku Inami
This reverts commit 452562abb5b7 ("base: arch_topology: fix section
mismatch build warnings"). It causes the notifier call hangs in some
use-cases.

In some cases with using maxcpus, some of cpus are booted first and
then the remaining cpus are booted. As an example, some users who want
to realize fast boot up often use the following procedure.

  1) Define all CPUs on device tree (CA57x4 + CA53x4)
  2) Add "maxcpus=4" in bootargs
  3) Kernel boot up with CA57x4
  4) After kernel boot up, CA53x4 is booted from user

When kernel init was finished, CPUFREQ_POLICY_NOTIFIER was not still
unregisterd. This means that "__init init_cpu_capacity_callback()"
will be called after kernel init sequence. To avoid this problem,
it needs to remove __init{,data} annotations by reverting this commit.

Also, this commit was needed to fix kernel compile issue below.
However, this issue was also fixed by another patch: commit 82d8ba717ccb
("arch_topology: Fix section miss match warning due to
free_raw_capacity()") in v4.15 as well.
Whereas commit 452562abb5b7 added all the missing __init annotations,
commit 82d8ba717ccb removed it from free_raw_capacity().

WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference
from the function init_cpu_capacity_callback() to the variable
.init.text:$x
The function init_cpu_capacity_callback() references
the variable __init $x.
This is often because init_cpu_capacity_callback lacks a __init
annotation or the annotation of $x is wrong.

Signed-off-by: Gaku Inami 
---
 drivers/base/arch_topology.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 4de87b0..8bfd498 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -175,11 +175,11 @@ bool __init topology_parse_cpu_capacity(struct 
device_node *cpu_node, int cpu)
 }
 
 #ifdef CONFIG_CPU_FREQ
-static cpumask_var_t cpus_to_visit __initdata;
-static void __init parsing_done_workfn(struct work_struct *work);
-static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
+static cpumask_var_t cpus_to_visit;
+static void parsing_done_workfn(struct work_struct *work);
+static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
 
-static int __init
+static int
 init_cpu_capacity_callback(struct notifier_block *nb,
   unsigned long val,
   void *data)
@@ -215,7 +215,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
return 0;
 }
 
-static struct notifier_block init_cpu_capacity_notifier __initdata = {
+static struct notifier_block init_cpu_capacity_notifier = {
.notifier_call = init_cpu_capacity_callback,
 };
 
@@ -248,7 +248,7 @@ static int __init register_cpufreq_notifier(void)
 }
 core_initcall(register_cpufreq_notifier);
 
-static void __init parsing_done_workfn(struct work_struct *work)
+static void parsing_done_workfn(struct work_struct *work)
 {
cpufreq_unregister_notifier(_cpu_capacity_notifier,
 CPUFREQ_POLICY_NOTIFIER);
-- 
2.7.4