From: Arnaldo Carvalho de Melo <acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Julia Cartwright <julia-acOepvfBmUk@public.gmane.org>
Cc: bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
linux-rt-users-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Arnaldo Carvalho de Melo
<acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Clark Williams <williams-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Dean Luick <dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Dennis Dalessandro
<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Kaike Wan <kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Sebastian Andrzej Siewior
<sebastian.siewior-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Sebastian Sanchez
<sebastian.sanchez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Subject: Re: [PATCH 1/2] IB/hfi1: Use preempt_{dis,en}able_nort()
Date: Thu, 5 Oct 2017 13:53:05 -0300 [thread overview]
Message-ID: <20171005165305.GN25388@kernel.org> (raw)
In-Reply-To: <20171005141744.GC21185-ew3lsbMjNqt5wtABiV/Xjqyly8cj88Ttqxv4g6HH51o@public.gmane.org>
Em Thu, Oct 05, 2017 at 09:17:44AM -0500, Julia Cartwright escreveu:
> On Tue, Oct 03, 2017 at 12:49:19PM -0300, Arnaldo Carvalho de Melo wrote:
> > +++ b/drivers/infiniband/hw/hfi1/pio.c
> > @@ -1421,7 +1421,7 @@ struct pio_buf *sc_buffer_alloc(struct send_context *sc, u32 dw_len,
> > /* there is enough room */
> > - preempt_disable();
> > + preempt_disable_nort();
> > this_cpu_inc(*sc->buffers_allocated);
> Have you tried this on RT w/ CONFIG_DEBUG_PREEMPT?
No
> I believe that the this_cpu_* operations perform a preemption check, which we'd trip.
Humm, looking at include/linux/percpu-defs.h on v4.11.12-rt14 I see
(trimmed to what we're discussing here):
#ifdef CONFIG_DEBUG_PREEMPT
extern void __this_cpu_preempt_check(const char *op);
#else
static inline void __this_cpu_preempt_check(const char *op) { }
#endif
#define __this_cpu_add(pcp, val) \
({ \
__this_cpu_preempt_check("add"); \
raw_cpu_add(pcp, val); \
})
#define __this_cpu_inc(pcp) __this_cpu_add(pcp, 1)
/*
* Operations with implied preemption/interrupt protection. These
* operations can be used without worrying about preemption or interrupt.
*/
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
#define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
> You may also have to change these to the non-preempt checked variants.
So __this_cpu_inc() checks preemption but this_cpu_inc() doesn't and
thus we're ok here? Or am I getting lost in this maze of defines? :-)
- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-10-05 16:53 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
[not found] ` <20171005141744.GC21185-ew3lsbMjNqt5wtABiV/Xjqyly8cj88Ttqxv4g6HH51o@public.gmane.org>
2017-10-05 15:27 ` Thomas Gleixner
2017-10-05 15:37 ` Julia Cartwright
[not found] ` <20171005153759.GG647-ew3lsbMjNqt5wtABiV/Xjqyly8cj88Ttqxv4g6HH51o@public.gmane.org>
2017-10-05 15:55 ` Steven Rostedt
2017-10-05 16:05 ` Julia Cartwright
2017-10-05 16:16 ` Thomas Gleixner
2017-10-05 16:39 ` Julia Cartwright
2017-10-05 16:53 ` Arnaldo Carvalho de Melo [this message]
2017-10-05 18:29 ` Julia Cartwright
[not found] ` <20171005182900.GK647-ew3lsbMjNqt5wtABiV/Xjqyly8cj88Ttqxv4g6HH51o@public.gmane.org>
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
[not found] ` <20171003154920.31566-2-acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-10 18:59 ` Dennis Dalessandro
[not found] ` <1d06a3da-426f-c887-1da7-64b760c53425-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-10 19:02 ` Arnaldo Carvalho de Melo
[not found] ` <20171010190218.GN28623-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
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
[not found] ` <20171011104456.mlewocqc6ghi3fev-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
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=20171005165305.GN25388@kernel.org \
--to=acme-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=dean.luick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=julia-acOepvfBmUk@public.gmane.org \
--cc=kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rt-users-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
--cc=sebastian.sanchez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=sebastian.siewior-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=williams-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
/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).