From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched() Date: Fri, 23 Sep 2016 11:26:58 +0200 Message-ID: <20160923092658.GA24285@gmail.com> References: <20160913084520.GA5012@twins.programming.kicks-ass.net> <20160913133959.GA22833@redhat.com> <20160919105325.GW5016@twins.programming.kicks-ass.net> <20160923073435.GL2794@worktop> <20160923090524.GE5008@twins.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Thomas Gleixner Cc: Peter Zijlstra , Mikulas Patocka , Mike Snitzer , Alasdair Kergon , linux-kernel@vger.kernel.org, dm-devel@redhat.com, Joe Thornber List-Id: dm-devel.ids * 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 is, make the might_sleep() debug test imply a resched > > > > point. > > > > > > Grr, how intuitive - NOT! > > > > No, it actually makes sense. Because you 'obviously' only call > > might_sleep() in contexts that should be able to sleep (if not, it'll > > holler). So they're already placed right for preemption. > > I disagree. might_sleep() is commonly known as a debug mechanism and it > existed before the preemption stuff went in. So the easy way to sprinkle > preemption points into the kernel was to hijack might_sleep(). I know it's > historical, but that doesnt make it any more intuitive. If we rename it to might_as_well_sleep() it becomes more intuitive! ;-) Thanks, Ingo