From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965609AbcIWJFb (ORCPT ); Fri, 23 Sep 2016 05:05:31 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:43829 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753233AbcIWJF1 (ORCPT ); Fri, 23 Sep 2016 05:05:27 -0400 Date: Fri, 23 Sep 2016 11:05:24 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: Mikulas Patocka , Mike Snitzer , Alasdair Kergon , Ingo Molnar , linux-kernel@vger.kernel.org, dm-devel@redhat.com, Joe Thornber Subject: Re: [RFC][PATCH] dm: Remove dm_bufio_cond_resched() Message-ID: <20160923090524.GE5008@twins.programming.kicks-ass.net> References: <20160913084520.GA5012@twins.programming.kicks-ass.net> <20160913133959.GA22833@redhat.com> <20160919105325.GW5016@twins.programming.kicks-ass.net> <20160923073435.GL2794@worktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.