From: Peter Zijlstra <peterz@infradead.org>
To: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, h.mitake@gmail.com,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [RFC PATCH 2/2] lockdep: caching subclasses
Date: Tue, 12 Oct 2010 12:36:12 +0200 [thread overview]
Message-ID: <1286879772.29097.40.camel@twins> (raw)
In-Reply-To: <1286269311-28336-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
On Tue, 2010-10-05 at 18:01 +0900, Hitoshi Mitake wrote:
> Current lockdep_map only caches one class with subclass == 0,
> and looks up hash table of classes when subclass != 0.
>
> It seems that this has no problem because the case of
> subclass != 0 is rare. But locks of struct rq are
> acquired with subclass == 1 when task migration is executed.
> Task migration is high frequent event, so I modified lockdep
> to cache subclasses.
>
> I measured the score of perf bench sched messaging.
> This patch has slightly but certain (order of milli seconds
> or 10 milli seconds) effect when lots of tasks are running.
> I'll show the result in the tail of this description.
>
> NR_LOCKDEP_CACHING_CLASSES specifies how many classes can be
> cached in the instances of lockdep_map.
> I discussed with Peter Zijlstra in LinuxCon Japan about
> this approach and he taught me that caching every subclasses(8)
> is cleary waste of memory. So number of cached classes
> should be configurable.
>
> I think that this patch has a little effect for making lockdep
> as a production feature, I'd like to hear your comments.
>
> Thanks,
>
> === Score comparison of benchmarks ===
> # "min" means best score, and "max" means worst score
>
> for i in `seq 1 10`; do ./perf bench -f simple sched messaging; done
>
> before: min: 0.565000, max: 0.583000, avg: 0.572500
> after: min: 0.559000, max: 0.568000, avg: 0.563300
>
> # with more processes
> for i in `seq 1 10`; do ./perf bench -f simple sched messaging -g 40; done
>
> before: min: 2.274000, max: 2.298000, avg: 2.286300
> after: min: 2.242000, max: 2.270000, avg: 2.259700
Very nice numbers, I'll queue this patch.
Thanks!
next prev parent reply other threads:[~2010-10-12 10:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 9:01 [PATCH 1/2] lockdep: check the depth of subclass Hitoshi Mitake
2010-10-05 9:01 ` [RFC PATCH 2/2] lockdep: caching subclasses Hitoshi Mitake
2010-10-12 10:36 ` Peter Zijlstra [this message]
2010-10-18 19:17 ` [tip:core/locking] lockdep: Add improved subclass caching tip-bot for Hitoshi Mitake
2010-10-12 10:27 ` [PATCH 1/2] lockdep: check the depth of subclass Peter Zijlstra
2010-10-12 16:03 ` Dmitry Torokhov
2010-10-13 2:27 ` Hitoshi Mitake
2010-10-13 18:18 ` Dmitry Torokhov
2010-10-13 2:26 ` Hitoshi Mitake
2010-10-13 7:33 ` Peter Zijlstra
2010-10-13 8:13 ` Hitoshi Mitake
2010-10-13 8:30 ` [PATCH v2] " Hitoshi Mitake
2010-10-13 8:48 ` Peter Zijlstra
2010-10-18 19:17 ` [tip:core/locking] lockdep: Check " tip-bot for Hitoshi Mitake
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=1286879772.29097.40.camel@twins \
--to=peterz@infradead.org \
--cc=fweisbec@gmail.com \
--cc=h.mitake@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mitake@dcl.info.waseda.ac.jp \
/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