[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFTL4hzH7avJLAvjBf3Px44s-BRRezTekrdQR4vSUhyFTYXwHA@mail.gmail.com>
Date: Wed, 20 Feb 2013 16:44:24 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Kevin Hilman <khilman@...aro.org>
Cc: Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Li Zhong <zhong@...ux.vnet.ibm.com>,
Namhyung Kim <namhyung.kim@....com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Sedat Dilek <sedat.dilek@...il.com>,
Gleb Natapov <gleb@...hat.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
Tony Luck <tony.luck@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>
Subject: Re: [GIT PULL] cputime: Full dynticks task/cputime accounting v7
2013/2/15 Kevin Hilman <khilman@...aro.org>:
> Frederic Weisbecker <fweisbec@...il.com> writes:
>
>> Ingo,
>>
>> Please pull the new full dynticks cputime accounting code that
>> can be found at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
>> tags/full-dynticks-cputime-for-mingo
>>
>> My last concern is the dependency on CONFIG_64BIT. We rely on cputime_t
>> being u64 for reasonable nanosec granularity implementation. And therefore
>> we need a single instruction fetch to read kernel cpustat for atomicity
>> requirement against concurrent incrementation, which only 64 bit archs
>> can provide.
>
> Actually, moderately recent 32-bit ARMs can do atomic 64-bit load/stores
> too.
Does gcc automatically handle 64 bit store/loads in one way or does
that require specific CPU instructions?
>
> Also, is it just kernel_cpustat increments that need protection? or do
> the various reads of the task_struct's cputime fields also need
> protection (hmm, thinking twice, maybe those are already sufficiently
> protected by the vtime_seqlock?)
At least the task stats are protected with vtime_seqlock (hopefully I
haven't missed some). But per cpu or global stats are not.
>
>> It's probably no big deal to solve this issue. What we need is simply some
>> atomic accessors.
>
> What about using the atomic64_* accessors? Those would just use the
> native loads/stores on arches that have them, otherwise
> CONFIG_GENERIC_ATOMIC64 provides some fallbacks.
Yeah may be we can try this.
>
> To give it a try, below is a quick patch to convert kernel_cpustat to
> atomic64. I only got as far as compile testing and basic boot testing
> on a 32-bit ARM platform, but let me know if this is the right
> direction.
Ok, I'll comment on your second version.
>
>> There is just no emergency though as this new option depends on the context
>> tracking subsystem that only x86-64 (and soon ppc64) implements yet. And
>> this set is complex enough already. I think we can deal with that later.
>
> I've started working on the ARM version of the context_tracker, so
> "later" is coming quickly and I will do what I can to help this along.
Ok. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists