Re: [PATCH 1/2] powerpc: use smp_rmb when looking at deposisted pgtable to store hash index

2013-05-19 Thread Benjamin Herrenschmidt
On Mon, 2013-05-20 at 09:57 +0530, Aneesh Kumar K.V wrote: > Michael Neuling writes: > > > Aneesh Kumar K.V wrote: > > > >> From: "Aneesh Kumar K.V" > >> > >> We need to use smb_rmb when looking at hpte slot array. Otherwise we could > >> reorder the hpte_slot array load bfore even we marked t

Re: [PATCH 17/18] cpufreq: powerpc: move cpufreq driver to drivers/cpufreq

2013-05-19 Thread Viresh Kumar
On 13 May 2013 11:34, Viresh Kumar wrote: > On 22 April 2013 12:19, Viresh Kumar wrote: >> On 9 April 2013 14:05, Viresh Kumar wrote: >>> On 5 April 2013 12:16, Viresh Kumar wrote: On 4 April 2013 18:24, Viresh Kumar wrote: > This patch moves cpufreq driver of powerpc platform to driv

Re: [PATCH 1/2] powerpc: use smp_rmb when looking at deposisted pgtable to store hash index

2013-05-19 Thread Aneesh Kumar K.V
Michael Neuling writes: > Aneesh Kumar K.V wrote: > >> From: "Aneesh Kumar K.V" >> >> We need to use smb_rmb when looking at hpte slot array. Otherwise we could >> reorder the hpte_slot array load bfore even we marked the pmd trans huge. > > Does this need to go back into the stable series? >

Re: [PATCH 1/2] powerpc: use smp_rmb when looking at deposisted pgtable to store hash index

2013-05-19 Thread Michael Neuling
Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > We need to use smb_rmb when looking at hpte slot array. Otherwise we could > reorder the hpte_slot array load bfore even we marked the pmd trans huge. Does this need to go back into the stable series? Mikey > > Signed-off-by: Aneesh Kum

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Michael S. Tsirkin
On Sun, May 19, 2013 at 04:23:22PM -0400, Steven Rostedt wrote: > On Sun, 2013-05-19 at 19:40 +0300, Michael S. Tsirkin wrote: > > > OK I get it. So let me correct myself. The simple code > > that does something like this under a spinlock: > > > preempt_disable > > > pagefault_disable

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Steven Rostedt
On Sun, 2013-05-19 at 19:40 +0300, Michael S. Tsirkin wrote: > OK I get it. So let me correct myself. The simple code > that does something like this under a spinlock: > > preempt_disable > > pagefault_disable > > error = copy_to_user > > pagefault_enable > > preempt_

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Michael S. Tsirkin
On Sun, May 19, 2013 at 12:06:19PM -0400, Steven Rostedt wrote: > On Sun, 2013-05-19 at 16:34 +0300, Michael S. Tsirkin wrote: > > > Right but we need to keep it working on upstream as well. > > If I do preempt_enable under a spinlock upstream won't it > > try to sleep under spinlock? > > No it w

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Steven Rostedt
On Sun, 2013-05-19 at 16:34 +0300, Michael S. Tsirkin wrote: > Right but we need to keep it working on upstream as well. > If I do preempt_enable under a spinlock upstream won't it > try to sleep under spinlock? No it wont. A spinlock calls preempt_disable implicitly, and a preempt_enable() will

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Michael S. Tsirkin
On Sun, May 19, 2013 at 08:34:04AM -0400, Steven Rostedt wrote: > On Sun, 2013-05-19 at 12:35 +0300, Michael S. Tsirkin wrote: > > > No, I was not assuming that. What I'm trying to say is that a caller > > that does something like this under a spinlock: > > preempt_disable > > pagefault_di

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Steven Rostedt
On Sun, 2013-05-19 at 12:35 +0300, Michael S. Tsirkin wrote: > No, I was not assuming that. What I'm trying to say is that a caller > that does something like this under a spinlock: > preempt_disable > pagefault_disable > error = copy_to_user > pagefault_enable > pree

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-19 Thread Michael S. Tsirkin
On Thu, May 16, 2013 at 08:40:41PM +0200, Peter Zijlstra wrote: > On Thu, May 16, 2013 at 02:16:10PM +0300, Michael S. Tsirkin wrote: > > There are several ways to make sure might_fault > > calling function does not sleep. > > One is to use it on kernel or otherwise locked memory - apparently > > n