public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sripathi Kodi <sripathik@in.ibm.com>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] Inline double_unlock_balance()
Date: Thu, 6 Nov 2008 08:32:14 +0100	[thread overview]
Message-ID: <20081106073214.GA8459@elte.hu> (raw)
In-Reply-To: <1225893576.7803.3021.camel@twins>


* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> On Wed, 2008-11-05 at 18:57 +0530, Sripathi Kodi wrote:
> > Hi,
> > 
> > We have a test case which measures the variation in the amount of time 
> > needed to perform a fixed amount of work on the preempt_rt kernel. We 
> > started seeing deterioration in it's performance recently. The test 
> > should never take more than 10 microseconds, but we started 5-10% 
> > failure rate. Using elimination method, we traced the problem to commit 
> > 1b12bbc747560ea68bcc132c3d05699e52271da0 (lockdep: re-annotate 
> > scheduler runqueues). When LOCKDEP is disabled, this patch only adds an 
> > additional function call to double_unlock_balance(). Hence I inlined 
> > double_unlock_balance() and the problem went away. Here is a patch to 
> > make this change.
> > 
> > Thanks,
> > Sripathi.
> > 
> > lockdep: Inline double_unlock_balance()
> > 
> > Additional function call for double_unlock_balance() causes latency 
> > problems for some test cases on the preempt_rt kernel.
> > 
> > Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
> 
> Acked-by; Peter Zijlstra <a.p.zijlstra@chello.nl>

hm, i'm not sure why it makes such a difference. Possibly cache 
alignment or code generation details pushing the critical path just 
beyond the L1 cache limit and causing thrashing?

Anyway, i've applied it to tip/sched/rt, as we generally want to 
inline such short locking ops.

	Ingo

  reply	other threads:[~2008-11-06  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05 13:27 [PATCH] Inline double_unlock_balance() Sripathi Kodi
2008-11-05 13:59 ` Peter Zijlstra
2008-11-06  7:32   ` Ingo Molnar [this message]
2008-11-06  7:53     ` Peter Zijlstra
2008-11-06 17:30 ` Dhaval Giani

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=20081106073214.GA8459@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sripathik@in.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox