All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: peterz@infradead.org, jamie.iles@oracle.com, penberg@kernel.org,
	acme@ghostprotocols.net, paulus@samba.org,
	linux-kernel@vger.kernel.org, namhyung@kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [liblockdep] Re: [PATCH v2 01/11] liblockdep: remove the need for liblockdep_init
Date: Wed, 20 Feb 2013 16:46:27 +0100	[thread overview]
Message-ID: <20130220154627.GB13388@gmail.com> (raw)
In-Reply-To: <5124E628.3020008@oracle.com>


* Sasha Levin <sasha.levin@oracle.com> wrote:

> On 02/19/2013 02:58 AM, Ingo Molnar wrote:
> > 
> > * Sasha Levin <sasha.levin@oracle.com> wrote:
> > 
> >> Use a constructor in the library instead of making the user manually
> >> call liblockdep_init().
> >>
> >> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> >> ---
> >>  tools/lib/lockdep/common.c                    | 2 +-
> >>  tools/lib/lockdep/include/liblockdep/common.h | 1 -
> >>  tools/lib/lockdep/tests/AA.c                  | 1 -
> >>  tools/lib/lockdep/tests/ABBA.c                | 1 -
> >>  tools/lib/lockdep/tests/ABBCCA.c              | 1 -
> >>  tools/lib/lockdep/tests/ABBCCDDA.c            | 1 -
> >>  tools/lib/lockdep/tests/ABCABC.c              | 1 -
> >>  tools/lib/lockdep/tests/ABCDBCDA.c            | 1 -
> >>  tools/lib/lockdep/tests/ABCDBDDA.c            | 1 -
> >>  tools/lib/lockdep/tests/WW.c                  | 1 -
> >>  tools/lib/lockdep/tests/unlock_balance.c      | 1 -
> >>  tools/lib/lockdep/uinclude/linux/lockdep.h    | 1 -
> >>  12 files changed, 1 insertion(+), 12 deletions(-)
> > 
> > Note that due to the heavy objections in the kvmtool thread 
> > I have removed the tools/lib/lockdep library and tooling 
> > commits from the locking tree - to be able to merge the 
> > other locking commits upstream.
> 
> Understood.
> 
> > I'm pretty sad about this outcome as your code really 
> > brought new development life into lockdep - if you still 
> > want to pursue this approach then you might want to try it 
> > via the tools/kvm tree, or via a separate project.
> 
> I'm most likely to just fold it into a standalone project 
> since I'm not quite certain the purpose of tools/ at this 
> point.

You could also tempt Linus with a standalone pull request - 
altough at this point I'm not sure he'd take it.

Sharing the source code between user-space and kernel space 
makes quite a bit of sense, and copying files, while it works, 
just encourages needless forking. The impact of your changes on 
kernel/lockdep.c was minimal:

 47dd80e801c3 lockdep: Be nice about building from userspace
  kernel/lockdep.c | 4 ++++
  1 file changed, 4 insertions(+)

So I don't see any substantial 'drag' or downside on the kernel 
lockdep subsystem - and I see a lot of upsides from exposing 
user-space to the lockdep code.

Have you tried to check the locking of something more complex, 
such as Firefox? (assuming it uses pthread mutexes and rwlocks - 
I'm not sure about that.)

Thanks,

	Ingo

  reply	other threads:[~2013-02-20 15:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-10  0:39 [PATCH v2 01/11] liblockdep: remove the need for liblockdep_init Sasha Levin
2013-02-10  0:39 ` [PATCH v2 02/11] liblockdep: remove the need for liblockdep_set_thread Sasha Levin
2013-02-11 12:22   ` [tip:core/locking] liblockdep: Remove the need for liblockdep_set_thread() tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 03/11] perf: stop using liblockdep_init and liblockdep_set_thread Sasha Levin
2013-02-11 12:23   ` [tip:core/locking] perf: Stop using liblockdep_init() and liblockdep_set_thread() tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 04/11] liblockdep: fix AA test Sasha Levin
2013-02-11 12:24   ` [tip:core/locking] liblockdep: Fix the AA locking test tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 05/11] liblockdep: correct the ABCDBCDA test Sasha Levin
2013-02-11 12:25   ` [tip:core/locking] liblockdep: Correct " tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 06/11] liblockdep: rbtree support Sasha Levin
2013-02-11 12:27   ` [tip:core/locking] liblockdep: Add " tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 07/11] liblockdep: prevent multiple declarations of CALLER_ADDR0 Sasha Levin
2013-02-11 12:28   ` [tip:core/locking] liblockdep: Prevent " tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 08/11] liblockdep: keep headers declarations even if lib is disabled Sasha Levin
2013-02-11 12:30   ` [tip:core/locking] liblockdep: Keep header declarations even if the library " tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 09/11] liblockdep: support using LD_PRELOAD Sasha Levin
2013-02-11 12:31   ` [tip:core/locking] liblockdep: Support " tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 10/11] liblockdep: add tests for the LD_PRELOAD feature Sasha Levin
2013-02-11 12:32   ` [tip:core/locking] liblockdep: Add " tip-bot for Sasha Levin
2013-02-10  0:39 ` [PATCH v2 11/11] liblockdep: preload helper Sasha Levin
2013-02-11 12:33   ` [tip:core/locking] liblockdep: Add the 'lockdep' user-space utility tip-bot for Sasha Levin
2013-02-11 12:21 ` [tip:core/locking] liblockdep: Remove the need for liblockdep_init() tip-bot for Sasha Levin
2013-02-19  7:58 ` [liblockdep] Re: [PATCH v2 01/11] liblockdep: remove the need for liblockdep_init Ingo Molnar
2013-02-20 15:05   ` Sasha Levin
2013-02-20 15:46     ` Ingo Molnar [this message]
2013-02-20 16:12       ` Sasha Levin

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=20130220154627.GB13388@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@ghostprotocols.net \
    --cc=akpm@linux-foundation.org \
    --cc=jamie.iles@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=penberg@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sasha.levin@oracle.com \
    --cc=torvalds@linux-foundation.org \
    /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.