mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Cartwright <julia@ni.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	<bigeasy@linutronix.de>, <linux-rt-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Clark Williams <williams@redhat.com>,
	Dean Luick <dean.luick@intel.com>,
	Dennis Dalessandro <dennis.dalessandro@intel.com>,
	Doug Ledford <dledford@redhat.com>,
	Kaike Wan <kaike.wan@intel.com>,
	Leon Romanovsky <leonro@mellanox.com>,
	<linux-rdma@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Sebastian Andrzej Siewior <sebastian.siewior@linutronix.de>,
	Sebastian Sanchez <sebastian.sanchez@intel.com>
Subject: Re: [PATCH 1/2] IB/hfi1: Use preempt_{dis,en}able_nort()
Date: Thu, 5 Oct 2017 11:05:35 -0500	[thread overview]
Message-ID: <20171005160535.GI647@jcartwri.amer.corp.natinst.com> (raw)
In-Reply-To: <20171005115539.7daafb66@gandalf.local.home>

On Thu, Oct 05, 2017 at 11:55:39AM -0400, Steven Rostedt wrote:
> On Thu, 5 Oct 2017 10:37:59 -0500
> Julia Cartwright <julia@ni.com> wrote:
> 
> > On Thu, Oct 05, 2017 at 05:27:30PM +0200, Thomas Gleixner wrote:
> > > On Thu, 5 Oct 2017, Julia Cartwright wrote:  
> > > > On Tue, Oct 03, 2017 at 12:49:19PM -0300, Arnaldo Carvalho de Melo wrote:  
> > > > > -	preempt_disable();
> > > > > +	preempt_disable_nort();
> > > > >  	this_cpu_inc(*sc->buffers_allocated);  
> > > > 
> > > > Have you tried this on RT w/ CONFIG_DEBUG_PREEMPT?  I believe that the
> > > > this_cpu_* operations perform a preemption check, which we'd trip.  
> > > 
> > > Good point. Changing this to migrate_disable() would do the trick.  
> > 
> > Wouldn't we still trip the preempt check even with migration disabled?
> > In another thread I asked the same question: should the preemption
> > checks here be converted to migration-checks in RT?
> 
> Is it a "preemption check"?

Sorry if I was unclear, more precisely: the this_cpu_* family of
accessors, w/ CONFIG_DEBUG_PREEMPT currently spits out a warning when
the caller is invoked in a context where preemption is enabled.

The check is shared w/ the smp_processor_id() check, as implemented in
lib/smp_processor_id.c.  It effectively boils down to a check of
preempt_count() and irqs_disabled().

> Getting a cpu # should only care about migration.

I think we're agreeing? :)

> This isn't the same as a rcu_sched check is it? That does care about
> preemption.

This is something totally different, I think.

   Julia

  reply	other threads:[~2017-10-05 16:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 15:49 [GIT PULL 0/2] infiniband hfi1 PREEMPT_RT_FULL changes Arnaldo Carvalho de Melo
2017-10-03 15:49 ` [PATCH 1/2] IB/hfi1: Use preempt_{dis,en}able_nort() Arnaldo Carvalho de Melo
2017-10-05 14:17   ` Julia Cartwright
2017-10-05 15:27     ` Thomas Gleixner
2017-10-05 15:37       ` Julia Cartwright
2017-10-05 15:55         ` Steven Rostedt
2017-10-05 16:05           ` Julia Cartwright [this message]
2017-10-05 16:16             ` Thomas Gleixner
2017-10-05 16:39               ` Julia Cartwright
2017-10-05 16:53     ` Arnaldo Carvalho de Melo
2017-10-05 18:29       ` Julia Cartwright
2017-10-05 18:53         ` Arnaldo Carvalho de Melo
2017-10-05 19:15           ` Steven Rostedt
2017-10-05 16:30   ` Sebastian Andrzej Siewior
2017-10-06  9:19     ` Sebastian Andrzej Siewior
2017-10-10 18:59   ` Dennis Dalessandro
2017-10-10 19:02     ` Arnaldo Carvalho de Melo
2017-10-11 11:03       ` Sebastian Andrzej Siewior
2017-10-11 13:43         ` Arnaldo Carvalho de Melo
2017-10-03 15:49 ` [PATCH 2/2] IB/hfi1: Handle packets in the theaded handler only Arnaldo Carvalho de Melo
2017-10-05 16:27   ` Sebastian Andrzej Siewior
2017-10-10 19:06   ` Dennis Dalessandro
2017-10-10 19:15     ` Arnaldo Carvalho de Melo
2017-10-11 10:44       ` Sebastian Andrzej Siewior
2017-10-11 13:42         ` Arnaldo Carvalho de Melo
2017-10-11 19:07         ` Arnaldo Carvalho de Melo
2017-10-11 19:14           ` Arnaldo Carvalho de Melo

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=20171005160535.GI647@jcartwri.amer.corp.natinst.com \
    --to=julia@ni.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=dean.luick@intel.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=kaike.wan@intel.com \
    --cc=leonro@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sebastian.sanchez@intel.com \
    --cc=sebastian.siewior@linutronix.de \
    --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

all inboxes | Powered by JetHome®