From: Clark Williams <williams@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: David Miller <davem@davemloft.net>,
Sebastian Sewior <bigeasy@linutronix.de>,
daniel@iogearbox.net, bpf@vger.kernel.org, ast@kernel.org,
kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH] BPF: Disable on PREEMPT_RT
Date: Fri, 18 Oct 2019 07:58:00 -0500 [thread overview]
Message-ID: <20191018075800.238f4f9c@tagon> (raw)
In-Reply-To: <alpine.DEB.2.21.1910181038130.1869@nanos.tec.linutronix.de>
On Fri, 18 Oct 2019 10:46:01 +0200 (CEST)
Thomas Gleixner <tglx@linutronix.de> wrote:
> > > #3) BPF uses the up_read_non_owner() hackery which was only invented to
> > > deal with already existing horrors and not meant to be proliferated.
> > >
> > > Yes, I know it's a existing facility ....
> >
> > I'm sure I'll regret asking this, but why is up_read_non_owner() a horror? I mean,
> > I get the fundamental wrongness of having someone that's not the owner of a semaphore
> > performing an 'up' on it, but is there an RT-specific reason that it's bad? Is it
> > totally a blocker for using BPF with RT or is it something we should fix over time?
>
> RT has strict locker == unlocker semantics simply because the owner
> (locker) is subject to priority inheritance and a non-owner unlock cannot
> undo PI on behalf of the locker sanely. Also exposing the locker to PI if
> the locker is not involved in unlocking is obviously a pointless exercise
> and potentially a source of unbound priority inversion.
Ok, I forgot about the PI consequences. Thanks teacher :)
>
> > I do think that we (RT) are going to have to co-exist with BPF, if only due to the
> > increased use of XDP. I also think that other sub-systems will start to
> > employ BPF for production purposes (as opposed to debug/analysis which is
> > how we generally look at tracing, packet sniffing, etc.). I think we *have* to
> > figure out how to co-exist.
>
> I'm not saying that RT does not want BPF, quite the contrary, but for the
> initial merge BPF is not a hard requirement, so disabling it was the
> straight forward path.
>
> I'm all ears to get pointers how to solve that right now.
>
Yeah, put it down to lack of sleep. After waking up and rereading, I first realized
that we're not immediately affected since RHEL8 doesn't use BPF. But we're going to
have to deal with it next year, since we'll be looking at a 5.6+ kernel which will
have PREEMPT_RT and the latest BPF bells and whistles. So might as well start the
conversations now.
Arnaldo and I have been having lots of conversations regarding BPF, so we'll extend
that and dig in on the preemption issue for now. We also need to understand the
memory allocation behavior so we can hopefully move it out of atomic regions. I'm not
sure how we should address the up_read_non_owner() issue at the moment.
Clark
--
The United States Coast Guard
Ruining Natural Selection since 1790
next prev parent reply other threads:[~2019-10-18 12:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 9:05 [PATCH] BPF: Disable on PREEMPT_RT Sebastian Andrzej Siewior
2019-10-17 14:53 ` Daniel Borkmann
2019-10-17 15:40 ` Sebastian Andrzej Siewior
2019-10-17 17:25 ` David Miller
2019-10-17 21:54 ` Thomas Gleixner
2019-10-17 22:13 ` David Miller
2019-10-17 23:50 ` Thomas Gleixner
2019-10-17 23:27 ` Alexei Starovoitov
2019-10-18 0:22 ` Thomas Gleixner
2019-10-18 5:52 ` Alexei Starovoitov
2019-10-18 11:28 ` Thomas Gleixner
2019-10-18 12:48 ` Sebastian Sewior
2019-10-18 23:05 ` Alexei Starovoitov
2019-10-20 9:06 ` Thomas Gleixner
2019-10-22 1:43 ` Alexei Starovoitov
2019-10-18 2:49 ` Clark Williams
2019-10-18 4:57 ` David Miller
2019-10-18 5:54 ` Alexei Starovoitov
2019-10-18 8:38 ` Thomas Gleixner
2019-10-18 12:49 ` Clark Williams
2019-10-18 8:46 ` Thomas Gleixner
2019-10-18 12:43 ` Sebastian Sewior
2019-10-18 12:58 ` Clark Williams [this message]
2019-10-17 22:11 ` Thomas Gleixner
2019-10-17 22:23 ` David Miller
2019-10-17 17:26 ` David Miller
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=20191018075800.238f4f9c@tagon \
--to=williams@redhat.com \
--cc=acme@redhat.com \
--cc=ast@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kafai@fb.com \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.com \
--cc=tglx@linutronix.de \
--cc=yhs@fb.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