From: Nick Piggin <npiggin@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [rfc][patch] mm: lockdep page lock
Date: Tue, 16 Mar 2010 17:42:09 +1100 [thread overview]
Message-ID: <20100316064209.GK2869@laptop> (raw)
In-Reply-To: <20100316062032.GB22651@elte.hu>
On Tue, Mar 16, 2010 at 07:20:32AM +0100, Ingo Molnar wrote:
>
> * Nick Piggin <npiggin@suse.de> wrote:
>
> > Page lock has very complex dependencies, so it would be really nice to add
> > lockdep support for it.
>
> Just wondering - has your patch shown any suspect areas of code already, in
> the testing you did?
Not yet. Although I only did basic stress testing with tmpfs and ext3 so
far. It would get even further useful for fs developers combined with
annotating more bit locks like buffer lock.
BTW. I tried adding a might_fault() under page lock to see the infamous
old page_lock -> mmap_sem deadlock, but it didn't warn. Explicitly doing
a down_write/up_write of mmap_sem did warn. But it took a while to build
the required chains, so I may have just been unlucky.
> Maybe it should be test-driven for a while, in a non-append-only tree such as
> -mm, to see whether it's finding real bugs.
I think it should be very useful for filesystem developers. It doesn't
seem too intrusive (and I will make it less so, by not open-coding the
mutex_release/mutex_acquire pairs when changing page mapping).
Filesystems and mm/vfs/fs lock interactions may be the most complex in
the kernel...
If you are worried about struct page bloat, it's already getting bloated
by ptl spinlock in there. But it could always be configurable.
No it isn't ready for -mm yet, let alone an append-only tree, I just
wanted to get opinions from mm and fs (and lockdep) people.
Thanks,
Nick
--
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>
prev parent reply other threads:[~2010-03-16 6:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-15 15:58 Nick Piggin
2010-03-15 18:08 ` Jan Kara
2010-03-16 2:21 ` Nick Piggin
2010-03-16 11:52 ` Jan Kara
2010-03-24 13:28 ` Peter Zijlstra
2010-03-25 5:36 ` Nick Piggin
2010-03-25 9:40 ` Peter Zijlstra
2010-03-26 3:18 ` Jamie Lokier
2010-03-26 6:54 ` Peter Zijlstra
2010-03-26 11:54 ` Jamie Lokier
2010-03-24 13:54 ` Peter Zijlstra
2010-03-16 6:20 ` Ingo Molnar
2010-03-16 6:42 ` Nick Piggin [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=20100316064209.GK2869@laptop \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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