public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 00/11] lock monitor: Separate features related to lock
@ 2010-03-14 10:38 Hitoshi Mitake
  2010-03-14 10:38 ` [PATCH RFC 01/11] lock monitor: New subsystem for lock event hooking Hitoshi Mitake
                   ` (12 more replies)
  0 siblings, 13 replies; 42+ messages in thread
From: Hitoshi Mitake @ 2010-03-14 10:38 UTC (permalink / raw)
  To: fweisbec
  Cc: linux-kernel, mitake, h.mitake, Ingo Molnar, Peter Zijlstra,
	Paul Mackerras, Arnaldo Carvalho de Melo, Jens Axboe, Jason Baron

Current lockdep is too complicated because,
 * dependency validation
 * statistics
 * event tracing
are all implemented by it.
This cause problem of overhead.
If user enables one of them, overhead of rests part is not avoidable.
(tracing is exception. If user enables validation or stat,
overhead of tracing doesn't occur.)

So I suggest new subsystem "lock monitor".
This is a general purpose lock event hooking mechanism.

lock monitor will be enable easy implementing and running
these features related to lock.

And I'm hoping that lock monitor will reduce overhead of perf lock.
Because lock monitor separates dependency validation and event tracing clearly,
so calling of functions of lockdep (e.g. lock_acquire()) only for validation
will not occur lock events.

I implemented it on the branch perf/inject of Frederic's random-tracing tree.
Because the branch is hottest place of lock and tracing :)

CAUTION!
This patch is very very beta, if you test it, please be careful!

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Jason Baron <jbaron@redhat.com>

Hitoshi Mitake (11):
  lock monitor: New subsystem for lock event hooking
  Adopt lockdep to lock monitor
  Adopt spinlock to lock monitor
  Adopt rwlock to lock monitor
  Adopt arch dependent rwsem to lock monitor
  Adopt rwsem of x86 to lock monitor
  Adopt the way of initializing semaphore to lock monitor
  Adopt mutex to lock monitor
  Adopt rcu_read_lock() to lock monitor
  Adopt kernel/sched.c to lock monitor
  Very dirty temporal solution for testing lock monitor

 arch/x86/include/asm/rwsem.h     |   12 ++--
 fs/inode.c                       |    1 -
 fs/sysfs/dir.c                   |   24 +++++-
 include/linux/lock_monitor.h     |  171 ++++++++++++++++++++++++++++++++++++++
 include/linux/lockdep.h          |  138 ++++++-------------------------
 include/linux/mutex.h            |   14 ++--
 include/linux/rcupdate.h         |    4 +-
 include/linux/rwlock_api_smp.h   |   36 ++++----
 include/linux/rwlock_types.h     |   12 ++--
 include/linux/rwsem-spinlock.h   |   12 ++--
 include/linux/rwsem.h            |    2 +
 include/linux/semaphore.h        |    2 +-
 include/linux/spinlock.h         |    4 +-
 include/linux/spinlock_api_smp.h |   22 +++---
 include/linux/spinlock_types.h   |   16 ++--
 kernel/Makefile                  |    1 +
 kernel/lock_monitor.c            |  132 +++++++++++++++++++++++++++++
 kernel/lockdep.c                 |   51 ++++++++++--
 kernel/mutex-debug.c             |    2 +-
 kernel/mutex.c                   |   14 ++--
 kernel/rwsem.c                   |   16 ++--
 kernel/sched.c                   |    8 +-
 kernel/spinlock.c                |    8 +-
 lib/Kconfig.debug                |   16 +++-
 lib/rwsem-spinlock.c             |    2 +-
 lib/rwsem.c                      |    2 +-
 lib/spinlock_debug.c             |    4 +-
 net/core/sock.c                  |   15 ++++
 28 files changed, 515 insertions(+), 226 deletions(-)
 create mode 100644 include/linux/lock_monitor.h
 create mode 100644 kernel/lock_monitor.c


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2010-04-04  7:56 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-14 10:38 [PATCH RFC 00/11] lock monitor: Separate features related to lock Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 01/11] lock monitor: New subsystem for lock event hooking Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 02/11] Adopt lockdep to lock monitor Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 03/11] Adopt spinlock " Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 04/11] Adopt rwlock " Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 05/11] Adopt arch dependent rwsem " Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 06/11] Adopt rwsem of x86 " Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 07/11] Adopt the way of initializing semaphore " Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 08/11] Adopt mutex " Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 09/11] Adopt rcu_read_lock() " Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 10/11] Adopt kernel/sched.c " Hitoshi Mitake
2010-03-14 10:38 ` [PATCH RFC 11/11] Very dirty temporal solution for testing " Hitoshi Mitake
2010-03-14 18:13 ` [PATCH RFC 00/11] lock monitor: Separate features related to lock Peter Zijlstra
2010-03-17  1:32   ` Frederic Weisbecker
2010-03-17  7:30     ` Hitoshi Mitake
2010-03-17 15:39       ` Frederic Weisbecker
2010-03-18  5:49         ` Hitoshi Mitake
2010-03-18 20:30           ` Frederic Weisbecker
2010-03-20  5:51             ` Hitoshi Mitake
2010-03-23 15:45         ` Peter Zijlstra
2010-03-17  9:52     ` Ingo Molnar
2010-03-17 13:59       ` Jason Baron
2010-03-18  5:59       ` Hitoshi Mitake
2010-03-18 21:16         ` Frederic Weisbecker
2010-03-19  1:08           ` Mathieu Desnoyers
2010-03-19  1:23             ` Frederic Weisbecker
2010-03-19  1:36               ` Mathieu Desnoyers
2010-03-19  2:27                 ` Frederic Weisbecker
2010-03-19  2:40                   ` Mathieu Desnoyers
2010-03-19  3:06                     ` Frederic Weisbecker
2010-03-19 12:56                       ` Mathieu Desnoyers
2010-03-19 16:00                         ` Jason Baron
2010-03-20  4:51                           ` Frederic Weisbecker
2010-03-20  4:46                         ` Frederic Weisbecker
2010-03-20  5:56           ` Hitoshi Mitake
2010-03-20  8:23             ` Hitoshi Mitake
2010-03-21  9:49               ` Hitoshi Mitake
2010-03-23 15:32               ` Peter Zijlstra
2010-04-04  7:56                 ` Hitoshi Mitake
2010-03-17  1:47 ` Frederic Weisbecker
2010-03-17  7:33   ` Hitoshi Mitake
2010-03-17  9:50     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox