Re: [PATCH 3/3] sched: Add cond_resched_rwlock

2020-10-30 Thread Waiman Long
On 10/27/20 12:49 PM, Ben Gardon wrote: Rescheduling while holding a spin lock is essential for keeping long running kernel operations running smoothly. Add the facility to cond_resched rwlocks. Signed-off-by: Ben Gardon --- include/linux/sched.h | 12 kernel/sched/core.c |

Re: [PATCH 3/3] sched: Add cond_resched_rwlock

2020-10-27 Thread Davidlohr Bueso
On Tue, 27 Oct 2020, Sean Christopherson wrote: On Tue, Oct 27, 2020 at 09:49:50AM -0700, Ben Gardon wrote: Rescheduling while holding a spin lock is essential for keeping long running kernel operations running smoothly. Add the facility to cond_resched rwlocks. Nit: I would start the

Re: [PATCH 3/3] sched: Add cond_resched_rwlock

2020-10-27 Thread Peter Zijlstra
On Tue, Oct 27, 2020 at 10:56:36AM -0700, Sean Christopherson wrote: > On Tue, Oct 27, 2020 at 09:49:50AM -0700, Ben Gardon wrote: > > Rescheduling while holding a spin lock is essential for keeping long > > running kernel operations running smoothly. Add the facility to > > cond_resched rwlocks.

Re: [PATCH 3/3] sched: Add cond_resched_rwlock

2020-10-27 Thread Paolo Bonzini
On 27/10/20 19:44, Peter Zijlstra wrote: > On Tue, Oct 27, 2020 at 09:49:50AM -0700, Ben Gardon wrote: > >> diff --git a/kernel/sched/core.c b/kernel/sched/core.c >> index d2003a7d5ab55..ac58e7829a063 100644 >> --- a/kernel/sched/core.c >> +++ b/kernel/sched/core.c >> @@ -6152,6 +6152,46 @@ int

Re: [PATCH 3/3] sched: Add cond_resched_rwlock

2020-10-27 Thread Peter Zijlstra
On Tue, Oct 27, 2020 at 09:49:50AM -0700, Ben Gardon wrote: > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index d2003a7d5ab55..ac58e7829a063 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -6152,6 +6152,46 @@ int __cond_resched_lock(spinlock_t *lock) > } >

Re: [PATCH 3/3] sched: Add cond_resched_rwlock

2020-10-27 Thread Sean Christopherson
On Tue, Oct 27, 2020 at 09:49:50AM -0700, Ben Gardon wrote: > Rescheduling while holding a spin lock is essential for keeping long > running kernel operations running smoothly. Add the facility to > cond_resched rwlocks. This adds two new exports and two new macros without any in-tree users,

[PATCH 3/3] sched: Add cond_resched_rwlock

2020-10-27 Thread Ben Gardon
Rescheduling while holding a spin lock is essential for keeping long running kernel operations running smoothly. Add the facility to cond_resched rwlocks. Signed-off-by: Ben Gardon --- include/linux/sched.h | 12 kernel/sched/core.c | 40