mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dan Noé" <dpn@isomerica.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: Lockdep warning for iprune_mutex at shrink_icache_memory
Date: Wed, 26 Nov 2008 12:52:58 -0500	[thread overview]
Message-ID: <20081126125258.72336d33@rockhopper.limebrokerage.com> (raw)
In-Reply-To: <1227711779.4454.184.camel@twins>

On Wed, 26 Nov 2008 16:02:59 +0100
Peter Zijlstra <peterz@infradead.org> wrote:

> The thing to do is re-annotate the inode locks whenever the inode
> changes data-structure, much like we do in unlock_new_inode().
> 
> So for each stage in the inode's life-cycle you need to create a key
> for each lock, such as:
> 
> struct lock_class_key xfs_active_inode_ilock;
> struct lock_class_key xfs_deleted_inode_ilock;
> ...
> 
> and on state change do something like:
> 
>   BUG_ON(rwsem_is_locked(&xfs_ilock->mrlock));
> 
>   init_rwsem(&xfs_ilock->mrlock);
>   lockdep_set_class(&xfs_ilock->mrlock, &xfs_deleted_inode_ilock);

This seems to make sense, based on my understanding and reading of the
lockdep documentation.  It looks like the first step is to add callbacks
for state change, and then add XFS specific callbacks that set the
lockdep class.  I would love to work on a patch, with some guidance.

Thanks,
Dan

-- 
                    /--------------- - -  -  -   -   -
                   |  Dan Noé
                   |  http://isomerica.net/~dpn/

  reply	other threads:[~2008-11-26 17:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 11:43 Dan Noé
2008-11-26  7:26 ` Dave Chinner
2008-11-26 15:02   ` Peter Zijlstra
2008-11-26 17:52     ` Dan Noé [this message]
2008-11-26 21:34     ` Dave Chinner
2008-11-27  8:05       ` Peter Zijlstra
2008-12-04  8:00         ` Peter Zijlstra
2008-12-04  9:09           ` Ingo Molnar

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=20081126125258.72336d33@rockhopper.limebrokerage.com \
    --to=dpn@isomerica.net \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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 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®