From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752960AbdKWOmh convert rfc822-to-8bit (ORCPT ); Thu, 23 Nov 2017 09:42:37 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:43364 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752904AbdKWOmg (ORCPT ); Thu, 23 Nov 2017 09:42:36 -0500 Date: Thu, 23 Nov 2017 15:42:31 +0100 From: Sebastian Siewior To: Mike Galbraith Cc: Mikulas Patocka , Thomas Gleixner , linux-kernel@vger.kernel.org, Ingo Molnar , Steven Rostedt , linux-rt-users@vger.kernel.org Subject: Re: [PATCH PREEMPT RT] rt-mutex: fix deadlock in device mapper Message-ID: <20171123144231.GD2384@linutronix.de> References: <20171117145744.t366d2ztxj2qqnco@linutronix.de> <1511030230.12841.42.camel@gmx.de> <1511234430.7672.26.camel@gmx.de> <1511255884.7672.49.camel@gmx.de> <1511285619.30074.13.camel@gmx.de> <1511299251.30074.72.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <1511299251.30074.72.camel@gmx.de> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-11-21 22:20:51 [+0100], Mike Galbraith wrote: > On Tue, 2017-11-21 at 14:56 -0500, Mikulas Patocka wrote: > > > > If we don't have any reason why it is needed to unplug block requests when > > a spinlock is taken - so let's not do this. > > That's perfectly fine.  I guess I shouldn't have even mentioned having > encountered unplug at mutex being insufficient. While at it, I intend to drop fs-jbd2-pull-your-plug-when-waiting-for-space.patch from the -RT queue for v4.14 which does --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -116,6 +116,8 @@ void __jbd2_log_wait_for_space(journal_t nblocks = jbd2_space_needed(journal); while (jbd2_log_space_left(journal) < nblocks) { write_unlock(&journal->j_state_lock); + if (current->plug) + io_schedule(); mutex_lock(&journal->j_checkpoint_mutex); /* and is/was probably a workaround for the missing schedule while blocking on mutex/rwsem. > -Mike Sebastian