From: Mathieu Desnoyers Date: Mon, 27 Aug 2012 13:57:09 +0000 (-0400) Subject: Document limitation of vppid and ppid context wrt eventual RCU instrumentation X-Git-Tag: v2.1.0-rc1~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1638c9b4fa42c188ffa962552146537f8fb3d26e;p=lttng-modules.git Document limitation of vppid and ppid context wrt eventual RCU instrumentation Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-context-ppid.c b/lttng-context-ppid.c index 05819048..58ff3fe7 100644 --- a/lttng-context-ppid.c +++ b/lttng-context-ppid.c @@ -46,6 +46,15 @@ void ppid_record(struct lttng_ctx_field *field, { pid_t ppid; + + /* + * TODO: when we eventually add RCU subsystem instrumentation, + * taking the rcu read lock here will trigger RCU tracing + * recursively. We should modify the kernel synchronization so + * it synchronizes both for RCU and RCU sched, and rely on + * rcu_read_lock_sched_notrace. + */ + rcu_read_lock(); ppid = task_tgid_nr(current->real_parent); rcu_read_unlock(); diff --git a/lttng-context-vppid.c b/lttng-context-vppid.c index 365d9739..06377a30 100644 --- a/lttng-context-vppid.c +++ b/lttng-context-vppid.c @@ -51,6 +51,15 @@ void vppid_record(struct lttng_ctx_field *field, * current nsproxy can be NULL when scheduled out of exit. pid_vnr uses * the current thread nsproxy to perform the lookup. */ + + /* + * TODO: when we eventually add RCU subsystem instrumentation, + * taking the rcu read lock here will trigger RCU tracing + * recursively. We should modify the kernel synchronization so + * it synchronizes both for RCU and RCU sched, and rely on + * rcu_read_lock_sched_notrace. + */ + rcu_read_lock(); parent = rcu_dereference(current->real_parent); if (!current->nsproxy)