From: Peter Zijlstra <peterz@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Paris <eparis@redhat.com>,
linux-kernel@vger.kernel.org, mingo@elte.hu,
balbir@linux.vnet.ibm.com, linux-fsdevel@vger.kernel.org,
aviro@redhat.com
Subject: Re: [PATCH] make inotify event handles use GFP_NOFS
Date: Fri, 03 Apr 2009 16:34:00 +0200 [thread overview]
Message-ID: <1238769240.798.110.camel@twins> (raw)
In-Reply-To: <1238448816.4073.265.camel@laptop>
On Mon, 2009-03-30 at 23:33 +0200, Peter Zijlstra wrote:
> On Mon, 2009-03-30 at 14:26 -0700, Andrew Morton wrote:
> > On Wed, 18 Mar 2009 14:27:32 -0400
> > Eric Paris <eparis@redhat.com> wrote:
> >
> > > I think this is a bandaide to shut up lockdep. I could either figure
> > > out lockdep classes and figure out how to reclassify inotify locks since
> > > I believe Nick is correct when he says inotify watches pin the inode in
> > > core so memory pressure can't evict it.
> >
> > It's pretty sad to degrading the strength of the memory allocation just
> > to squish a lockdep report.
>
> Yeah, I agree, its the wrong thing to do. lockdep annotations really
> aren't that hard -- also, you could also talk me through it.
static struct lock_class_key inotify_mutex_free;
/*
* here the inotify mutex gets moved to a different
* data structure with different locking semantics while
* holding inotify_mutex.
*/
lock_set_class(&foo->inotify_mutex.dep_map, "inotify_mutex_free",
&inotify_mutex_free, 0, _THIS_IP_);
Or when done without holding the inotify_mutex
/*
* here the inotify mutex gets moved to a different
* data structure with different locking semantics.
*/
lockdep_set_class(&foo->inotify_mutex, &inotify_mutex_free);
Is all there should be to it.
next prev parent reply other threads:[~2009-04-03 14:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 18:27 [PATCH] make inotify event handles use GFP_NOFS Eric Paris
2009-03-30 21:26 ` Andrew Morton
2009-03-30 21:33 ` Peter Zijlstra
2009-04-03 14:34 ` Peter Zijlstra [this message]
2009-04-03 14:56 ` eparis
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=1238769240.798.110.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=aviro@redhat.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=eparis@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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;
as well as URLs for NNTP newsgroup(s).