From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Sebastian Andrzej Siewior <sebastian.siewior@linutronix.de>
Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>,
Dennis Dalessandro <dennis.dalessandro@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Clark Williams <williams@redhat.com>,
Dean Luick <dean.luick@intel.com>,
Doug Ledford <dledford@redhat.com>,
Jubin John <jubin.john@intel.com>,
Kaike Wan <kaike.wan@intel.com>,
Leon Romanovsky <leonro@mellanox.com>,
Peter Zijlstra <peterz@infradead.org>,
Sebastian Sanchez <sebastian.sanchez@intel.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-rt-users@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [RFC+PATCH] Infiniband hfi1 + PREEMPT_RT_FULL issues
Date: Mon, 25 Sep 2017 16:45:13 -0300 [thread overview]
Message-ID: <20170925194513.GA25735@kernel.org> (raw)
In-Reply-To: <20170925144949.GP29668@kernel.org>
Em Mon, Sep 25, 2017 at 11:49:49AM -0300, Arnaldo Carvalho de Melo escreveu:
> I'm trying to get an Infiniband test case working with the RT
> kernel, and ended over tripping over this case:
>
> In drivers/infiniband/hw/hfi1/pio.c sc_buffer_alloc() disables
> preemption that will be reenabled by either pio_copy() or
> seg_pio_copy_end().
>
> But before disabling preemption it grabs a spin lock that will
> be dropped after it disables preemption, which ends up triggering a
> warning in migrate_disable() later on.
>
> spin_lock_irqsave(&sc->alloc_lock)
> migrate_disable() ++p->migrate_disable -> 2
> preempt_disable()
> spin_unlock_irqrestore(&sc->alloc_lock)
> migrate_enable() in_atomic(), so just returns, migrate_disable stays at 2
> spin_lock_irqsave(some other lock) -> b00m
Sebastian, perhaps use local locks like you did for the random.c case?
I'll study to see if that is possible...
I mean this patch:
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/drivers/char/random.c?h=linux-4.11.y-rt&id=4bed11300e24d5178829758e535cc4996490b7c8
-------------
random: avoid preempt_disable()ed section
extract_crng() will use sleeping locks while in a preempt_disable()
section due to get_cpu_var().
Work around it with local_locks.
Cc: stable-rt@vger.kernel.org # where it applies to
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-------------
- Arnaldo
next prev parent reply other threads:[~2017-09-25 19:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 14:49 [RFC+PATCH] Infiniband hfi1 + PREEMPT_RT_FULL issues Arnaldo Carvalho de Melo
2017-09-25 19:45 ` Arnaldo Carvalho de Melo [this message]
[not found] ` <20170925144949.GP29668-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-09-25 20:15 ` Steven Rostedt
[not found] ` <20170925161528.52d34769-ZM9ACYiE99GSuEeoRQArULNAH6kLmebB@public.gmane.org>
2017-09-26 13:15 ` Arnaldo Carvalho de Melo
[not found] ` <20170926131529.GB25735-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-09-26 17:55 ` Marciniszyn, Mike
2017-09-26 18:28 ` Arnaldo Carvalho de Melo
2017-09-26 21:11 ` Steven Rostedt
2017-09-25 21:14 ` Julia Cartwright
2017-09-25 21:14 ` Julia Cartwright
2017-09-26 14:10 ` Marciniszyn, Mike
[not found] ` <32E1700B9017364D9B60AED9960492BC3441B3BD-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-09-26 14:56 ` Steven Rostedt
2017-09-26 21:00 ` Julia Cartwright
2017-10-06 9:23 ` Sebastian Andrzej Siewior
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=20170925194513.GA25735@kernel.org \
--to=acme@kernel.org \
--cc=dean.luick@intel.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=jubin.john@intel.com \
--cc=kaike.wan@intel.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.