Re: [PATCH 2/4] timer: relax tick stop in idle entry

Paul E. McKenney
2015-11-17T00:00:24Z

On Mon, Nov 16, 2015 at 03:40:46PM -0800, Jacob Pan wrote:
> On Mon, 16 Nov 2015 15:32:38 -0800
> Arjan van de Ven <arjan@linux.intel.com> wrote:
>
> > On 11/16/2015 3:28 PM, Paul E. McKenney wrote:
> >
> > > Is this mostly an special-purpose embedded thing, or do you expect
> > > distros to be enabling this? If the former, I suggest
> > > , but if distros are doing this for
> > > general-purpose workloads, I instead suggest CONFIG_RCU_FAST_NO_HZ.
> >
> > thermal overload happens a lot on small devices, but sadly also in
> > big datacenters where it is not uncommon to underprovision cooling
> > capacity by a bit (it's one of those "99% of the time you only need
> > THIS much, the 1% you need 30% more" and that more is expensive or
> > even impractical)

Then CONFIG_RCU_FAST_NO_HZ it is.

> CONFIG_RCU_FAST_NO_HZ is more inline with idle injection in that both
> are targeted energy efficiency.
> Checking ubuntu and fedora, seems both have CONFIG_RCU_NOCB_CPU_ALL=y.

Ah, that is right -- they both do CONFIG_NO_HZ_FULL=y, which does imply
CONFIG_RCU_NOCB_CPU_ALL=y. But SUSE does not, last I knew.

But it should be easy to set up Kconfig for this. Make your new Kconfig
option select CONFIG_RCU_FAST_NO_HZ unless CONFIG_RCU_NOCB_CPU_ALL is
already set. Alternatively, CONFIG_RCU_FAST_NO_HZ could be set up
something like the following:

depends on (NO_HZ_COMMON && SMP && RCU_EXPERT) || CONFIG_THERM_THROT
default CONFIG_THERM_THROT

But the "select RCU_FAST_NO_HZ if !RCU_NOCB_CPU_ALL" is probably cleaner.

Anyway, again, the details can be settled later.

Thanx, Paul