Received: by 10.223.164.202 with SMTP id h10csp523947wrb; Wed, 22 Nov 2017 10:50:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMbk70fMSIa/Z6flcfvKpDNLlf2Svf8cyOMCnclVlIzNQetgqTIMYZ4jl/yEIUOexwcpY2rl X-Received: by 10.84.141.36 with SMTP id 33mr22469601plu.247.1511376633030; Wed, 22 Nov 2017 10:50:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511376632; cv=none; d=google.com; s=arc-20160816; b=X8JESTC0KHKxXgTP3s3lASwO2+tLch7jr+0SjODH+YOYMBaCWEn/dugr8jzksUXEHq tJlGQ+raXRvnC9Ai33TwaoTN3H2SAJHc1QAou1uw36AeP4zShgASk9OKmDEDdBlktAo/ UsndH9VkOKEqvPr/cjXjHblTfbPTyZpWxv9YA/gnXWQ5s8JTUm0MefJXNx6tpzmctwsL oZTGyJQDkcCf9NrqbTYpPckuM5GhpxvIhTW3sb+x8gSf59KtQI9vSOlKXtwoB5hU4gJ7 jH9LZzqFMP0V2RsjvFrVtNomnxPrCkdwl97Wc7YPQphYhZX8r7VCyq2USdhkrtb9O4b7 jcog== 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=WByZT0Gvv6nROdtomcmCU6/Pr7vcun+wkHUR+iZhaZQ=; b=mKAdGHpOdyXM/ZQk4ZFZ5HESPwnk2+ViuYFEe8lPZ2UEEyfX1669dq5AVDlDLvEtEg 1/2HNfaZ4Y/pQ8Kbb5RFHj5L8RIiet8cHfTous+/ZWKdfY7JhGAcPFwCdaWCAHc4NJLL 4kDl/mLPfwRhxKFtRbeAAXKOJVZV6Eti2Zfsj6FAFIwijvAKxtALjx2hlrlK10Y2uvUc NvWdjigu9Yto2HtIG9j0VSGxcPIPY2DniejU9LtxqThiepUcl6OSaEeAiAvug9sQTMYc TWBIn3bROBfcKxgF9qCPR6CfTTwyYwn87K8H2K2pa9xVsamO7dx5w3E9xI9WrO8GuZUJ VBvA== 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 w16si14000471pge.298.2017.11.22.10.50.20; Wed, 22 Nov 2017 10:50:32 -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 S1751865AbdKVStg (ORCPT + 78 others); Wed, 22 Nov 2017 13:49:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9209 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbdKVStf (ORCPT ); Wed, 22 Nov 2017 13:49:35 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F377F70D7F; Wed, 22 Nov 2017 18:49:34 +0000 (UTC) Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DDFEE60FB4; Wed, 22 Nov 2017 18:49:32 +0000 (UTC) Date: Wed, 22 Nov 2017 13:49:31 -0500 From: Mike Snitzer To: Mikulas Patocka Cc: NeilBrown , Jens Axboe , "linux-kernel@vger.kernel.org" , linux-block@vger.kernel.org, device-mapper development , Zdenek Kabelac Subject: Re: new patchset to eliminate DM's use of BIOSET_NEED_RESCUER Message-ID: <20171122184931.GA28348@redhat.com> References: <87a7zg31vx.fsf@notabene.neil.brown.name> <20171121013533.GA14520@redhat.com> <20171121121049.GA17014@redhat.com> <20171121124311.GA17243@redhat.com> <20171121194709.GA18903@redhat.com> <20171121225119.GA19630@redhat.com> <87bmjv0xos.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 22 Nov 2017 18:49:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 22 2017 at 1:24pm -0500, Mikulas Patocka wrote: > Another problem is this: > > struct bio *b = bio_clone_bioset(bio, GFP_NOIO, md->queue->bio_split); > bio_advance(b, (bio_sectors(b) - ci.sector_count) << 9); > bio_chain(b, bio); > > What if it blocks because the bioset is exhausted? > > The code basically builds a chain of bios of unlimited length (suppose for > example a case when we are splitting on every sector boundary, so there > will be one bio for every sector in the original bio), it could exhaust > the bioset easily. > > It would be better to use mechanism from md-raid that chains all the > sub-bios to the same master bio and doesn't create long chains of bios: > > if (max_sectors < bio_sectors(bio)) { > struct bio *split = bio_split(bio, max_sectors, > gfp, conf->bio_split); > bio_chain(split, bio); > generic_make_request(bio); > bio = split; > r1_bio->master_bio = bio; > r1_bio->sectors = max_sectors; > } I'd be happy to take an incremental patch that improves on this commit: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.16&id=b46d6a08f1ae7bf53e4cde28e0ccdf91567d432e But short of that I'll have to come back to this. Thanks, Mike From 1584791719260735570@xxx Wed Nov 22 18:25:59 +0000 2017 X-GM-THRID: 1584717880005758635 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread