linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	Clark Williams <williams@redhat.com>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	John Kacur <jkacur@redhat.com>, Scott Wood <swood@redhat.com>
Subject: Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic
Date: Thu, 4 May 2017 11:01:55 -0400	[thread overview]
Message-ID: <20170504110155.2ed7b158@gandalf.local.home> (raw)
In-Reply-To: <20170504144128.k2a5vxebtyly7qlv@hirez.programming.kicks-ass.net>

On Thu, 4 May 2017 16:41:28 +0200
Peter Zijlstra <peterz@infradead.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

  reply	other threads:[~2017-05-04 15:03 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 15:47 [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic Steven Rostedt
2017-05-04 14:41 ` Peter Zijlstra
2017-05-04 15:01   ` Steven Rostedt [this message]
2017-05-04 15:32 ` Peter Zijlstra
2017-05-04 17:25   ` Steven Rostedt
2017-05-04 18:42     ` Peter Zijlstra
2017-05-04 19:03       ` Steven Rostedt
2017-05-05  4:26         ` Mike Galbraith
2017-05-05  5:16           ` Mike Galbraith
2017-05-05 11:05         ` Peter Zijlstra
2017-05-05 12:02           ` Steven Rostedt
2017-05-05 17:39             ` Peter Zijlstra
2017-05-05 18:59               ` Steven Rostedt
2017-05-06  7:52                 ` Peter Zijlstra
2017-10-10 11:02 ` [tip:sched/core] sched/rt: Simplify the IPI based RT " tip-bot for Steven Rostedt (Red Hat)
2018-01-19  9:23   ` Pavan Kondeti
2018-01-19 15:03     ` Steven Rostedt
2018-01-19 15:44       ` Pavan Kondeti
2018-01-19 15:53         ` Steven Rostedt
2018-01-19 17:46       ` Pavan Kondeti
2018-01-19 18:11         ` Steven Rostedt
2018-01-19 18:12           ` Steven Rostedt
2018-01-19 18:57             ` Pavan Kondeti
2018-01-19 19:51               ` Steven Rostedt
2018-01-20  4:56                 ` Pavan Kondeti
2018-01-19 18:54           ` Pavan Kondeti
2018-02-06 11:54     ` [tip:sched/urgent] sched/rt: Use container_of() to get root domain in rto_push_irq_work_func() tip-bot for Steven Rostedt (VMware)
2018-02-07  4:14       ` Steven Rostedt
2018-02-06 11:54     ` [tip:sched/urgent] sched/rt: Up the root domain ref count when passing it around via IPIs tip-bot for Steven Rostedt (VMware)
2018-02-07  4:15       ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170504110155.2ed7b158@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bristot@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=swood@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).