Re: [RFC 08/12] lockdep: Apply crossrelease to PG_locked lock

2016-07-03 Thread Byungchul Park
On Fri, Jul 01, 2016 at 02:18:46PM +0300, Kirill A. Shutemov wrote: > On Fri, Jul 01, 2016 at 08:21:21AM +0900, Byungchul Park wrote: > > On Thu, Jun 30, 2016 at 03:04:58PM +0200, Peter Zijlstra wrote: > > > On Mon, Jun 20, 2016 at 01:55:23PM +0900, Byungchul Park wrote: > > > > @@ -215,6 +219,11 @

Re: [RFC 08/12] lockdep: Apply crossrelease to PG_locked lock

2016-07-01 Thread Kirill A. Shutemov
On Fri, Jul 01, 2016 at 08:21:21AM +0900, Byungchul Park wrote: > On Thu, Jun 30, 2016 at 03:04:58PM +0200, Peter Zijlstra wrote: > > On Mon, Jun 20, 2016 at 01:55:23PM +0900, Byungchul Park wrote: > > > @@ -215,6 +219,11 @@ struct page { > > > #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS > > > int _las

Re: [RFC 08/12] lockdep: Apply crossrelease to PG_locked lock

2016-07-01 Thread Peter Zijlstra
On Fri, Jul 01, 2016 at 08:21:21AM +0900, Byungchul Park wrote: > On Thu, Jun 30, 2016 at 03:04:58PM +0200, Peter Zijlstra wrote: > > On Mon, Jun 20, 2016 at 01:55:23PM +0900, Byungchul Park wrote: > > > @@ -215,6 +219,11 @@ struct page { > > > #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS > > > int _las

Re: [RFC 08/12] lockdep: Apply crossrelease to PG_locked lock

2016-06-30 Thread Byungchul Park
On Thu, Jun 30, 2016 at 03:04:58PM +0200, Peter Zijlstra wrote: > On Mon, Jun 20, 2016 at 01:55:23PM +0900, Byungchul Park wrote: > > @@ -215,6 +219,11 @@ struct page { > > #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS > > int _last_cpupid; > > #endif > > + > > +#ifdef CONFIG_LOCKDEP_PAGELOCK > > +

Re: [RFC 08/12] lockdep: Apply crossrelease to PG_locked lock

2016-06-30 Thread Peter Zijlstra
On Mon, Jun 20, 2016 at 01:55:23PM +0900, Byungchul Park wrote: > @@ -215,6 +219,11 @@ struct page { > #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS > int _last_cpupid; > #endif > + > +#ifdef CONFIG_LOCKDEP_PAGELOCK > + struct lockdep_map map; > + struct cross_lock xlock; > +#endif > } So

[RFC 08/12] lockdep: Apply crossrelease to PG_locked lock

2016-06-19 Thread Byungchul Park
lock_page() and its family can cause deadlock. Nevertheless, it cannot use the lock correctness validator becasue unlock_page() can be called in different context from the context calling lock_page(), which violates original lockdep's assumption. However, thanks to CONFIG_LOCKDEP_CROSSRELEASE, we