diff mbox

ARM: multi_v7_defconfig: major refresh

Message ID 53DB6B4F.9080605@arm.com
State New
Headers show

Commit Message

Sudeep Holla Aug. 1, 2014, 10:26 a.m. UTC
On 22/07/14 19:01, Olof Johansson wrote:
> This is a major refresh of the multi_v7_defconfig:
>
> - Bring over a bunch of Samsung drivers to make ODROID-U3 and Chromebooks usable
>   * Enable big.LITTLE
>   * MCPM
>   * CYAPA touchpad
>   * Samsung-related MTD/regulator/clk/pinmux drivers
>   * Add some of the CrOS EC drivers
> - Turn on TPM, HW_RANDOM
> - OMAP_USB3 -> TI_PIPE3 option rename
> - Enable MCPM/b.L for VEXPRESS
> - Add new CONFIG_MTD_SPI_NOR since it otherwise masks off SPI NOR drivers
> - CONFIG_LOGO, because penguins.
>
> I took care to keep the new options that have been added for whose the
> drivers are not yet in our for-next branch. This was pretty awkward so
> we should sort out how to handle those better in the future.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>   arch/arm/configs/multi_v7_defconfig |   74 +++++++++++++++++++++++++++--------
>   1 file changed, 58 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
> index 16518a7..c7654cf 100644
> --- a/arch/arm/configs/multi_v7_defconfig
> +++ b/arch/arm/configs/multi_v7_defconfig
> @@ -50,6 +50,7 @@ CONFIG_MACH_SPEAR1310=y
>   CONFIG_MACH_SPEAR1340=y
>   CONFIG_ARCH_STI=y
>   CONFIG_ARCH_EXYNOS=y
> +CONFIG_EXYNOS5420_MCPM=y
>   CONFIG_ARCH_SUNXI=y
>   CONFIG_ARCH_SIRF=y
>   CONFIG_ARCH_TEGRA=y
> @@ -57,21 +58,23 @@ CONFIG_ARCH_TEGRA_2x_SOC=y
>   CONFIG_ARCH_TEGRA_3x_SOC=y
>   CONFIG_ARCH_TEGRA_114_SOC=y
>   CONFIG_ARCH_TEGRA_124_SOC=y
> -CONFIG_TEGRA_EMC_SCALING_ENABLE=y
>   CONFIG_ARCH_U8500=y
>   CONFIG_MACH_HREFV60=y
>   CONFIG_MACH_SNOWBALL=y
> -CONFIG_MACH_UX500_DT=y
>   CONFIG_ARCH_VEXPRESS=y
>   CONFIG_ARCH_VEXPRESS_CA9X4=y
> +CONFIG_ARCH_VEXPRESS_DCSCB=y
> +CONFIG_ARCH_VEXPRESS_TC2_PM=y
>   CONFIG_ARCH_WM8850=y
>   CONFIG_ARCH_ZYNQ=y
> -CONFIG_TRUSTED_FOUNDATIONS=y
>   CONFIG_PCI=y
>   CONFIG_PCI_MSI=y
>   CONFIG_PCI_MVEBU=y
>   CONFIG_PCI_TEGRA=y
>   CONFIG_SMP=y
> +CONFIG_BIG_LITTLE=y
> +CONFIG_BL_SWITCHER=y

IIUC, this will enable switcher code by default. I am not sure if this
is intentional ? E.g.: After this I can have only 2 active cpus instead
of 5 on my Vexpress TC2 platform.

IMO we can keep this enabled by default in the build, but disabled
by default on boot. One way to achieve this:
(There's sysfs to re-enable it runtime)

-->8
  static int __init bL_switcher_init(void)

---

> +CONFIG_BL_SWITCHER_DUMMY_IF=y

This was added only for debugging purposes, again not sure if you want
this enabled by default. Ideally it should be triggered by CPUFreq.

Regards,
Sudeep

Comments

Jon Medhurst (Tixy) Aug. 1, 2014, 11:01 a.m. UTC | #1
On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
> 
> On 22/07/14 19:01, Olof Johansson wrote:
> > This is a major refresh of the multi_v7_defconfig:
> >
> > - Bring over a bunch of Samsung drivers to make ODROID-U3 and Chromebooks usable
> >   * Enable big.LITTLE
> >   * MCPM
> [...]

> > +CONFIG_BIG_LITTLE=y
> > +CONFIG_BL_SWITCHER=y
> 
> IIUC, this will enable switcher code by default. I am not sure if this
> is intentional ? E.g.: After this I can have only 2 active cpus instead
> of 5 on my Vexpress TC2 platform.
> 
> IMO we can keep this enabled by default in the build, but disabled
> by default on boot.

TC2 has a big.LITTLE processor and the switcher is the only mainlined
way of making any kind of proper use of big.LITTLE, so why not have it
enabled by default?

>  One way to achieve this:
> (There's sysfs to re-enable it runtime)

The opposite is also true, if you don't want the switcher enabled you
can disable it by the same method after boot ;-)

> -->8
> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
> index 490f3dced749..f4c36e70166a 100644
> --- a/arch/arm/common/bL_switcher.c
> +++ b/arch/arm/common/bL_switcher.c
> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct 
> notifier_block *nfb,
>          return NOTIFY_DONE;
>   }
> 
> -static bool no_bL_switcher;
> +static bool no_bL_switcher = true;

This changes the default for everyone, which I guess is fair enough if
there is a good reason, but I'm not sure there is.
Olof Johansson Aug. 1, 2014, 11:03 a.m. UTC | #2
On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
>>
>> On 22/07/14 19:01, Olof Johansson wrote:
>> > This is a major refresh of the multi_v7_defconfig:
>> >
>> > - Bring over a bunch of Samsung drivers to make ODROID-U3 and Chromebooks usable
>> >   * Enable big.LITTLE
>> >   * MCPM
>> [...]
>
>> > +CONFIG_BIG_LITTLE=y
>> > +CONFIG_BL_SWITCHER=y
>>
>> IIUC, this will enable switcher code by default. I am not sure if this
>> is intentional ? E.g.: After this I can have only 2 active cpus instead
>> of 5 on my Vexpress TC2 platform.
>>
>> IMO we can keep this enabled by default in the build, but disabled
>> by default on boot.
>
> TC2 has a big.LITTLE processor and the switcher is the only mainlined
> way of making any kind of proper use of big.LITTLE, so why not have it
> enabled by default?

+1.

>
>>  One way to achieve this:
>> (There's sysfs to re-enable it runtime)
>
> The opposite is also true, if you don't want the switcher enabled you
> can disable it by the same method after boot ;-)
>
>> -->8
>> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
>> index 490f3dced749..f4c36e70166a 100644
>> --- a/arch/arm/common/bL_switcher.c
>> +++ b/arch/arm/common/bL_switcher.c
>> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct
>> notifier_block *nfb,
>>          return NOTIFY_DONE;
>>   }
>>
>> -static bool no_bL_switcher;
>> +static bool no_bL_switcher = true;
>
> This changes the default for everyone, which I guess is fair enough if
> there is a good reason, but I'm not sure there is.

No, I don't think there is.


-Olof
Pawel Moll Aug. 1, 2014, 11:06 a.m. UTC | #3
On Fri, 2014-08-01 at 12:01 +0100, Jon Medhurst (Tixy) wrote:
> > -->8
> > diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
> > index 490f3dced749..f4c36e70166a 100644
> > --- a/arch/arm/common/bL_switcher.c
> > +++ b/arch/arm/common/bL_switcher.c
> > @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct 
> > notifier_block *nfb,
> >          return NOTIFY_DONE;
> >   }
> > 
> > -static bool no_bL_switcher;
> > +static bool no_bL_switcher = true;
> 
> This changes the default for everyone, which I guess is fair enough if
> there is a good reason, but I'm not sure there is.

I would vote for this change and argue that b.L switcher is "strange
enough" (ie. I know I've got 5 processors, so why do I see only 2?)
_not_ to have it enabled by default. I'd hope that a user looking for
this functionality will know how to turn it on.

Paweł
Sudeep Holla Aug. 1, 2014, 11:12 a.m. UTC | #4
On 01/08/14 12:03, Olof Johansson wrote:
> On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
>> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
>>>
>>> On 22/07/14 19:01, Olof Johansson wrote:
>>>> This is a major refresh of the multi_v7_defconfig:
>>>>
>>>> - Bring over a bunch of Samsung drivers to make ODROID-U3 and Chromebooks usable
>>>>    * Enable big.LITTLE
>>>>    * MCPM
>>> [...]
>>
>>>> +CONFIG_BIG_LITTLE=y
>>>> +CONFIG_BL_SWITCHER=y
>>>
>>> IIUC, this will enable switcher code by default. I am not sure if this
>>> is intentional ? E.g.: After this I can have only 2 active cpus instead
>>> of 5 on my Vexpress TC2 platform.
>>>
>>> IMO we can keep this enabled by default in the build, but disabled
>>> by default on boot.
>>
>> TC2 has a big.LITTLE processor and the switcher is the only mainlined
>> way of making any kind of proper use of big.LITTLE, so why not have it
>> enabled by default?
>
> +1.
>
>>
>>>   One way to achieve this:
>>> (There's sysfs to re-enable it runtime)
>>
>> The opposite is also true, if you don't want the switcher enabled you
>> can disable it by the same method after boot ;-)
>>
>>> -->8
>>> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
>>> index 490f3dced749..f4c36e70166a 100644
>>> --- a/arch/arm/common/bL_switcher.c
>>> +++ b/arch/arm/common/bL_switcher.c
>>> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct
>>> notifier_block *nfb,
>>>           return NOTIFY_DONE;
>>>    }
>>>
>>> -static bool no_bL_switcher;
>>> +static bool no_bL_switcher = true;
>>
>> This changes the default for everyone, which I guess is fair enough if
>> there is a good reason, but I'm not sure there is.
>
> No, I don't think there is.
>

It's just that people using TC2 will suddenly see 3 of the 5 CPUs missing.

Regards,
Sudeep
Jon Medhurst (Tixy) Aug. 1, 2014, 11:28 a.m. UTC | #5
On Fri, 2014-08-01 at 12:12 +0100, Sudeep Holla wrote:
> 
> On 01/08/14 12:03, Olof Johansson wrote:
> > On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
> >> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
> >>>
> >>> On 22/07/14 19:01, Olof Johansson wrote:
> >>>> This is a major refresh of the multi_v7_defconfig:
> >>>>
> >>>> - Bring over a bunch of Samsung drivers to make ODROID-U3 and Chromebooks usable
> >>>>    * Enable big.LITTLE
> >>>>    * MCPM
> >>> [...]
> >>
> >>>> +CONFIG_BIG_LITTLE=y
> >>>> +CONFIG_BL_SWITCHER=y
> >>>
> >>> IIUC, this will enable switcher code by default. I am not sure if this
> >>> is intentional ? E.g.: After this I can have only 2 active cpus instead
> >>> of 5 on my Vexpress TC2 platform.
> >>>
> >>> IMO we can keep this enabled by default in the build, but disabled
> >>> by default on boot.
> >>
> >> TC2 has a big.LITTLE processor and the switcher is the only mainlined
> >> way of making any kind of proper use of big.LITTLE, so why not have it
> >> enabled by default?
> >
> > +1.
> >
> >>
> >>>   One way to achieve this:
> >>> (There's sysfs to re-enable it runtime)
> >>
> >> The opposite is also true, if you don't want the switcher enabled you
> >> can disable it by the same method after boot ;-)
> >>
> >>> -->8
> >>> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
> >>> index 490f3dced749..f4c36e70166a 100644
> >>> --- a/arch/arm/common/bL_switcher.c
> >>> +++ b/arch/arm/common/bL_switcher.c
> >>> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct
> >>> notifier_block *nfb,
> >>>           return NOTIFY_DONE;
> >>>    }
> >>>
> >>> -static bool no_bL_switcher;
> >>> +static bool no_bL_switcher = true;
> >>
> >> This changes the default for everyone, which I guess is fair enough if
> >> there is a good reason, but I'm not sure there is.
> >
> > No, I don't think there is.
> >
> 
> It's just that people using TC2 will suddenly see 3 of the 5 CPUs missing.

Yes, if they we're previously using multi_v7_defconfig (do people
working specifically with TC2's use that?)

Conversely, with the change in default proposed above, anyone with their
own configs enabling the switcher will suddenly see the number of CPUs
go from 2 to 5. We also have the situation where we have a config
option, which when enabled, doesn't actually do anything unless the user
also changes boot arguments or takes measures to enable it after boot.
Which seems the wrong way for things to work to me.

I believe that if we don't want the switcher enabled in kernels built
with multi_v7_defconfig, then it should be done by not adding the config
option to multi_v7_defconfig in the first place.
Sudeep Holla Aug. 1, 2014, 2:57 p.m. UTC | #6
On 01/08/14 12:28, Jon Medhurst (Tixy) wrote:
> On Fri, 2014-08-01 at 12:12 +0100, Sudeep Holla wrote:
>>
>> On 01/08/14 12:03, Olof Johansson wrote:
>>> On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
>>>> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:

[...]

>>>>
>>>>>    One way to achieve this:
>>>>> (There's sysfs to re-enable it runtime)
>>>>
>>>> The opposite is also true, if you don't want the switcher enabled you
>>>> can disable it by the same method after boot ;-)
>>>>
>>>>> -->8
>>>>> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
>>>>> index 490f3dced749..f4c36e70166a 100644
>>>>> --- a/arch/arm/common/bL_switcher.c
>>>>> +++ b/arch/arm/common/bL_switcher.c
>>>>> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct
>>>>> notifier_block *nfb,
>>>>>            return NOTIFY_DONE;
>>>>>     }
>>>>>
>>>>> -static bool no_bL_switcher;
>>>>> +static bool no_bL_switcher = true;
>>>>
>>>> This changes the default for everyone, which I guess is fair enough if
>>>> there is a good reason, but I'm not sure there is.
>>>
>>> No, I don't think there is.
>>>
>>
>> It's just that people using TC2 will suddenly see 3 of the 5 CPUs missing.
>
> Yes, if they we're previously using multi_v7_defconfig (do people
> working specifically with TC2's use that?)
>

I don't, but assumed many might use it.

> Conversely, with the change in default proposed above, anyone with their
> own configs enabling the switcher will suddenly see the number of CPUs
> go from 2 to 5. We also have the situation where we have a config
> option, which when enabled, doesn't actually do anything unless the user
> also changes boot arguments or takes measures to enable it after boot.
> Which seems the wrong way for things to work to me.
>

OK, makes sense. Just curious how many big.LITTLE platforms have CPUFreq
support and integrated with bL switcher. Otherwise we end up switching
clusters/cpus using dummy i/f anyways(and probably that's the reason why
that config is enabled which I missed to understand initially as I was
thinking it's more for development and testing only). If is that's
acceptable for those platforms, then it should be fine I believe ?

Regards,
Sudeep
Jon Medhurst (Tixy) Aug. 1, 2014, 3:53 p.m. UTC | #7
On Fri, 2014-08-01 at 15:57 +0100, Sudeep Holla wrote:
> 
> On 01/08/14 12:28, Jon Medhurst (Tixy) wrote:
> > On Fri, 2014-08-01 at 12:12 +0100, Sudeep Holla wrote:
> >>
> >> On 01/08/14 12:03, Olof Johansson wrote:
> >>> On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
> >>>> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
> 
> [...]
> 
> >>>>
> >>>>>    One way to achieve this:
> >>>>> (There's sysfs to re-enable it runtime)
> >>>>
> >>>> The opposite is also true, if you don't want the switcher enabled you
> >>>> can disable it by the same method after boot ;-)
> >>>>
> >>>>> -->8
> >>>>> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
> >>>>> index 490f3dced749..f4c36e70166a 100644
> >>>>> --- a/arch/arm/common/bL_switcher.c
> >>>>> +++ b/arch/arm/common/bL_switcher.c
> >>>>> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct
> >>>>> notifier_block *nfb,
> >>>>>            return NOTIFY_DONE;
> >>>>>     }
> >>>>>
> >>>>> -static bool no_bL_switcher;
> >>>>> +static bool no_bL_switcher = true;
> >>>>
> >>>> This changes the default for everyone, which I guess is fair enough if
> >>>> there is a good reason, but I'm not sure there is.
> >>>
> >>> No, I don't think there is.
> >>>
> >>
> >> It's just that people using TC2 will suddenly see 3 of the 5 CPUs missing.
> >
> > Yes, if they we're previously using multi_v7_defconfig (do people
> > working specifically with TC2's use that?)
> >
> 
> I don't, but assumed many might use it.
> 
> > Conversely, with the change in default proposed above, anyone with their
> > own configs enabling the switcher will suddenly see the number of CPUs
> > go from 2 to 5. We also have the situation where we have a config
> > option, which when enabled, doesn't actually do anything unless the user
> > also changes boot arguments or takes measures to enable it after boot.
> > Which seems the wrong way for things to work to me.
> >
> 
> OK, makes sense. Just curious how many big.LITTLE platforms have CPUFreq
> support and integrated with bL switcher. Otherwise we end up switching
> clusters/cpus using dummy i/f anyways

Hmm, that is a point, there are 3 other big.LITTLE SoC's I can spot in
mainline [1], and I wouldn't want to speculate how they would be
affected by having the big.LITTLE switcher enabled.

[1] exynos5420, exynos5260, r8a7790
Olof Johansson Aug. 3, 2014, 3:20 a.m. UTC | #8
On Fri, Aug 01, 2014 at 04:53:19PM +0100, Jon Medhurst (Tixy) wrote:
> On Fri, 2014-08-01 at 15:57 +0100, Sudeep Holla wrote:
> > 
> > On 01/08/14 12:28, Jon Medhurst (Tixy) wrote:
> > > On Fri, 2014-08-01 at 12:12 +0100, Sudeep Holla wrote:
> > >>
> > >> On 01/08/14 12:03, Olof Johansson wrote:
> > >>> On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
> > >>>> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
> > 
> > [...]
> > 
> > >>>>
> > >>>>>    One way to achieve this:
> > >>>>> (There's sysfs to re-enable it runtime)
> > >>>>
> > >>>> The opposite is also true, if you don't want the switcher enabled you
> > >>>> can disable it by the same method after boot ;-)
> > >>>>
> > >>>>> -->8
> > >>>>> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
> > >>>>> index 490f3dced749..f4c36e70166a 100644
> > >>>>> --- a/arch/arm/common/bL_switcher.c
> > >>>>> +++ b/arch/arm/common/bL_switcher.c
> > >>>>> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct
> > >>>>> notifier_block *nfb,
> > >>>>>            return NOTIFY_DONE;
> > >>>>>     }
> > >>>>>
> > >>>>> -static bool no_bL_switcher;
> > >>>>> +static bool no_bL_switcher = true;
> > >>>>
> > >>>> This changes the default for everyone, which I guess is fair enough if
> > >>>> there is a good reason, but I'm not sure there is.
> > >>>
> > >>> No, I don't think there is.
> > >>>
> > >>
> > >> It's just that people using TC2 will suddenly see 3 of the 5 CPUs missing.
> > >
> > > Yes, if they we're previously using multi_v7_defconfig (do people
> > > working specifically with TC2's use that?)
> > >
> > 
> > I don't, but assumed many might use it.
> > 
> > > Conversely, with the change in default proposed above, anyone with their
> > > own configs enabling the switcher will suddenly see the number of CPUs
> > > go from 2 to 5. We also have the situation where we have a config
> > > option, which when enabled, doesn't actually do anything unless the user
> > > also changes boot arguments or takes measures to enable it after boot.
> > > Which seems the wrong way for things to work to me.
> > >
> > 
> > OK, makes sense. Just curious how many big.LITTLE platforms have CPUFreq
> > support and integrated with bL switcher. Otherwise we end up switching
> > clusters/cpus using dummy i/f anyways
> 
> Hmm, that is a point, there are 3 other big.LITTLE SoC's I can spot in
> mainline [1], and I wouldn't want to speculate how they would be
> affected by having the big.LITTLE switcher enabled.
> 
> [1] exynos5420, exynos5260, r8a7790

5422/5800 is a fourth SoC, but it's nearly identical to 5420 with a few
bugfixes.

At the end of the day, b.L switcher has predictable user behavior, while
running with assymetric SMP does not. Until the scheduler work has been done,
it is significantly better to enable the switcher instead of SMP on these
platforms.

Once the scheduler work has come further, we can switch over. But not until
then.


-Olof
Olof Johansson Aug. 3, 2014, 3:23 a.m. UTC | #9
On Fri, Aug 01, 2014 at 12:06:13PM +0100, Pawel Moll wrote:
> On Fri, 2014-08-01 at 12:01 +0100, Jon Medhurst (Tixy) wrote:
> > > -->8
> > > diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
> > > index 490f3dced749..f4c36e70166a 100644
> > > --- a/arch/arm/common/bL_switcher.c
> > > +++ b/arch/arm/common/bL_switcher.c
> > > @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct 
> > > notifier_block *nfb,
> > >          return NOTIFY_DONE;
> > >   }
> > > 
> > > -static bool no_bL_switcher;
> > > +static bool no_bL_switcher = true;
> > 
> > This changes the default for everyone, which I guess is fair enough if
> > there is a good reason, but I'm not sure there is.
> 
> I would vote for this change and argue that b.L switcher is "strange
> enough" (ie. I know I've got 5 processors, so why do I see only 2?)
> _not_ to have it enabled by default. I'd hope that a user looking for
> this functionality will know how to turn it on.

I strongly disagree. Today nearly all products that ship have a switcher
enabled, since the scheduler work has not been done yet upstream. Having
a platform that behaves undeterministically because the scheduler can't tell
the core types apart and makes bad decisions is better than someone not finding
the right number of CPUs under /proc/cpuinfo.

And the same goes in the other direction: Any user looking to test out the
scheduler work will know how to turn it on.

The only other argument I'm willing to have here is if you want to somehow
control this per platform and add a hook on vexpress that turns off the
switcher by default. The rest of them should have it on.


-Olof
Kevin Hilman Aug. 8, 2014, 6:04 p.m. UTC | #10
Olof Johansson <olof@lixom.net> writes:

> On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
>> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
>>>
>>> On 22/07/14 19:01, Olof Johansson wrote:
>>> > This is a major refresh of the multi_v7_defconfig:
>>> >
>>> > - Bring over a bunch of Samsung drivers to make ODROID-U3 and Chromebooks usable
>>> >   * Enable big.LITTLE
>>> >   * MCPM
>>> [...]
>>
>>> > +CONFIG_BIG_LITTLE=y
>>> > +CONFIG_BL_SWITCHER=y
>>>
>>> IIUC, this will enable switcher code by default. I am not sure if this
>>> is intentional ? E.g.: After this I can have only 2 active cpus instead
>>> of 5 on my Vexpress TC2 platform.
>>>
>>> IMO we can keep this enabled by default in the build, but disabled
>>> by default on boot.
>>
>> TC2 has a big.LITTLE processor and the switcher is the only mainlined
>> way of making any kind of proper use of big.LITTLE, so why not have it
>> enabled by default?
>
> +1.
>

I disagree.

The bL switcher is a stopgap used on products (which have their own
defconfigs anyways) but upstream development is focused on HMP (or
whatever the current buzzword is for the kernel directly scheduling both
big and little cores.)  

So IMO, for upstream coverage, we should *not* be enabling the switcher
but should be letting the scheduler directly manage all CPUs.

At least on Exynos, with MCPM support merged, the kernel can boot up all
the CPUs and directly manage them.

Kevin
Kevin Hilman Aug. 8, 2014, 6:12 p.m. UTC | #11
Olof Johansson <olof@lixom.net> writes:

> On Fri, Aug 01, 2014 at 04:53:19PM +0100, Jon Medhurst (Tixy) wrote:
>> On Fri, 2014-08-01 at 15:57 +0100, Sudeep Holla wrote:
>> > 
>> > On 01/08/14 12:28, Jon Medhurst (Tixy) wrote:
>> > > On Fri, 2014-08-01 at 12:12 +0100, Sudeep Holla wrote:
>> > >>
>> > >> On 01/08/14 12:03, Olof Johansson wrote:
>> > >>> On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
>> > >>>> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
>> > 
>> > [...]
>> > 
>> > >>>>
>> > >>>>>    One way to achieve this:
>> > >>>>> (There's sysfs to re-enable it runtime)
>> > >>>>
>> > >>>> The opposite is also true, if you don't want the switcher enabled you
>> > >>>> can disable it by the same method after boot ;-)
>> > >>>>
>> > >>>>> -->8
>> > >>>>> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
>> > >>>>> index 490f3dced749..f4c36e70166a 100644
>> > >>>>> --- a/arch/arm/common/bL_switcher.c
>> > >>>>> +++ b/arch/arm/common/bL_switcher.c
>> > >>>>> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct
>> > >>>>> notifier_block *nfb,
>> > >>>>>            return NOTIFY_DONE;
>> > >>>>>     }
>> > >>>>>
>> > >>>>> -static bool no_bL_switcher;
>> > >>>>> +static bool no_bL_switcher = true;
>> > >>>>
>> > >>>> This changes the default for everyone, which I guess is fair enough if
>> > >>>> there is a good reason, but I'm not sure there is.
>> > >>>
>> > >>> No, I don't think there is.
>> > >>>
>> > >>
>> > >> It's just that people using TC2 will suddenly see 3 of the 5 CPUs missing.
>> > >
>> > > Yes, if they we're previously using multi_v7_defconfig (do people
>> > > working specifically with TC2's use that?)
>> > >
>> > 
>> > I don't, but assumed many might use it.
>> > 
>> > > Conversely, with the change in default proposed above, anyone with their
>> > > own configs enabling the switcher will suddenly see the number of CPUs
>> > > go from 2 to 5. We also have the situation where we have a config
>> > > option, which when enabled, doesn't actually do anything unless the user
>> > > also changes boot arguments or takes measures to enable it after boot.
>> > > Which seems the wrong way for things to work to me.
>> > >
>> > 
>> > OK, makes sense. Just curious how many big.LITTLE platforms have CPUFreq
>> > support and integrated with bL switcher. Otherwise we end up switching
>> > clusters/cpus using dummy i/f anyways
>> 
>> Hmm, that is a point, there are 3 other big.LITTLE SoC's I can spot in
>> mainline [1], and I wouldn't want to speculate how they would be
>> affected by having the big.LITTLE switcher enabled.
>> 
>> [1] exynos5420, exynos5260, r8a7790
>
> 5422/5800 is a fourth SoC, but it's nearly identical to 5420 with a few
> bugfixes.
>
> At the end of the day, b.L switcher has predictable user behavior, while
> running with assymetric SMP does not. 

What is unpredictable?  Perhaps sub-optimal, but I don't see what's any
more unpreditable about it than normal SMP.

> Until the scheduler work has been done,
> it is significantly better to enable the switcher instead of SMP on these
> platforms.
>
> Once the scheduler work has come further, we can switch over. But not until
> then.

I think the upstream defconfigs should facilitate the broader testing of
the scheduler work by having the swticher disabled.

By enabling the switcher (and the corresponding cpufreq switcher driver)
by default, we're now actually making one more obstacle for broader
testing of the generic scheduling on all cores.
  
Kevin
Nicolas Pitre Aug. 8, 2014, 6:17 p.m. UTC | #12
On Fri, 8 Aug 2014, Kevin Hilman wrote:

> Olof Johansson <olof@lixom.net> writes:
> 
> > On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
> >> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
> >>>
> >>> On 22/07/14 19:01, Olof Johansson wrote:
> >>> > This is a major refresh of the multi_v7_defconfig:
> >>> >
> >>> > - Bring over a bunch of Samsung drivers to make ODROID-U3 and Chromebooks usable
> >>> >   * Enable big.LITTLE
> >>> >   * MCPM
> >>> [...]
> >>
> >>> > +CONFIG_BIG_LITTLE=y
> >>> > +CONFIG_BL_SWITCHER=y
> >>>
> >>> IIUC, this will enable switcher code by default. I am not sure if this
> >>> is intentional ? E.g.: After this I can have only 2 active cpus instead
> >>> of 5 on my Vexpress TC2 platform.
> >>>
> >>> IMO we can keep this enabled by default in the build, but disabled
> >>> by default on boot.
> >>
> >> TC2 has a big.LITTLE processor and the switcher is the only mainlined
> >> way of making any kind of proper use of big.LITTLE, so why not have it
> >> enabled by default?
> >
> > +1.
> >
> 
> I disagree.
> 
> The bL switcher is a stopgap used on products (which have their own
> defconfigs anyways) but upstream development is focused on HMP (or
> whatever the current buzzword is for the kernel directly scheduling both
> big and little cores.)  
> 
> So IMO, for upstream coverage, we should *not* be enabling the switcher
> but should be letting the scheduler directly manage all CPUs.

I agree... in principle.  In practice the upstream scheduler has no 
notion of asymmetric processing yet, and probably still for a while to 
come.  Once the scheduler does a semi-descent job at it then the 
switcher should default to being disabled.

> At least on Exynos, with MCPM support merged, the kernel can boot up all
> the CPUs and directly manage them.

"Managing" them is still somewhat overstated.  Yes, the scheduler does 
_see_ them but it still can't manage them properly.  At best you'll get 
somewhat random system performance, at worst it'll be completely 
inefficient.  In most cases the switcher will give you much better 
behavior for the time being.


Nicolas
Nicolas Pitre Aug. 8, 2014, 6:26 p.m. UTC | #13
On Fri, 8 Aug 2014, Kevin Hilman wrote:

> Olof Johansson <olof@lixom.net> writes:
> 
> > On Fri, Aug 01, 2014 at 04:53:19PM +0100, Jon Medhurst (Tixy) wrote:
> >> On Fri, 2014-08-01 at 15:57 +0100, Sudeep Holla wrote:
> >> > 
> >> > On 01/08/14 12:28, Jon Medhurst (Tixy) wrote:
> >> > > On Fri, 2014-08-01 at 12:12 +0100, Sudeep Holla wrote:
> >> > >>
> >> > >> On 01/08/14 12:03, Olof Johansson wrote:
> >> > >>> On Fri, Aug 1, 2014 at 4:01 AM, Jon Medhurst (Tixy) <tixy@linaro.org> wrote:
> >> > >>>> On Fri, 2014-08-01 at 11:26 +0100, Sudeep Holla wrote:
> >> > 
> >> > [...]
> >> > 
> >> > >>>>
> >> > >>>>>    One way to achieve this:
> >> > >>>>> (There's sysfs to re-enable it runtime)
> >> > >>>>
> >> > >>>> The opposite is also true, if you don't want the switcher enabled you
> >> > >>>> can disable it by the same method after boot ;-)
> >> > >>>>
> >> > >>>>> -->8
> >> > >>>>> diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
> >> > >>>>> index 490f3dced749..f4c36e70166a 100644
> >> > >>>>> --- a/arch/arm/common/bL_switcher.c
> >> > >>>>> +++ b/arch/arm/common/bL_switcher.c
> >> > >>>>> @@ -794,7 +794,7 @@ static int bL_switcher_hotplug_callback(struct
> >> > >>>>> notifier_block *nfb,
> >> > >>>>>            return NOTIFY_DONE;
> >> > >>>>>     }
> >> > >>>>>
> >> > >>>>> -static bool no_bL_switcher;
> >> > >>>>> +static bool no_bL_switcher = true;
> >> > >>>>
> >> > >>>> This changes the default for everyone, which I guess is fair enough if
> >> > >>>> there is a good reason, but I'm not sure there is.
> >> > >>>
> >> > >>> No, I don't think there is.
> >> > >>>
> >> > >>
> >> > >> It's just that people using TC2 will suddenly see 3 of the 5 CPUs missing.
> >> > >
> >> > > Yes, if they we're previously using multi_v7_defconfig (do people
> >> > > working specifically with TC2's use that?)
> >> > >
> >> > 
> >> > I don't, but assumed many might use it.
> >> > 
> >> > > Conversely, with the change in default proposed above, anyone with their
> >> > > own configs enabling the switcher will suddenly see the number of CPUs
> >> > > go from 2 to 5. We also have the situation where we have a config
> >> > > option, which when enabled, doesn't actually do anything unless the user
> >> > > also changes boot arguments or takes measures to enable it after boot.
> >> > > Which seems the wrong way for things to work to me.
> >> > >
> >> > 
> >> > OK, makes sense. Just curious how many big.LITTLE platforms have CPUFreq
> >> > support and integrated with bL switcher. Otherwise we end up switching
> >> > clusters/cpus using dummy i/f anyways
> >> 
> >> Hmm, that is a point, there are 3 other big.LITTLE SoC's I can spot in
> >> mainline [1], and I wouldn't want to speculate how they would be
> >> affected by having the big.LITTLE switcher enabled.
> >> 
> >> [1] exynos5420, exynos5260, r8a7790
> >
> > 5422/5800 is a fourth SoC, but it's nearly identical to 5420 with a few
> > bugfixes.
> >
> > At the end of the day, b.L switcher has predictable user behavior, while
> > running with assymetric SMP does not. 
> 
> What is unpredictable?  Perhaps sub-optimal, but I don't see what's any
> more unpreditable about it than normal SMP.

CPUs not being equal, your overall performance will be randomized 
depending on which CPU a given task ends up being scheduled on.  And in 
turn this is going to skew scheduler profiling and statistics gathering 
for that task if it is migrated around.  Some performance critical tasks 
might never get the boost from a big CPU while other tasks will 
needlessly drain your battery by not being run on a small CPU.  People 
will complain and the squirrel across the street will steal your SD 
cards, etc.

> > Until the scheduler work has been done,
> > it is significantly better to enable the switcher instead of SMP on these
> > platforms.
> >
> > Once the scheduler work has come further, we can switch over. But not until
> > then.
> 
> I think the upstream defconfigs should facilitate the broader testing of
> the scheduler work by having the swticher disabled.
> 
> By enabling the switcher (and the corresponding cpufreq switcher driver)
> by default, we're now actually making one more obstacle for broader
> testing of the generic scheduling on all cores.

The generic scheduler currently has nothing really worth testing by the 
wider  audience.  Be assured that when it does then the switcher will 
indeed default to off.


Nicolas
Amit Kucheria Aug. 8, 2014, 6:37 p.m. UTC | #14
On Fri, Aug 8, 2014 at 11:42 PM, Kevin Hilman <khilman@linaro.org> wrote:
> Olof Johansson <olof@lixom.net> writes:
>
>>
>> At the end of the day, b.L switcher has predictable user behavior, while
>> running with assymetric SMP does not.
>
> What is unpredictable?  Perhaps sub-optimal, but I don't see what's any
> more unpreditable about it than normal SMP.
>
>> Until the scheduler work has been done,
>> it is significantly better to enable the switcher instead of SMP on these
>> platforms.
>>
>> Once the scheduler work has come further, we can switch over. But not until
>> then.
>
> I think the upstream defconfigs should facilitate the broader testing of
> the scheduler work by having the swticher disabled.

I thought the upstream defconfigs were meant to make machines work out
of the box. Any development effort can surely tweak the configs to
their needs.

> By enabling the switcher (and the corresponding cpufreq switcher driver)
> by default, we're now actually making one more obstacle for broader
> testing of the generic scheduling on all cores.

Actually, there might some advantages to turning on the switcher.
 1. The performance/power numbers of the b.L switcher is the minimum
we need to achieve on a scheduler-driven b.L system. It establishes a
baseline. Shame on us working on EAS if the switcher does better.
 2. The switcher exercises the cpufreq drivers quite a bit. So any
niggles will be ironed out on platforms where it hasn't been well
tested.

Regards,
Amit
Kevin Hilman Aug. 8, 2014, 6:44 p.m. UTC | #15
On Fri, Aug 8, 2014 at 11:26 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> On Fri, 8 Aug 2014, Kevin Hilman wrote:

[...]

>> I think the upstream defconfigs should facilitate the broader testing of
>> the scheduler work by having the swticher disabled.
>>
>> By enabling the switcher (and the corresponding cpufreq switcher driver)
>> by default, we're now actually making one more obstacle for broader
>> testing of the generic scheduling on all cores.
>
> The generic scheduler currently has nothing really worth testing by the
> wider  audience.  Be assured that when it does then the switcher will
> indeed default to off.

I guess my vacation successfully purged my memory.  I was thinking the
switcher was only a complie-time option, but just realized that it can
be disabled at runtime (via /sys/kernel/bL_switcher/active.)

With the runtime enable/disable feature of the switcher, I don't have
any more (reasonable) objections to it being enabled by default.

Kevin
diff mbox

Patch

diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
index 490f3dced749..f4c36e70166a 100644
--- a/arch/arm/common/bL_switcher.c
+++ b/arch/arm/common/bL_switcher.c
@@ -794,7 +794,7 @@  static int bL_switcher_hotplug_callback(struct 
notifier_block *nfb,
         return NOTIFY_DONE;
  }

-static bool no_bL_switcher;
+static bool no_bL_switcher = true;
  core_param(no_bL_switcher, no_bL_switcher, bool, 0644);