[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150123093341.GK2896@worktop.programming.kicks-ass.net>
Date: Fri, 23 Jan 2015 10:33:41 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Jason Low <jason.low2@...com>
Cc: Ingo Molnar <mingo@...nel.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Oleg Nesterov <oleg@...hat.com>,
Mike Galbraith <umgwanakikbuti@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Scott J Norton <scott.norton@...com>,
Chegu Vinod <chegu_vinod@...com>,
Aswin Chandramouleeswaran <aswin@...com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] sched, timer: Use atomics for thread_group_cputimer
stats
> + .running = ATOMIC_INIT(0), \
> + atomic_t running;
> + atomic_set(&sig->cputimer.running, 1);
> @@ -174,7 +174,7 @@ static inline bool cputimer_running(struct task_struct *tsk)
> + if (!atomic_read(&cputimer->running))
> + if (!atomic_read(&cputimer->running)) {
> + atomic_set(&cputimer->running, 1);
> + if (atomic_read(&tsk->signal->cputimer.running))
> + atomic_set(&cputimer->running, 0);
> + if (atomic_read(&sig->cputimer.running)) {
> + if (atomic_read(&tsk->signal->cputimer.running))
That doesn't really need an atomic_t.
--
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