[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160406075000.GF3430@twins.programming.kicks-ass.net>
Date: Wed, 6 Apr 2016 09:50:00 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Zhao Lei <zhaolei@...fujitsu.com>
Cc: 'Ingo Molnar' <mingo@...nel.org>,
'Srikar Dronamraju' <srikar@...ux.vnet.ibm.com>,
tglx@...utronix.de, efault@....de, htejun@...il.com,
linux-kernel@...r.kernel.org, tj@...nel.org,
torvalds@...ux-foundation.org, yangds.fnst@...fujitsu.com,
hpa@...or.com
Subject: Re: [tip:sched/core] sched/cpuacct: Split usage accounting into
user_usage and sys_usage
On Wed, Apr 06, 2016 at 03:47:18PM +0800, Zhao Lei wrote:
> > If you change the above loop to something like:
> >
> > for (ca = task_ca(tsk); ca; ca = parent_ca(ca)) {
> > if (WARN_ON_ONCE(!ca->cpuusage))
> > continue;
> > this_cpu_ptr(ca->cpuusage)->usages[index] += cputime;
>
> Or s/ this_cpu_ptr/get_cpu_var to avoid preempt?
This is all called with rq->lock held, preemption is firmly disabled.
Powered by blists - more mailing lists