Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-07 Thread Hugh Dickins
On Mon, 7 May 2012, Paul E. McKenney wrote: > On Mon, May 07, 2012 at 09:21:54AM -0700, Hugh Dickins wrote: > > > > In 70 hours I got six isolated messages like the below (but from > > different __might_sleep callsites) - where before I'd have flurries > > of hundreds(?) and freeze within the hour

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-07 Thread Paul E. McKenney
On Mon, May 07, 2012 at 09:21:54AM -0700, Hugh Dickins wrote: > On Wed, 2 May 2012, Hugh Dickins wrote: > > On Wed, 2 May 2012, Paul E. McKenney wrote: > > > > > > In any case, I must confess that I feel quite silly about my series > > > of patches. I have reverted them aside from a couple that d

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-07 Thread Hugh Dickins
On Wed, 2 May 2012, Hugh Dickins wrote: > On Wed, 2 May 2012, Paul E. McKenney wrote: > > > > In any case, I must confess that I feel quite silly about my series > > of patches. I have reverted them aside from a couple that did useful > > optimizations, and they should show up in -next shortly. >

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Hugh Dickins
On Wed, 2 May 2012, Paul E. McKenney wrote: > On Wed, May 02, 2012 at 03:54:24PM -0700, Hugh Dickins wrote: > > On Wed, May 2, 2012 at 2:54 PM, Paul E. McKenney > > wrote: > > > On Thu, May 03, 2012 at 07:20:15AM +1000, Benjamin Herrenschmidt wrote: > > >> On Wed, 2012-05-02 at 13:25 -0700, Hugh D

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Paul E. McKenney
On Wed, May 02, 2012 at 03:54:24PM -0700, Hugh Dickins wrote: > On Wed, May 2, 2012 at 2:54 PM, Paul E. McKenney > wrote: > > On Thu, May 03, 2012 at 07:20:15AM +1000, Benjamin Herrenschmidt wrote: > >> On Wed, 2012-05-02 at 13:25 -0700, Hugh Dickins wrote: > >> > Got it at last.  Embarrassingly o

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Hugh Dickins
On Wed, May 2, 2012 at 2:54 PM, Paul E. McKenney wrote: > On Thu, May 03, 2012 at 07:20:15AM +1000, Benjamin Herrenschmidt wrote: >> On Wed, 2012-05-02 at 13:25 -0700, Hugh Dickins wrote: >> > Got it at last.  Embarrassingly obvious.  __rcu_read_lock() and >> > __rcu_read_unlock() are not safe to

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Paul E. McKenney
On Thu, May 03, 2012 at 07:20:15AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-05-02 at 13:25 -0700, Hugh Dickins wrote: > > Got it at last. Embarrassingly obvious. __rcu_read_lock() and > > __rcu_read_unlock() are not safe to be using __this_cpu operations, > > the cpu may change in betw

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Paul E. McKenney
On Wed, May 02, 2012 at 02:32:38PM -0700, Paul E. McKenney wrote: > On Wed, May 02, 2012 at 01:49:54PM -0700, Paul E. McKenney wrote: > > On Wed, May 02, 2012 at 01:25:30PM -0700, Hugh Dickins wrote: > > > On Tue, 1 May 2012, Paul E. McKenney wrote: > > > > > > > > On Mon, 2012-04-30 at 15:37 -0700

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Paul E. McKenney
On Wed, May 02, 2012 at 01:49:54PM -0700, Paul E. McKenney wrote: > On Wed, May 02, 2012 at 01:25:30PM -0700, Hugh Dickins wrote: > > On Tue, 1 May 2012, Paul E. McKenney wrote: > > > > > > > On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > > > > > > > > > > > > > > > BUG: sleeping funct

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Benjamin Herrenschmidt
On Wed, 2012-05-02 at 13:25 -0700, Hugh Dickins wrote: > Got it at last. Embarrassingly obvious. __rcu_read_lock() and > __rcu_read_unlock() are not safe to be using __this_cpu operations, > the cpu may change in between the rmw's read and write: they should > be using this_cpu operations (or, I

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Paul E. McKenney
On Wed, May 02, 2012 at 01:25:30PM -0700, Hugh Dickins wrote: > On Tue, 1 May 2012, Paul E. McKenney wrote: > > > > > > On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > > > > > > > > > > > > > BUG: sleeping function called from invalid context at > > > > > > > include/linux/pagemap.h:35

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-02 Thread Hugh Dickins
On Tue, 1 May 2012, Paul E. McKenney wrote: > > > > > On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > > > > > > > > > > > BUG: sleeping function called from invalid context at > > > > > > include/linux/pagemap.h:354 > > > > > > in_atomic(): 0, irqs_disabled(): 0, pid: 6886, name: cc1 >

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-01 Thread Paul E. McKenney
On Tue, May 01, 2012 at 02:42:02PM -0700, Hugh Dickins wrote: > On Tue, 1 May 2012, Paul E. McKenney wrote: > > On Mon, Apr 30, 2012 at 10:10:06PM -0700, Hugh Dickins wrote: > > > On Tue, 1 May 2012, Benjamin Herrenschmidt wrote: > > > > On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > >

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-01 Thread Hugh Dickins
On Tue, 1 May 2012, Paul E. McKenney wrote: > On Mon, Apr 30, 2012 at 10:10:06PM -0700, Hugh Dickins wrote: > > On Tue, 1 May 2012, Benjamin Herrenschmidt wrote: > > > On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > > > > > > > BUG: sleeping function called from invalid context at > >

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-01 Thread Paul E. McKenney
On Mon, Apr 30, 2012 at 10:10:06PM -0700, Hugh Dickins wrote: > On Tue, 1 May 2012, Benjamin Herrenschmidt wrote: > > On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > > > > > BUG: sleeping function called from invalid context at > > > include/linux/pagemap.h:354 > > > in_atomic(): 0, ir

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-05-01 Thread Paul E. McKenney
On Tue, May 01, 2012 at 10:33:38AM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > > > BUG: sleeping function called from invalid context at > > include/linux/pagemap.h:354 > > in_atomic(): 0, irqs_disabled(): 0, pid: 6886, name: cc1 > > Hrm ...

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-04-30 Thread Hugh Dickins
On Tue, 1 May 2012, Benjamin Herrenschmidt wrote: > On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > > > BUG: sleeping function called from invalid context at > > include/linux/pagemap.h:354 > > in_atomic(): 0, irqs_disabled(): 0, pid: 6886, name: cc1 > > Hrm ... in_atomic and irqs_dis

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-04-30 Thread Benjamin Herrenschmidt
On Mon, 2012-04-30 at 15:37 -0700, Hugh Dickins wrote: > > BUG: sleeping function called from invalid context at > include/linux/pagemap.h:354 > in_atomic(): 0, irqs_disabled(): 0, pid: 6886, name: cc1 Hrm ... in_atomic and irqs_disabled are both 0 ... so yeah it smells like a preempt count prob

Re: linux-next ppc64: RCU mods cause __might_sleep BUGs

2012-04-30 Thread Paul E. McKenney
On Mon, Apr 30, 2012 at 03:37:10PM -0700, Hugh Dickins wrote: > Hi Paul, > > On 3.4.0-rc4-next-20120427 and preceding linux-nexts (I've not tried > rc5-next-20120430 but expect it's the same), on PowerPC G5 quad with > CONFIG_PREEMPT=y and CONFIG_DEBUG_ATOMIC_SLEEP=y, I'm getting spurious > "BUG: