From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758380AbcIWIED (ORCPT ); Fri, 23 Sep 2016 04:04:03 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:40396 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756152AbcIWIDH (ORCPT ); Fri, 23 Sep 2016 04:03:07 -0400 Date: Fri, 23 Sep 2016 10:00:37 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra 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() In-Reply-To: <20160923073435.GL2794@worktop> Message-ID: References: <20160913084520.GA5012@twins.programming.kicks-ass.net> <20160913133959.GA22833@redhat.com> <20160919105325.GW5016@twins.programming.kicks-ass.net> <20160923073435.GL2794@worktop> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. > > > > > > Why not change it to might_sleep()? - that would be almost equivalent to > > > > You mean might_resched(). might_sleep() is not even remotely equivalent. > > 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! > > > If we call the cond_resched() function in tight loops such as walking all > > > buffers in a list, there may be performance penalty due to the call, so > > > the call should be done only if it is really needed (i.e. in > > > CONFIG_PREEMPT_VOLUNTARY case). > > > > Makes sense. > > 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 are workloads which love it. Thanks, tglx