Re: [PATCH 1/7] locking/rwsem: don't resched at the end of optimistic spinning

2014-08-05 Thread Waiman Long
On 08/04/2014 04:48 PM, Peter Zijlstra wrote: On Mon, Aug 04, 2014 at 02:36:35PM -0400, Waiman Long wrote: On 08/04/2014 03:55 AM, Peter Zijlstra wrote: On Sun, Aug 03, 2014 at 10:36:16PM -0400, Waiman Long wrote: For a fully preemptive kernel, a call to preempt_enable() could potentially trig

Re: [PATCH 1/7] locking/rwsem: don't resched at the end of optimistic spinning

2014-08-04 Thread Jason Low
On Mon, 2014-08-04 at 22:48 +0200, Peter Zijlstra wrote: > On Mon, Aug 04, 2014 at 02:36:35PM -0400, Waiman Long wrote: > > On 08/04/2014 03:55 AM, Peter Zijlstra wrote: > > >On Sun, Aug 03, 2014 at 10:36:16PM -0400, Waiman Long wrote: > > >>For a fully preemptive kernel, a call to preempt_enable()

Re: [PATCH 1/7] locking/rwsem: don't resched at the end of optimistic spinning

2014-08-04 Thread Peter Zijlstra
On Mon, Aug 04, 2014 at 02:36:35PM -0400, Waiman Long wrote: > On 08/04/2014 03:55 AM, Peter Zijlstra wrote: > >On Sun, Aug 03, 2014 at 10:36:16PM -0400, Waiman Long wrote: > >>For a fully preemptive kernel, a call to preempt_enable() could > >>potentially trigger a task rescheduling event. In the

Re: [PATCH 1/7] locking/rwsem: don't resched at the end of optimistic spinning

2014-08-04 Thread Waiman Long
On 08/04/2014 03:55 AM, Peter Zijlstra wrote: On Sun, Aug 03, 2014 at 10:36:16PM -0400, Waiman Long wrote: For a fully preemptive kernel, a call to preempt_enable() could potentially trigger a task rescheduling event. In the case of rwsem optimistic spinning, the task has either gotten the lock

Re: [PATCH 1/7] locking/rwsem: don't resched at the end of optimistic spinning

2014-08-04 Thread Peter Zijlstra
On Sun, Aug 03, 2014 at 10:36:16PM -0400, Waiman Long wrote: > For a fully preemptive kernel, a call to preempt_enable() could > potentially trigger a task rescheduling event. In the case of rwsem > optimistic spinning, the task has either gotten the lock or is going > to sleep soon. So there is no