mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Dima Zavin <dima@android.com>,
	linux-kernel@vger.kernel.org,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] plist: add mutex to the blessed lock type for plists
Date: Wed, 29 Jun 2011 16:36:06 -0400	[thread overview]
Message-ID: <1309379766.26417.46.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <m2tyb81jml.fsf@firstfloor.org>

On Wed, 2011-06-29 at 13:13 -0700, Andi Kleen wrote:
> Dima Zavin <dima@android.com> writes:
> 
> > Currently, plist debugging "enforces" that the plist is locked
> > with either a raw_spinlock or a spinlock. The plist data structure
> > is useful in other places, where spinlocks are unnecessary.
> >
> > Extend the plist initializers and debug checks to allow the plist
> > to be protected by a mutex
> 
> Seems really ugly and clearly not a godo path. 
> 
> It's a bit like adding a 11th argument to a function which already has 
> 10.
> 
> Perhaps better move out the locking completely to wrappers and remove
> the knowledge from the core plist code.

I don't think wrappers will help any. You still need to add some hook to
let the debugging know what type of lock is protecting a plist. It is
also nice annotation to see it. The code isn't that bad, and it is
compiled out when DEBUG_PI_LIST is not set.


-- Steve



      parent reply	other threads:[~2011-06-29 20:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29 19:33 Dima Zavin
2011-06-29 20:01 ` Steven Rostedt
2011-06-29 20:10   ` Dima Zavin
2011-06-29 20:12     ` Dima Zavin
2011-06-29 20:13 ` Andi Kleen
2011-06-29 20:34   ` Dima Zavin
2011-06-29 20:43     ` Steven Rostedt
2011-06-30 22:14       ` Dima Zavin
2011-06-30 22:45         ` Steven Rostedt
2011-07-02 10:09           ` Peter Zijlstra
2011-06-29 20:36   ` Steven Rostedt [this message]

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=1309379766.26417.46.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=andi@firstfloor.org \
    --cc=dima@android.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®