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>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [BUG??] Deadlock between kswapd and sys_inotify_add_watch(lockdep report)
Date: Mon, 2 Feb 2009 22:43:48 +0900 [thread overview]
Message-ID: <28c262360902020543we62e394kb21c16f599824552@mail.gmail.com> (raw)
In-Reply-To: <1233580147.4787.207.camel@laptop>
On Mon, Feb 2, 2009 at 10:09 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, 2009-02-02 at 20:56 +0900, MinChan Kim wrote:
>> Thanks for kind explanation. :)
>> Unfortunately, I still have a question. :(
>
> No problem :-)
>
>> > > 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.
>
> (Ingo wrote that code)
>
>> what's difference Nick's patch and recursive lockdep ?
>
> Very good question indeed. Every time I started to write an answer I
> realize its wrong.
>
> The below is half the answer:
>
> /*
> * Check whether we are holding such a class already.
> *
> * (Note that this has to be done separately, because the graph cannot
> * detect such classes of deadlocks.)
> *
> * Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read
> */
> static int
> check_deadlock(struct task_struct *curr, struct held_lock *next,
> struct lockdep_map *next_instance, int read)
>
> So in order for the reclaim report to trigger we have to actually hit
> that code path that has the recursion in it. The reclaim context
> annotation by Nick ensures we detect such cases without having to do
> that.
In my case and Nick's patch's example hit code path that has the
recursion in it.
then reported it.
Do I miss something ?
> The second half, to which I cannot seem to get a decent answer to atm,
> is why the recursion case isn't detected by the graph.
>
>
>
>
--
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 13:43 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
2009-02-02 13:09 ` Peter Zijlstra
2009-02-02 13:43 ` MinChan Kim [this message]
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=28c262360902020543we62e394kb21c16f599824552@mail.gmail.com \
--to=minchan.kim@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--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