ipipe: Disable rcuidle trace path when running over the head domain
PATCH 1/1 ipipe: Disable rcuidle trace path when running over the head domain
From: Jan Kiszka <[email protected]>
We do not need the special handling of __DO_TRACE(..., rcuidle=1) when running over the head domain. In fact, we cannot use it because it switches to srcu which is incompatible with that context. It's safe to switch to normal RCU because no head domain caller of a trace_*_rcuidle tracepoints should do this from rcu-problematic paths, specifically idle.
Ported from the dovetail queue.
---
Philippe, does this description make sense?
Norbert, please test.
include/linux/tracepoint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/tracepoint.h +2 -1
@@ -21,6 +21,7 @@#include <linux/cpumask.h> #include <linux/rcupdate.h> #include <linux/tracepoint-defs.h> +#include <linux/ipipe.h> struct module ;struct tracepoint ;
@@ -212,7 +213,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) __DO_TRACE(&__tracepoint_##name, \ TP_PROTO(data_proto), \ TP_ARGS(data_args), \ - TP_CONDITION(cond), 1); \ + TP_CONDITION(cond), ipipe_root_p); \ }#else #define __DECLARE_TRACE_RCU (name, proto, args, cond, data_proto, data_args)
Signature · 1 line
2.16.4
Hello Jan,
yes this fixes the issue for me, what's the downside of not using *_rcuidle, is that a performance optimization?
Norbert Lange
Quoted 55 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Montag, 17. Februar 2020 19:06
To: Philippe Gerum <[email protected]>; Xenomai <[email protected]>
Cc: Lange Norbert <[email protected]>
Subject: [PATCH ipipe-noarch] ipipe: Disable rcuidle trace path when running over the head domainNON-ANDRITZ SOURCE: BE CAUTIOUS WITH CONTENT, LINKS OR ATTACHMENTS.
From: Jan Kiszka <[email protected]>
We do not need the special handling of
__DO_TRACE(..., rcuidle=1)when running over the head domain. In fact, we cannot use it because it switches to srcu which is incompatible with that context. It's safe to switch to normal RCU because no head domain caller of a trace_*_rcuidle tracepoints should do this from rcu-problematic paths, specifically idle.Ported from the dovetail queue.
Signed-off-by Jan Kiszka <[email protected]>---
Philippe, does this description make sense?
Norbert, please test.
include/linux/tracepoint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/linux/tracepoint.h +2
-1@@ -21,6 +21,7 @@#include <linux/cpumask.h> #include <linux/rcupdate.h> #include <linux/tracepoint-defs.h> +#include <linux/ipipe.h> struct module ;struct tracepoint ;@@ -212,7 +213,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) __DO_TRACE(&__tracepoint_##name, \ TP_PROTO(data_proto), \ TP_ARGS(data_args), \ - TP_CONDITION(cond), 1); \ + TP_CONDITION(cond), ipipe_root_p); \ }#else
Quoted 4 lines
#define __DECLARE_TRACE_RCU(name, proto, args, cond,
data_proto,data_args)
--
2.16.4
________________________________
This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.
ANDRITZ HYDRO GmbH
Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation
Firmensitz/ Registered seat: Wien
Firmenbuchgericht/ Court of registry: Handelsgericht Wien
Firmenbuchnummer/ Company registration: FN 61833 g
DVR: 0605077
UID-Nr.: ATU14756806
Thank You
________________________________
Quoted 5 lines · Lange Norbert
Hello Jan,
yes this fixes the issue for me, what's the downside of not using
*_rcuidle, is that a performance optimization?
No, it's a correctness thing for Linux when you call a tracepoint from idle paths, see commit log. When in head domain, we do not stress that paths. That is at least my current understanding of the situation.
Jan
Quoted 84 lines
Norbert Lange
Quoted 55 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Montag, 17. Februar 2020 19:06
To: Philippe Gerum <[email protected]>; Xenomai <[email protected]>
Cc: Lange Norbert <[email protected]>
Subject: [PATCH ipipe-noarch] ipipe: Disable rcuidle trace path when running over the head domainNON-ANDRITZ SOURCE: BE CAUTIOUS WITH CONTENT, LINKS OR ATTACHMENTS.
From: Jan Kiszka <[email protected]>
We do not need the special handling of
__DO_TRACE(..., rcuidle=1)when running over the head domain. In fact, we cannot use it because it switches to srcu which is incompatible with that context. It's safe to switch to normal RCU because no head domain caller of a trace_*_rcuidle tracepoints should do this from rcu-problematic paths, specifically idle.Ported from the dovetail queue.
Signed-off-by Jan Kiszka <[email protected]>---
Philippe, does this description make sense?
Norbert, please test.
include/linux/tracepoint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/linux/tracepoint.h +2
-1@@ -21,6 +21,7 @@#include <linux/cpumask.h> #include <linux/rcupdate.h> #include <linux/tracepoint-defs.h> +#include <linux/ipipe.h> struct module ;struct tracepoint ;@@ -212,7 +213,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) __DO_TRACE(&__tracepoint_##name, \ TP_PROTO(data_proto), \ TP_ARGS(data_args), \ - TP_CONDITION(cond), 1); \ + TP_CONDITION(cond), ipipe_root_p); \ }#else Quoted 4 lines
#define __DECLARE_TRACE_RCU(name, proto, args, cond,
data_proto,data_args)
--
2.16.4________________________________
This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.
ANDRITZ HYDRO GmbH
Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation
Firmensitz/ Registered seat: Wien
Firmenbuchgericht/ Court of registry: Handelsgericht Wien
Firmenbuchnummer/ Company registration: FN 61833 g
DVR: 0605077
UID-Nr.: ATU14756806
Thank You
________________________________
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux