Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Peter Zijlstra
On Fri, Sep 23, 2016 at 08:42:51AM -0400, Mike Snitzer wrote: > On Fri, Sep 23 2016 at 8:26am -0400, > Peter Zijlstra wrote: > > > On Fri, Sep 23, 2016 at 02:17:10PM +0200, Mike Galbraith wrote: > > > On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > > > > On

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Peter Zijlstra
On Fri, Sep 23, 2016 at 08:42:51AM -0400, Mike Snitzer wrote: > On Fri, Sep 23 2016 at 8:26am -0400, > Peter Zijlstra wrote: > > > On Fri, Sep 23, 2016 at 02:17:10PM +0200, Mike Galbraith wrote: > > > On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > > > > On Fri, 23 Sep 2016, Peter

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Mike Snitzer
On Fri, Sep 23 2016 at 8:26am -0400, Peter Zijlstra wrote: > On Fri, Sep 23, 2016 at 02:17:10PM +0200, Mike Galbraith wrote: > > On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > > > > Is anybody still using

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Mike Snitzer
On Fri, Sep 23 2016 at 8:26am -0400, Peter Zijlstra wrote: > On Fri, Sep 23, 2016 at 02:17:10PM +0200, Mike Galbraith wrote: > > On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > > > > Is anybody still using PREEMPT_NONE? Most

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Mike Galbraith
On Fri, 2016-09-23 at 14:26 +0200, Peter Zijlstra wrote: > On Fri, Sep 23, 2016 at 02:17:10PM +0200, Mike Galbraith wrote: > > On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > > > > Is anybody still using PREEMPT_NONE? Most workloads

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Mike Galbraith
On Fri, 2016-09-23 at 14:26 +0200, Peter Zijlstra wrote: > On Fri, Sep 23, 2016 at 02:17:10PM +0200, Mike Galbraith wrote: > > On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > > > > Is anybody still using PREEMPT_NONE? Most workloads

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Peter Zijlstra
On Fri, Sep 23, 2016 at 02:17:10PM +0200, Mike Galbraith wrote: > On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > > Is anybody still using PREEMPT_NONE? Most workloads also care about > > > latency to some extend. Lots of code has

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Peter Zijlstra
On Fri, Sep 23, 2016 at 02:17:10PM +0200, Mike Galbraith wrote: > On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > > Is anybody still using PREEMPT_NONE? Most workloads also care about > > > latency to some extend. Lots of code has

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Mike Galbraith
On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > Is anybody still using PREEMPT_NONE? Most workloads also care about > > latency to some extend. Lots of code has explicit cond_resched() and > > doesn't worry. > > Dunno. But I bet there

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Mike Galbraith
On Fri, 2016-09-23 at 10:00 +0200, Thomas Gleixner wrote: > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > Is anybody still using PREEMPT_NONE? Most workloads also care about > > latency to some extend. Lots of code has explicit cond_resched() and > > doesn't worry. > > Dunno. But I bet there

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Ingo Molnar
* Thomas Gleixner wrote: > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > On Fri, Sep 23, 2016 at 10:00:37AM +0200, Thomas Gleixner wrote: > > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > > It is, might_sleep() implies might_resched(). In fact, that's all what > > > >

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Ingo Molnar
* Thomas Gleixner wrote: > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > On Fri, Sep 23, 2016 at 10:00:37AM +0200, Thomas Gleixner wrote: > > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > > It is, might_sleep() implies might_resched(). In fact, that's all what > > > > PREEMPT_VOLUNTARY

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Thomas Gleixner
On Fri, 23 Sep 2016, Peter Zijlstra wrote: > On Fri, Sep 23, 2016 at 10:00:37AM +0200, Thomas Gleixner wrote: > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > It is, might_sleep() implies might_resched(). In fact, that's all what > > > PREEMPT_VOLUNTARY is, make the might_sleep() debug test

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Thomas Gleixner
On Fri, 23 Sep 2016, Peter Zijlstra wrote: > On Fri, Sep 23, 2016 at 10:00:37AM +0200, Thomas Gleixner wrote: > > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > > It is, might_sleep() implies might_resched(). In fact, that's all what > > > PREEMPT_VOLUNTARY is, make the might_sleep() debug test

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Peter Zijlstra
On Fri, Sep 23, 2016 at 10:00:37AM +0200, Thomas Gleixner wrote: > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > It is, might_sleep() implies might_resched(). In fact, that's all what > > PREEMPT_VOLUNTARY is, make the might_sleep() debug test imply a resched > > point. > > Grr, how intuitive -

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Peter Zijlstra
On Fri, Sep 23, 2016 at 10:00:37AM +0200, Thomas Gleixner wrote: > On Fri, 23 Sep 2016, Peter Zijlstra wrote: > > It is, might_sleep() implies might_resched(). In fact, that's all what > > PREEMPT_VOLUNTARY is, make the might_sleep() debug test imply a resched > > point. > > Grr, how intuitive -

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Thomas Gleixner
On Fri, 23 Sep 2016, Peter Zijlstra wrote: > On Thu, Sep 22, 2016 at 10:59:30PM +0200, Thomas Gleixner wrote: > > On Thu, 22 Sep 2016, Mikulas Patocka wrote: > > > On Mon, 19 Sep 2016, Peter Zijlstra wrote: > > > > > > > On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > > > > > So

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Thomas Gleixner
On Fri, 23 Sep 2016, Peter Zijlstra wrote: > On Thu, Sep 22, 2016 at 10:59:30PM +0200, Thomas Gleixner wrote: > > On Thu, 22 Sep 2016, Mikulas Patocka wrote: > > > On Mon, 19 Sep 2016, Peter Zijlstra wrote: > > > > > > > On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > > > > > So

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Peter Zijlstra
On Thu, Sep 22, 2016 at 10:59:30PM +0200, Thomas Gleixner wrote: > On Thu, 22 Sep 2016, Mikulas Patocka wrote: > > On Mon, 19 Sep 2016, Peter Zijlstra wrote: > > > > > On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > > > > So I'm not sure how this dm-bufio local cond_resched()

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-23 Thread Peter Zijlstra
On Thu, Sep 22, 2016 at 10:59:30PM +0200, Thomas Gleixner wrote: > On Thu, 22 Sep 2016, Mikulas Patocka wrote: > > On Mon, 19 Sep 2016, Peter Zijlstra wrote: > > > > > On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > > > > So I'm not sure how this dm-bufio local cond_resched()

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-22 Thread Thomas Gleixner
On Thu, 22 Sep 2016, Mikulas Patocka wrote: > On Mon, 19 Sep 2016, Peter Zijlstra wrote: > > > On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > > > So I'm not sure how this dm-bufio local cond_resched() wrapper still got > > > in... happy to take your patch. > > > > > > Please

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-22 Thread Thomas Gleixner
On Thu, 22 Sep 2016, Mikulas Patocka wrote: > On Mon, 19 Sep 2016, Peter Zijlstra wrote: > > > On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > > > So I'm not sure how this dm-bufio local cond_resched() wrapper still got > > > in... happy to take your patch. > > > > > > Please

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-22 Thread Mikulas Patocka
On Mon, 19 Sep 2016, Peter Zijlstra wrote: > On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > > So I'm not sure how this dm-bufio local cond_resched() wrapper still got > > in... happy to take your patch. > > > > Please respond with whatever SOB you'd like applied to the patch

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-22 Thread Mikulas Patocka
On Mon, 19 Sep 2016, Peter Zijlstra wrote: > On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > > So I'm not sure how this dm-bufio local cond_resched() wrapper still got > > in... happy to take your patch. > > > > Please respond with whatever SOB you'd like applied to the patch

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-19 Thread Peter Zijlstra
On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > So I'm not sure how this dm-bufio local cond_resched() wrapper still got > in... happy to take your patch. > > Please respond with whatever SOB you'd like applied to the patch header. Sorry, for the delay, here goes. --- Subject:

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-19 Thread Peter Zijlstra
On Tue, Sep 13, 2016 at 09:39:59AM -0400, Mike Snitzer wrote: > So I'm not sure how this dm-bufio local cond_resched() wrapper still got > in... happy to take your patch. > > Please respond with whatever SOB you'd like applied to the patch header. Sorry, for the delay, here goes. --- Subject:

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-19 Thread Peter Zijlstra
On Mon, Sep 19, 2016 at 05:49:07AM -0400, Mikulas Patocka wrote: > > > On Tue, 13 Sep 2016, Peter Zijlstra wrote: > > > Hi all, > > > > While grepping for PREEMPT_VOLUNTARY I ran into dm_bufio_cond_resched() > > and wondered WTH it was about. > > cond_resched() calls _cond_resched() even if

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-19 Thread Peter Zijlstra
On Mon, Sep 19, 2016 at 05:49:07AM -0400, Mikulas Patocka wrote: > > > On Tue, 13 Sep 2016, Peter Zijlstra wrote: > > > Hi all, > > > > While grepping for PREEMPT_VOLUNTARY I ran into dm_bufio_cond_resched() > > and wondered WTH it was about. > > cond_resched() calls _cond_resched() even if

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-19 Thread Mikulas Patocka
On Tue, 13 Sep 2016, Peter Zijlstra wrote: > Hi all, > > While grepping for PREEMPT_VOLUNTARY I ran into dm_bufio_cond_resched() > and wondered WTH it was about. cond_resched() calls _cond_resched() even if when we have a preemptive kernel - with preemptive kernel, calling cond_resched is

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-19 Thread Mikulas Patocka
On Tue, 13 Sep 2016, Peter Zijlstra wrote: > Hi all, > > While grepping for PREEMPT_VOLUNTARY I ran into dm_bufio_cond_resched() > and wondered WTH it was about. cond_resched() calls _cond_resched() even if when we have a preemptive kernel - with preemptive kernel, calling cond_resched is

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-13 Thread Mike Snitzer
On Tue, Sep 13 2016 at 4:45am -0400, Peter Zijlstra wrote: > Hi all, > > While grepping for PREEMPT_VOLUNTARY I ran into dm_bufio_cond_resched() > and wondered WTH it was about. > > Is there anything wrong with the below patch? No, I'll pick it up for 4.9 merge.

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-13 Thread Mike Snitzer
On Tue, Sep 13 2016 at 4:45am -0400, Peter Zijlstra wrote: > Hi all, > > While grepping for PREEMPT_VOLUNTARY I ran into dm_bufio_cond_resched() > and wondered WTH it was about. > > Is there anything wrong with the below patch? No, I'll pick it up for 4.9 merge. Mikulas added it for sparc

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-13 Thread Thomas Gleixner
On Tue, 13 Sep 2016, Peter Zijlstra wrote: > Hi all, > > While grepping for PREEMPT_VOLUNTARY I ran into dm_bufio_cond_resched() > and wondered WTH it was about. > > Is there anything wrong with the below patch? Not at all, except that you forgot to add your SOB to it :) Acked-by: Thomas

Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched()

2016-09-13 Thread Thomas Gleixner
On Tue, 13 Sep 2016, Peter Zijlstra wrote: > Hi all, > > While grepping for PREEMPT_VOLUNTARY I ran into dm_bufio_cond_resched() > and wondered WTH it was about. > > Is there anything wrong with the below patch? Not at all, except that you forgot to add your SOB to it :) Acked-by: Thomas