From: MinChan Kim <minchan.kim@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Nick Piggin <npiggin@suse.de>,
linux kernel <linux-kernel@vger.kernel.org>,
linux mm <linux-mm@kvack.org>
Subject: Re: [BUG??] Deadlock between kswapd and sys_inotify_add_watch(lockdep report)
Date: Mon, 2 Feb 2009 20:56:27 +0900 [thread overview]
Message-ID: <20090202115627.GB13532@barrios-desktop> (raw)
In-Reply-To: <1233575085.4787.140.camel@laptop>
Thanks for kind explanation. :)
Unfortunately, I still have a question. :(
On Mon, Feb 02, 2009 at 12:44:45PM +0100, Peter Zijlstra wrote:
> On Mon, 2009-02-02 at 20:27 +0900, MinChan Kim wrote:
> > On Mon, Feb 02, 2009 at 11:40:02AM +0100, Peter Zijlstra wrote:
> > > On Mon, 2009-02-02 at 19:25 +0900, MinChan Kim wrote:
> > > > But, I am not sure whether it's real bug or not.
> > >
> > > Me neither, inode life-times are tricky, but on first sight it looks
> > > real enough.
> > >
> > > > I always suffer from reading lockdep report's result. :(
> > > > It would be better to have a document about lockdep report analysis.
> > >
> > > I've never found them hard to read, so I'm afraid you'll have to be more
> > > explicit about what is unclear to you.
> >
> > It's becuase not lockdep humble report but my poor knowledge. :(
> > Could you elaborate please ?
> >
> > >[ 331.718120] [ INFO: inconsistent lock state ]
> > >[ 331.718124] 2.6.28-rc2-mm1-lockdep #6
> > >[ 331.718126] ---------------------------------
> > >[ 331.718129] inconsistent {ov-reclaim-W} -> {in-reclaim-W} usage.
> > ^ ^
> > write ? write ?
>
> Correct, we track states for read and write, for single state locks we
> map everything on the exclusive state (write).
>
> > >
> > >[ 331.718133] kswapd0/218 [HC0[0]:SC0[0]:HE0:SE1] takes:
> > ^^^^^^^^^^^^^^^^^^^^^^
> > what means ? HC,SC,HE,SE
>
> Ah, yes, that's a bit obscure, but usually not needed.
>
> Hardirq Context -- irq state tracking [preempt_count tracking]
> Softirq Context -- idem
>
> Hardirq Enabled
> Softirq Enabled
>
> It allows you to see if the irq state tracking matches up, and what the
> call context is.
>
> > >
> > >[ 331.718136] (&inode->inotify_mutex){--..+.}, at: [<c01dba70>] inotify_inode_is_dead+0x20/0x90
> > >
> >
> > Is it related to recursive lock of inotify_mutex ?
>
> Yes.
>
> > but, Subject means 'inconsistent {ov-reclaim-W} -> {in-reclaim-W}',
> > IOW, it's related to reclaim of GFP_FS.
> > What's relation inotify_mutex and reclaim of GFP_FS?
>
> The lockdep report states the following:
>
> While holding inotify_mutex, we do a __GFP_FS allocation.
> But __GFP_FS allocations can end up locking inotify_mutex.
>
> > I think if reclaim context which have GFP_FS already have lock A and then
> > do pageout, if writepage need the lock A, we have to catch such a case.
> > I thought Nick's patch's goal catchs such a case.
>
> Correct, it exactly does that.
But, I think such a case can be caught by lockdep of recursive detection
which is existed long time ago by making you.
what's difference Nick's patch and recursive lockdep ?
--
Kinds Regards
MinChan Kim
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-02-02 11:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-02 10:17 MinChan Kim
2009-02-02 10:25 ` MinChan Kim
2009-02-02 10:40 ` Peter Zijlstra
2009-02-02 11:27 ` MinChan Kim
2009-02-02 11:44 ` Peter Zijlstra
2009-02-02 11:56 ` MinChan Kim [this message]
2009-02-02 13:09 ` Peter Zijlstra
2009-02-02 13:43 ` MinChan Kim
2009-02-02 13:55 ` Peter Zijlstra
2009-02-02 14:16 ` MinChan Kim
2009-02-03 3:03 ` Nick Piggin
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=20090202115627.GB13532@barrios-desktop \
--to=minchan.kim@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--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