0

I am trying to determine why thousands of context switches are happening to my isolated process as described here Why one non-voluntary context switch per second? so I am tracing the kernel with ftrace.

My Java thread is NOT doing any I/O or any blocking. It is on a busy spin incrementing a long variable, that's it.

Using the function tracer I see a bunch of this:

java-3372  [002] .N..  5366.541160: rcu_note_context_switch <-__schedule
java-3372  [002] d...  5366.541163: finish_task_switch <-__schedule
java-3372  [002] .N..  5366.553137: rcu_note_context_switch <-__schedule
java-3372  [002] d...  5366.553139: finish_task_switch <-__schedule
java-3372  [002] .N..  5366.565113: rcu_note_context_switch <-__schedule
java-3372  [002] d...  5366.565115: finish_task_switch <-__schedule

Does anyone know what rcu_note_context_switch means?

My kernel is 3.5.0-17-generic on Ubuntu.

I am also missing the tracer sched_switch so I used the function tracer. I did some research but I think I will have to recompile my kernel to get this sched_switch available to ftrace. Not sure what to do. Here is my ftrace available tracers. As you can see there is no sched_switch :\

# cat /sys/kernel/debug/tracing/available_tracers
blk function_graph mmiotrace wakeup_rt wakeup function nop
Community
  • 1
  • 1
JohnPristine
  • 3,485
  • 5
  • 30
  • 49

0 Answers0