xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: tracing: irq_pipeline: skip RCU check if oob
@ 2023-04-14 11:37 Jan Kiszka
  2023-04-16  8:59 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2023-04-14 11:37 UTC (permalink / raw)
  To: Philippe Gerum, Xenomai

Hi Philippe,

I just found changes like [1] in dovetail, something I did for I-pipe as
well [2]. But, as I wrote in the I-pipe commit, there it was laziness
combined with carefulness. I don't think we need that laziness at least
in dovetail and fix that issue properly (rcu_nmi_enter/exit on oob
entry/exit?). Or what were your thoughts?

Jan

[1]
https://source.denx.de/Xenomai/linux-dovetail/-/commit/3656186a1d544274bd9a468902d2010b8b67f86c
[2]
https://source.denx.de/Xenomai/ipipe-x86/-/commit/005d9b97b2144b32e92063f40a8d65fe03f6b6eb

-- 
Siemens AG, Technology
Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: tracing: irq_pipeline: skip RCU check if oob
  2023-04-14 11:37 tracing: irq_pipeline: skip RCU check if oob Jan Kiszka
@ 2023-04-16  8:59 ` Philippe Gerum
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2023-04-16  8:59 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Xenomai


Jan Kiszka <jan.kiszka@siemens.com> writes:

> Hi Philippe,
>
> I just found changes like [1] in dovetail, something I did for I-pipe as
> well [2]. But, as I wrote in the I-pipe commit, there it was laziness
> combined with carefulness. I don't think we need that laziness at least
> in dovetail and fix that issue properly (rcu_nmi_enter/exit on oob
> entry/exit?). Or what were your thoughts?

Currently, when running oob, RCU is forced to watch by rcu_read_lock()
which calls ct_nmi_enter() as its prologue, hence the laziness in the
tracepoint.

But, this somewhat defeats the "lightest-weight conceivable read-side
primitives" mantra of RCU, this looks more of a workaround than a fix,
so I'm not happy with that stuff.  We should rather make the inband
kernel consider the oob context on a CPU as an ongoing read-side
critical section RCU-wise, just like common preemption-disabled sections
are these days. This would have two upsides:

- making all these oob-specific exceptions to checking that RCU is
  watching plain useless, by telling RCU to _always_ watch an oob
  context as an ongoing NMI, not solely while running a pipeline entry
  like today.

- generally enabling the read-side protection for the oob context, while
  leaving the QSBR work to the in-band context.

However, we must be sure not to leak oob read-side sections into the
inband context, i.e. being cautious about oob -> inband transitions, and
perhaps more tricky issues.

-- 
Philippe.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-16  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-14 11:37 tracing: irq_pipeline: skip RCU check if oob Jan Kiszka
2023-04-16  8:59 ` Philippe Gerum

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).