[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170504110155.2ed7b158@gandalf.local.home>
Date: Thu, 4 May 2017 11:01:55 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Clark Williams <williams@...hat.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
John Kacur <jkacur@...hat.com>, Scott Wood <swood@...hat.com>
Subject: Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt
balancing logic
On Thu, 4 May 2017 16:41:28 +0200
Peter Zijlstra <peterz@...radead.org> wrote:
> On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote:
> > + /* Keep the loop going if the IPI is currently active */
> > + atomic_inc_return(&rq->rd->rto_loop_next);
>
> What's the return for?
-ENOCONTEXT (too much cut from email)
/me goes and finds his email that he sent.
/* Keep the loop going if the IPI is currently active */
atomic_inc_return(&rq->rd->rto_loop_next);
/* Only one CPU can initiate a loop at a time */
if (!rto_start_trylock(&rq->rd->rto_loop_start))
return;
Ah, it's not needed. I think I had that to supply a full memory
barrier for a previous version, but now that rto_start_trylock() is:
static inline bool rto_start_trylock(atomic_t *v)
{
return !atomic_cmpxchg(v, 0, 1);
}
Which supplies its own memory barrier, it can now be a simple
atomic_inc().
Thanks, will update.
-- Steve
Powered by blists - more mailing lists