Received: by 10.223.164.202 with SMTP id h10csp5570037wrb; Tue, 21 Nov 2017 11:51:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMYkRsVrC2B2PERLW1d2Ll4udL+QlANuXcgzhJjpOB7q84fZwXkLoPRdifn4ARSNOPhQH9/N X-Received: by 10.98.102.219 with SMTP id s88mr16595996pfj.191.1511293881143; Tue, 21 Nov 2017 11:51:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511293881; cv=none; d=google.com; s=arc-20160816; b=eFrLOWagS+F0/fWzkyhxdWgmh/7YQwI/hrTqyaCpQl6v9iLGH4vgXXOrtI0QsvhNyG AFq8OwVwWNCQeFRxHM/aVgc2aqo4Y0Dm+5W3DNU46C9KcVS3FgampXXgfV11afUd/zf2 SPKTvRtEVjIY9lfzRuNopvW682KYTbpO7RJ1R4AHtA/lP3oolx2zVsJaDQKFYf9NQps1 +xOgNUJqN63vwXjLdkPkU6pYdZBx9Wc6AH4HBPkUOuvKS85d8w3TSUsN3Gg9S+BUVfDL 4WxcmLImiDkNO3vNjPfMN+fMwF5073sl3PoSd6gVBiJfe0HKLXgHwDI1hrSZ+r5Gnm7J FPEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=/1Bw1zApb8YH5G4Xjpt2eoAQBPJVbbrz0x8pPSA+r2Q=; b=fPCirDD5FcFDWwKxjCWUCdKck5La3n/jlzl93Dw85atIvccPtASzkOl3pOfnLQafbd 1kVZW9upCWf+8pNKLFeAK3kLhQS7zvkrpFrwyZMT5/dSTXWzN2OY1UwD19k8o110JjBX zgG/tPk/LtSczRWbxpq6/XcihqARz4Vp2QXEgm0B5642ob9zWBFTpzh2bj26m26rttCq rX4pbs/Z92DVH5HnlhxnSz+hVxM/2JMp/vw/wYCB4F0ZCs1YdvTeq7WpAB3+mzK81Qc4 Fr3cXpyjCmfDW57SlRcR4+Ks9DLnvkN38uceOGQsqhaXWL9vs237R265Kfvt3SZwtOAw ofDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si11287466pll.406.2017.11.21.11.51.09; Tue, 21 Nov 2017 11:51:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751413AbdKUTuc (ORCPT + 76 others); Tue, 21 Nov 2017 14:50:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44818 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751234AbdKUTub (ORCPT ); Tue, 21 Nov 2017 14:50:31 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2DFCF883A2; Tue, 21 Nov 2017 19:50:31 +0000 (UTC) Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEC02620A3; Tue, 21 Nov 2017 19:50:28 +0000 (UTC) Date: Tue, 21 Nov 2017 14:50:27 -0500 From: Mike Snitzer To: NeilBrown Cc: Jens Axboe , linux-block@vger.kernel.org, device-mapper development , "linux-kernel@vger.kernel.org" , Zdenek Kabelac Subject: Re: [PATCH 00/13] block: assorted cleanup for bio splitting and cloning. Message-ID: <20171121195027.GB18903@redhat.com> References: <149776047907.23258.8058071140236879834.stgit@noble> <20170618184143.GA10920@kernel.dk> <87poe13rmm.fsf@notabene.neil.brown.name> <87a7zg31vx.fsf@notabene.neil.brown.name> <20171121013533.GA14520@redhat.com> <20171121121049.GA17014@redhat.com> <87zi7f1koo.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zi7f1koo.fsf@notabene.neil.brown.name> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 21 Nov 2017 19:50:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 21 2017 at 2:44pm -0500, NeilBrown wrote: > On Tue, Nov 21 2017, Mike Snitzer wrote: > > > On Mon, Nov 20 2017 at 8:35pm -0500, > > Mike Snitzer wrote: > > > >> On Mon, Nov 20 2017 at 7:34pm -0500, > >> NeilBrown wrote: > >> > >> > On Mon, Nov 20 2017, Mike Snitzer wrote: > >> > > >> > > > >> > > But I've now queued this patch for once Linus gets back (reverts DM > >> > > changes from commit 47e0fb461f): > >> > > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=c9fdc42ba23eabd1ba7aef199fb9bb4b4fe5c545 > >> > > >> > This patch does two things. > >> > 1/ It removes the BIOSET_NEED_RESCUER flag from biosets created by dm. > >> > This a functional changed over the code from before my patches. > >> > Previously, all biosets were given a rescuer thread. > >> > After my patch set, biosets only got a rescuer thread if > >> > BIOSET_NEED_RESCUER was passed, and it was passed for all biosets. > >> > I then removed it from places were I was certain it wasn't needed. > >> > I didn't remove it from dm because I wasn't certain. Your > >> > patch does remove the flags, which I think is incorrect - see below. > > > > Yeap, definitely was incorrect. I've dropped the patch. > > > >> > 2/ It changes flush_current_bio_list() so that bios allocated from a > >> > bioset that does not have a rescue_workqueue are now added to > >> > the ->rescue_list for their bio_set, and ->rescue_work is queued > >> > on the NULL ->rescue_workqueue, resulting in a NULL dereference. > >> > I suspect you don't want this. > > > > Yes, I see that now. > > > >> > The patch description claims that the patch fixes something, but it > >> > isn't clear to me what it is meant to be fixing. > >> > > >> > It makes reference to dbba42d8 which is described as removing an unused > >> > bioset process, though what it actually does is remove an used bioset > >> > (and obvious the process disappears with it). My patch doesn't change > >> > that behavior. > >> > >> Well I looked at this because Zdenek reported that with more recent > >> kernels he is seeing the "bioset" per DM device again (whereas it was > >> thought to be removed with mikulas' commit dbba42d8 -- but that commit > >> removed "bioset" only in terms of q->bio_split. > > > > I think Zdenek triggered a false-positive that DM had magically sprouted > > a new "bioset" rescue_workqueue. Reality is I cannot see how each > > bio-based DM device can avoid having one. And the commit d67a5f4b59 > > ("dm: flush queued bios when process blocks to avoid deadlock") I > > referenced earlier very much makes DM depend on it even more. > > > > So apologies for being so off-base (by looking to prematurely revert > > DM's use of BIOSET_NEED_RESCUER, etc). > > > >> > Please see > >> > https://www.redhat.com/archives/dm-devel/2017-August/msg00310.html > > > > I'll very likely pick these up for 4.16 shortly. But hope to work > > through complete removal of DM's use of BIOSET_NEED_RESCUER for 4.16 as > > well. > > > >> > and > >> > https://www.redhat.com/archives/dm-devel/2017-August/msg00315.html > > > > This one [1] needs a lot of review and testing. Particularly against this > > test case that Mikulas created to reproduce the snapshot deadlock (same > > deadlock that motivated commit dbba42d8): > > https://www.redhat.com/archives/dm-devel/2017-January/msg00064.html > > Thanks for that link. I'll try to make time to experiment with the test > code and confirm my proposed approach doesn't break it. > > > > >> > for which the thread continues: > >> > https://www.redhat.com/archives/dm-devel/2017-September/msg00001.html > > > > Wish I could clone myself (or Kent, the world needs 2 Kents!) and pursue > > this: https://www.redhat.com/archives/dm-devel/2014-May/msg00100.html > > In that email Kent mentions "punt off to a per request_queue workqueue". > > That "per request_queue workqueue" is what I'm trying to get rid of. I > don't think this is a good direction. > > > > > Short of that, how would you like to proceed? > > I'd like to confirm that my approach > 1/ doesn't re-introduce a deadlock > 2/ doesn't hurt performance > and then merge it. > > Though to be honest, I don't recall exactly what "my approach" is. > Your next email picks out two important patches which probably cover > it. If/when I get to do the testing I'll let you know how it goes. I _think_ I've done the heavy lifting of what you likely had in mind ( please see: https://lkml.org/lkml/2017/11/21/567 ) Now what is left is another once-over from you to verify you're happy with the code and patch headers, etc. Mike From 1584706104908218006@xxx Tue Nov 21 19:45:11 +0000 2017 X-GM-THRID: 1584604171498468833 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread