2013-03-07 23:35:51

by Frederic Weisbecker

[permalink] [raw]
Subject: Re: [PATCH 07/33] nohz: Basic full dynticks interface

2013/2/11 Borislav Petkov <[email protected]>:
> On Tue, Jan 08, 2013 at 03:08:07AM +0100, Frederic Weisbecker wrote:
>
> [ ? ]
>
>> diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
>> index 8601f0d..dc6381d 100644
>> --- a/kernel/time/Kconfig
>> +++ b/kernel/time/Kconfig
>> @@ -70,6 +70,15 @@ config NO_HZ
>> only trigger on an as-needed basis both when the system is
>> busy and when the system is idle.
>>
>> +config NO_HZ_FULL
>> + bool "Full tickless system"
>
> I think you want to say here "Almost-completely tickless system".
> "Almost" because of that one CPU outside of the range :-)

I think that "Full dynticks system" would express well what happens?

>
>> + depends on NO_HZ && RCU_USER_QS && VIRT_CPU_ACCOUNTING_GEN && RCU_NOCB_CPU && SMP
>> + select CONTEXT_TRACKING_FORCE
>> + help
>> + Try to be tickless everywhere, not just in idle. (You need
>> + to fill up the full_nohz_mask boot parameter).
>> +
>> +
>> config HIGH_RES_TIMERS
>> bool "High Resolution Timer Support"
>> depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
>> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
>> index 314b9ee..494a2aa 100644
>> --- a/kernel/time/tick-sched.c
>> +++ b/kernel/time/tick-sched.c
>> @@ -142,6 +142,29 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
>> profile_tick(CPU_PROFILING);
>> }
>>
>> +#ifdef CONFIG_NO_HZ_FULL
>> +static cpumask_var_t full_nohz_mask;
>> +bool have_full_nohz_mask;
>> +
>> +int tick_nohz_full_cpu(int cpu)
>> +{
>> + if (!have_full_nohz_mask)
>> + return 0;
>> +
>> + return cpumask_test_cpu(cpu, full_nohz_mask);
>> +}
>> +
>> +/* Parse the boot-time nohz CPU list from the kernel parameters. */
>> +static int __init tick_nohz_full_setup(char *str)
>> +{
>> + alloc_bootmem_cpumask_var(&full_nohz_mask);
>> + have_full_nohz_mask = true;
>> + cpulist_parse(str, full_nohz_mask);
>
> Don't you want to check retval of cpulist_parse first here before
> assigning have_full_nohz_mask and allocating cpumask var?
>
> We don't trust userspace, you know.

Yeah sure. I was really in draft/laboratory mode until now. But I
guess I need to start thinking about such details, since nobody seem
to oppose with the whole design. Time to zoom in.

>
>> + return 1;
>> +}
>> +__setup("full_nohz=", tick_nohz_full_setup);
>
> I'd guess this kernel parameter needs to go into
> Documentation/kernel-parameters.txt along with a referral to
> Documentation/cputopology.txt which explains how to specify cpulists for
> n00bs like me :-)

Sure, I'll add that on my TODO list.

Thanks!


2013-03-08 10:17:40

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH 07/33] nohz: Basic full dynticks interface

On Fri, Mar 08, 2013 at 12:35:47AM +0100, Frederic Weisbecker wrote:
> I think that "Full dynticks system" would express well what happens?

Yeah, it probably doesn't really matter all that much in the end -
people will refer to this with different names like with other features
in Linux anyway. :-)

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

2013-03-08 13:45:16

by Frederic Weisbecker

[permalink] [raw]
Subject: Re: [PATCH 07/33] nohz: Basic full dynticks interface

2013/3/8 Borislav Petkov <[email protected]>:
> On Fri, Mar 08, 2013 at 12:35:47AM +0100, Frederic Weisbecker wrote:
>> I think that "Full dynticks system" would express well what happens?
>
> Yeah, it probably doesn't really matter all that much in the end -
> people will refer to this with different names like with other features
> in Linux anyway. :-)

Right, with some more or less precision, and different shades of
metaphor or metonymy :)

Dynticks, tickless, nohz, cpu isolation, pendulum clock noise free
kernel, bare metal performance snort, walking alone and free through
Latvian forests.

2013-03-08 14:33:04

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH 07/33] nohz: Basic full dynticks interface

On Fri, Mar 08, 2013 at 02:45:12PM +0100, Frederic Weisbecker wrote:
> 2013/3/8 Borislav Petkov <[email protected]>:
> > On Fri, Mar 08, 2013 at 12:35:47AM +0100, Frederic Weisbecker wrote:
> >> I think that "Full dynticks system" would express well what happens?
> >
> > Yeah, it probably doesn't really matter all that much in the end -
> > people will refer to this with different names like with other features
> > in Linux anyway. :-)
>
> Right, with some more or less precision, and different shades of
> metaphor or metonymy :)
>
> Dynticks, tickless, nohz, cpu isolation, pendulum clock noise free
> kernel, bare metal performance snort, walking alone and free through
> Latvian forests.

"... completely naked." You definitely need that too. :-)

Ok, put all those above in the Kconfig help text and ship it - people
will *now* know what it is.

LOL.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

2013-03-08 16:55:45

by Frederic Weisbecker

[permalink] [raw]
Subject: Re: [PATCH 07/33] nohz: Basic full dynticks interface

2013/3/8 Borislav Petkov <[email protected]>:
> On Fri, Mar 08, 2013 at 02:45:12PM +0100, Frederic Weisbecker wrote:
>> 2013/3/8 Borislav Petkov <[email protected]>:
>> > On Fri, Mar 08, 2013 at 12:35:47AM +0100, Frederic Weisbecker wrote:
>> >> I think that "Full dynticks system" would express well what happens?
>> >
>> > Yeah, it probably doesn't really matter all that much in the end -
>> > people will refer to this with different names like with other features
>> > in Linux anyway. :-)
>>
>> Right, with some more or less precision, and different shades of
>> metaphor or metonymy :)
>>
>> Dynticks, tickless, nohz, cpu isolation, pendulum clock noise free
>> kernel, bare metal performance snort, walking alone and free through
>> Latvian forests.
>
> "... completely naked." You definitely need that too. :-)

I didn't mean _that_ free, but while at it, the picture will never be
complete without a chainsaw.

> Ok, put all those above in the Kconfig help text and ship it - people
> will *now* know what it is.

At last!