Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-30 Thread Gleb Natapov
On Fri, Nov 30, 2012 at 04:36:46PM +0800, Li Zhong wrote: > On Thu, 2012-11-29 at 19:25 +0200, Gleb Natapov wrote: > > On Thu, Nov 29, 2012 at 03:40:05PM +0100, Frederic Weisbecker wrote: > > > 2012/11/29 Li Zhong : > > > > On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: > > > >> >

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-30 Thread Li Zhong
On Thu, 2012-11-29 at 19:25 +0200, Gleb Natapov wrote: > On Thu, Nov 29, 2012 at 03:40:05PM +0100, Frederic Weisbecker wrote: > > 2012/11/29 Li Zhong : > > > On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: > > >> > With rcu_user_exit() at the beginning, now rcu_irq_enter() only > >

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-30 Thread Li Zhong
On Thu, 2012-11-29 at 19:25 +0200, Gleb Natapov wrote: On Thu, Nov 29, 2012 at 03:40:05PM +0100, Frederic Weisbecker wrote: 2012/11/29 Li Zhong zh...@linux.vnet.ibm.com: On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: With rcu_user_exit() at the beginning, now

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-30 Thread Gleb Natapov
On Fri, Nov 30, 2012 at 04:36:46PM +0800, Li Zhong wrote: On Thu, 2012-11-29 at 19:25 +0200, Gleb Natapov wrote: On Thu, Nov 29, 2012 at 03:40:05PM +0100, Frederic Weisbecker wrote: 2012/11/29 Li Zhong zh...@linux.vnet.ibm.com: On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Gleb Natapov
On Thu, Nov 29, 2012 at 03:40:05PM +0100, Frederic Weisbecker wrote: > 2012/11/29 Li Zhong : > > On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: > >> > With rcu_user_exit() at the beginning, now rcu_irq_enter() only protects > >> > the cpu idle eqs, but it's not good to call

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Frederic Weisbecker
2012/11/29 Gleb Natapov : > On Wed, Nov 28, 2012 at 03:25:07PM +0100, Frederic Weisbecker wrote: >> 2012/11/28 Gleb Natapov : >> > On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: >> >> Yes but if rcu_irq_*() calls are fine to be called there, and I >> >> believe they are

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Frederic Weisbecker
2012/11/29 Li Zhong : > On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: >> > With rcu_user_exit() at the beginning, now rcu_irq_enter() only protects >> > the cpu idle eqs, but it's not good to call rcu_irq_exit() after the cpu >> > halt and the page ready. >> >> Hmm, why is it not

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 03:25:07PM +0100, Frederic Weisbecker wrote: > 2012/11/28 Gleb Natapov : > > On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: > >> Yes but if rcu_irq_*() calls are fine to be called there, and I > >> believe they are because exception_enter() exits the

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 03:25:07PM +0100, Frederic Weisbecker wrote: 2012/11/28 Gleb Natapov g...@redhat.com: On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: Yes but if rcu_irq_*() calls are fine to be called there, and I believe they are because exception_enter() exits

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Frederic Weisbecker
2012/11/29 Li Zhong zh...@linux.vnet.ibm.com: On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: With rcu_user_exit() at the beginning, now rcu_irq_enter() only protects the cpu idle eqs, but it's not good to call rcu_irq_exit() after the cpu halt and the page ready. Hmm, why

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Frederic Weisbecker
2012/11/29 Gleb Natapov g...@redhat.com: On Wed, Nov 28, 2012 at 03:25:07PM +0100, Frederic Weisbecker wrote: 2012/11/28 Gleb Natapov g...@redhat.com: On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: Yes but if rcu_irq_*() calls are fine to be called there, and I

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Gleb Natapov
On Thu, Nov 29, 2012 at 03:40:05PM +0100, Frederic Weisbecker wrote: 2012/11/29 Li Zhong zh...@linux.vnet.ibm.com: On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: With rcu_user_exit() at the beginning, now rcu_irq_enter() only protects the cpu idle eqs, but it's not good to

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Li Zhong
On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: > 2012/11/28 Li Zhong : > > Thank you all for the review and education. > > > > Below are my current understandings and an update version. Would you > > please help to review it again and give your comments? > > > > Thanks, Zhong > > >

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Frederic Weisbecker
2012/11/28 Gleb Natapov : > On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: >> Yes but if rcu_irq_*() calls are fine to be called there, and I >> believe they are because exception_enter() exits the user mode, we >> should start to protect there right now instead of waiting

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: > > So I still want to remove it. And later if it shows that we really needs > > rcu somewhere in this code path, maybe we could use RCU_NONIDLE() to > > protect it. ( The suspicious RCU usage reported in commit > >

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Frederic Weisbecker
2012/11/28 Li Zhong : > Thank you all for the review and education. > > Below are my current understandings and an update version. Would you > please help to review it again and give your comments? > > Thanks, Zhong > > Now it seems to me that it is legal to call rcu_irq_exit/enter() without > a

[RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Li Zhong
Thank you all for the review and education. Below are my current understandings and an update version. Would you please help to review it again and give your comments? Thanks, Zhong Now it seems to me that it is legal to call rcu_irq_exit/enter() without a matching rcu_irq_enter/exit() if the

[RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Li Zhong
Thank you all for the review and education. Below are my current understandings and an update version. Would you please help to review it again and give your comments? Thanks, Zhong Now it seems to me that it is legal to call rcu_irq_exit/enter() without a matching rcu_irq_enter/exit() if the

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Frederic Weisbecker
2012/11/28 Li Zhong zh...@linux.vnet.ibm.com: Thank you all for the review and education. Below are my current understandings and an update version. Would you please help to review it again and give your comments? Thanks, Zhong Now it seems to me that it is legal to call

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Gleb Natapov
On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: So I still want to remove it. And later if it shows that we really needs rcu somewhere in this code path, maybe we could use RCU_NONIDLE() to protect it. ( The suspicious RCU usage reported in commit c5e015d4949aa665

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Frederic Weisbecker
2012/11/28 Gleb Natapov g...@redhat.com: On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: Yes but if rcu_irq_*() calls are fine to be called there, and I believe they are because exception_enter() exits the user mode, we should start to protect there right now instead of

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Li Zhong
On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: 2012/11/28 Li Zhong zh...@linux.vnet.ibm.com: Thank you all for the review and education. Below are my current understandings and an update version. Would you please help to review it again and give your comments? Thanks,