All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Vaibhav Nagarnaik <vnagarnaik@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>, Michael Rubin <mrubin@google.com>,
	David Sharp <dhsharp@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] tracing: Don't call wakeup() when committing the event
Date: Tue, 3 May 2011 23:41:45 +0200	[thread overview]
Message-ID: <20110503214142.GC2678@nowhere> (raw)
In-Reply-To: <1304456616-30281-1-git-send-email-vnagarnaik@google.com>

On Tue, May 03, 2011 at 02:03:36PM -0700, Vaibhav Nagarnaik wrote:
> In using syscall tracing by concurrent processes, the wakeup() that is
> called in the event commit function causes contention on the spin lock
> of the waitqueue. I enabled sys_enter_getuid and sys_exit_getuid
> tracepoints, and by running getuid_microbench from autotest in parallel
> I found that the contention causes exponential latency increase in the
> tracing path.
> 
> The autotest binary getuid_microbench calls getuid() in a tight loop for
> the given number of iterations and measures the average time required to
> complete a single invocation of syscall.
> 
> The patch here points to the problem and provides a naive solution to
> start the discussion. It is not intended to be a definitive solution.

Right, so another solution could be to have per cpu waitqueues for
the per_cpu trace_pipe/trace_pipe_raw files, and one big for the main
trace_pipe file.

That involves two wake_up() calls but then it scales and you keep
the awakening.

  reply	other threads:[~2011-05-03 21:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 21:03 [RFC PATCH] tracing: Don't call wakeup() when committing the event Vaibhav Nagarnaik
2011-05-03 21:41 ` Frederic Weisbecker [this message]
2011-05-03 21:56   ` Vaibhav Nagarnaik
2011-05-03 22:09     ` Frederic Weisbecker
2011-05-03 22:47       ` Steven Rostedt
2011-05-03 23:08         ` Frederic Weisbecker
2011-05-03 23:27           ` Vaibhav Nagarnaik
2011-05-03 23:35             ` Frederic Weisbecker
2011-05-04  0:14               ` Vaibhav Nagarnaik
2011-05-03 23:36         ` Vaibhav Nagarnaik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110503214142.GC2678@nowhere \
    --to=fweisbec@gmail.com \
    --cc=dhsharp@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mrubin@google.com \
    --cc=rostedt@goodmis.org \
    --cc=vnagarnaik@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.