Re: [RFC 1/2] mm: additional page lock debugging

2014-02-10 Thread Sasha Levin
This triggers two problems: - lockdep complains about deadlock since we try to lock another page while one is already locked. I can clear that by allowing page locks to nest within each other, but that seems wrong and we'll miss actual deadlock cases. Right,.. I think we can cobble somethin

Re: [RFC 1/2] mm: additional page lock debugging

2014-01-06 Thread Peter Zijlstra
On Tue, Dec 31, 2013 at 11:42:04AM -0500, Sasha Levin wrote: > On 12/31/2013 11:26 AM, Peter Zijlstra wrote: > >On Mon, Dec 30, 2013 at 10:22:02PM -0500, Sasha Levin wrote: > > > >>I really want to use lockdep here, but I'm not really sure how to handle > >>locks which live > >>for a rather long w

Re: [RFC 1/2] mm: additional page lock debugging

2013-12-31 Thread Sasha Levin
On 12/31/2013 11:26 AM, Peter Zijlstra wrote: On Mon, Dec 30, 2013 at 10:22:02PM -0500, Sasha Levin wrote: I really want to use lockdep here, but I'm not really sure how to handle locks which live for a rather long while instead of being locked and unlocked in the same function like most of t

Re: [RFC 1/2] mm: additional page lock debugging

2013-12-31 Thread Peter Zijlstra
On Mon, Dec 30, 2013 at 10:22:02PM -0500, Sasha Levin wrote: > I really want to use lockdep here, but I'm not really sure how to handle > locks which live > for a rather long while instead of being locked and unlocked in the same > function like > most of the rest of the kernel. (Cc Ingo, PeterZ

Re: [RFC 1/2] mm: additional page lock debugging

2013-12-30 Thread Sasha Levin
On 12/30/2013 05:48 PM, Kirill A. Shutemov wrote: On Mon, Dec 30, 2013 at 11:33:47AM -0500, Sasha Levin wrote: On 12/30/2013 06:43 AM, Kirill A. Shutemov wrote: On Sat, Dec 28, 2013 at 08:45:03PM -0500, Sasha Levin wrote: We've recently stumbled on several issues with the page lock which trigg

Re: [RFC 1/2] mm: additional page lock debugging

2013-12-30 Thread Kirill A. Shutemov
On Mon, Dec 30, 2013 at 11:33:47AM -0500, Sasha Levin wrote: > On 12/30/2013 06:43 AM, Kirill A. Shutemov wrote: > >On Sat, Dec 28, 2013 at 08:45:03PM -0500, Sasha Levin wrote: > >>We've recently stumbled on several issues with the page lock which > >>triggered BUG_ON()s. > >> > >>While working on

Re: [RFC 1/2] mm: additional page lock debugging

2013-12-30 Thread Sasha Levin
On 12/30/2013 06:43 AM, Kirill A. Shutemov wrote: On Sat, Dec 28, 2013 at 08:45:03PM -0500, Sasha Levin wrote: We've recently stumbled on several issues with the page lock which triggered BUG_ON()s. While working on them, it was clear that due to the complexity of locking its pretty hard to fig

Re: [RFC 1/2] mm: additional page lock debugging

2013-12-30 Thread Kirill A. Shutemov
On Sat, Dec 28, 2013 at 08:45:03PM -0500, Sasha Levin wrote: > We've recently stumbled on several issues with the page lock which > triggered BUG_ON()s. > > While working on them, it was clear that due to the complexity of > locking its pretty hard to figure out if something is supposed > to be lo