Re: [RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-13 Thread Benjamin Herrenschmidt
On Mon, 2013-05-13 at 17:46 +0800, Li Zhong wrote: > > hash_page() won't start a new RCU, at least not in its current incarnation, > > the only thing I can see it ever doing would be to take some RCU read locks > > one > > day (it doesn't today). > > Seems I added the hooks because of the trace p

Re: [RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-13 Thread Li Zhong
On Mon, 2013-05-13 at 19:06 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-05-13 at 16:44 +0800, Li Zhong wrote: > > Yes, the above and hash_page() are two C functions for a same exception. > > And the exception hooks enable RCU usage in those C codes. But for asm > > codes, I think we could a

Re: [RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-13 Thread Benjamin Herrenschmidt
On Mon, 2013-05-13 at 16:44 +0800, Li Zhong wrote: > Yes, the above and hash_page() are two C functions for a same exception. > And the exception hooks enable RCU usage in those C codes. But for asm > codes, I think we could assume that there would be no RCU usage there, > so we don't need wrap the

Re: [RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-13 Thread Li Zhong
On Mon, 2013-05-13 at 15:57 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-05-13 at 13:21 +0800, Li Zhong wrote: > > int recover = 0; > > + enum ctx_state prev_state; > > + > > + prev_state = exception_enter(); > > Please make it nicer: > > enum ctx_state prev_state = exception

Re: [RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-12 Thread Benjamin Herrenschmidt
On Mon, 2013-05-13 at 13:21 +0800, Li Zhong wrote: > int recover = 0; > + enum ctx_state prev_state; > + > + prev_state = exception_enter(); Please make it nicer: enum ctx_state prev_state = exception_enter(); int recover = 0; > __get_cpu_var(irq_stat).mce_ex

[RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-12 Thread Li Zhong
This is the exception hooks for context tracking subsystem, including data access, program check, single step, instruction breakpoint, machine check, alignment, fp unavailable, altivec assist, unknown exception, whose handlers might use RCU. This patch corresponds to [PATCH] x86: Exception hooks f