)]}'
{
  "commit": "e7e2ee89a9dbf48d70a922d5625cd7320a27cbff",
  "tree": "58a5d3387c7b0bf9a4f434867234c0771c22addb",
  "parents": [
    "b58f6b0dd3d677338b9065388cc2cc942b86338e"
  ],
  "author": {
    "name": "Vaibhav Nagarnaik",
    "email": "vnagarnaik@google.com",
    "time": "Tue May 10 13:27:21 2011 -0700"
  },
  "committer": {
    "name": "Steven Rostedt",
    "email": "rostedt@goodmis.org",
    "time": "Tue Jun 14 21:59:41 2011 -0400"
  },
  "message": "tracing: Schedule a delayed work to call wakeup()\n\nIn using syscall tracing by concurrent processes, the wakeup() that is\ncalled in the event commit function causes contention on the spin lock\nof the waitqueue. I enabled sys_enter_getuid and sys_exit_getuid\ntracepoints, and by running getuid_microbench from autotest in parallel\nI found that the contention causes exponential latency increase in the\ntracing path.\n\nThe autotest binary getuid_microbench calls getuid() in a tight loop for\nthe given number of iterations and measures the average time required to\ncomplete a single invocation of syscall.\n\nThe patch schedules a delayed work after 2 ms once an event commit calls\nto wake up the trace wait_queue. This removes the delay caused by\ncontention on spin lock in wakeup() and amortizes the wakeup() calls\nscheduled over the 2 ms period.\n\nIn the following example, the script enables the sys_enter_getuid and\nsys_exit_getuid tracepoints and runs the getuid_microbench in parallel\nwith the given number of processes. The output clearly shows the latency\nincrease caused by contentions.\n\n$ ~/getuid.sh 1\n1000000 calls in 0.720974253 s (720.974253 ns/call)\n\n$ ~/getuid.sh 2\n1000000 calls in 1.166457554 s (1166.457554 ns/call)\n1000000 calls in 1.168933765 s (1168.933765 ns/call)\n\n$ ~/getuid.sh 3\n1000000 calls in 1.783827516 s (1783.827516 ns/call)\n1000000 calls in 1.795553270 s (1795.553270 ns/call)\n1000000 calls in 1.796493376 s (1796.493376 ns/call)\n\n$ ~/getuid.sh 4\n1000000 calls in 4.483041796 s (4483.041796 ns/call)\n1000000 calls in 4.484165388 s (4484.165388 ns/call)\n1000000 calls in 4.484850762 s (4484.850762 ns/call)\n1000000 calls in 4.485643576 s (4485.643576 ns/call)\n\n$ ~/getuid.sh 5\n1000000 calls in 6.497521653 s (6497.521653 ns/call)\n1000000 calls in 6.502000236 s (6502.000236 ns/call)\n1000000 calls in 6.501709115 s (6501.709115 ns/call)\n1000000 calls in 6.502124100 s (6502.124100 ns/call)\n1000000 calls in 6.502936358 s (6502.936358 ns/call)\n\nAfter the patch, the latencies scale better.\n1000000 calls in 0.728720455 s (728.720455 ns/call)\n\n1000000 calls in 0.842782857 s (842.782857 ns/call)\n1000000 calls in 0.883803135 s (883.803135 ns/call)\n\n1000000 calls in 0.902077764 s (902.077764 ns/call)\n1000000 calls in 0.902838202 s (902.838202 ns/call)\n1000000 calls in 0.908896885 s (908.896885 ns/call)\n\n1000000 calls in 0.932523515 s (932.523515 ns/call)\n1000000 calls in 0.958009672 s (958.009672 ns/call)\n1000000 calls in 0.986188020 s (986.188020 ns/call)\n1000000 calls in 0.989771102 s (989.771102 ns/call)\n\n1000000 calls in 0.933518391 s (933.518391 ns/call)\n1000000 calls in 0.958897947 s (958.897947 ns/call)\n1000000 calls in 1.031038897 s (1031.038897 ns/call)\n1000000 calls in 1.089516025 s (1089.516025 ns/call)\n1000000 calls in 1.141998347 s (1141.998347 ns/call)\n\nSigned-off-by: Vaibhav Nagarnaik \u003cvnagarnaik@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Michael Rubin \u003cmrubin@google.com\u003e\nCc: David Sharp \u003cdhsharp@google.com\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nLink: http://lkml.kernel.org/r/1305059241-7629-1-git-send-email-vnagarnaik@google.com\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ee9c921d7f21e4d0578e35032607e9bc542e219f",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace.c",
      "new_id": "71777c8fe36b3691d3f074dba3da8a4e849cacb0",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace.c"
    }
  ]
}
