From owner-freebsd-scsi@freebsd.org Tue Dec 22 09:51:39 2015 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FE90A4E183 for ; Tue, 22 Dec 2015 09:51:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C557E125C for ; Tue, 22 Dec 2015 09:51:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tBM9pWhT001639 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 22 Dec 2015 11:51:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tBM9pWhT001639 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tBM9pVX0001638; Tue, 22 Dec 2015 11:51:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 22 Dec 2015 11:51:31 +0200 From: Konstantin Belousov To: Max Gurtovoy Cc: Sagi Grimberg , Sagi Grimberg , freebsd-scsi@freebsd.org, Hans Petter Selasky , Oren Duer Subject: Re: splitting iovecs to bios Message-ID: <20151222095131.GJ3625@kib.kiev.ua> References: <56696E03.8050202@mellanox.com> <20151210150210.GY82577@kib.kiev.ua> <566D2C91.9050900@dev.mellanox.co.il> <567919D3.6050004@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <567919D3.6050004@mellanox.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 09:51:39 -0000 On Tue, Dec 22, 2015 at 11:37:23AM +0200, Max Gurtovoy wrote: > Hi Konstantin, > > > > >> There might be indeed a reason, it could be that some drivers expect > >> blocking to be done by the userspace. The drivers could have some > >> restrictions on transfer sizes and atomicity of transfer, which would > >> be broken by the unconditional merge. I cannot give you an example > >> of such driver, known block-aware drivers like sa(4) only require the > >> bio size to be multiple of the basic block size. > > > > I'm surprised to learn that the generic access layer splits IO requests > > just because some block drivers cannot handle it. I'd expect that this > > sort of limitation would be communicated by the drivers in the form of > > device flag SI_NOMERGE. > > > >> OTOH, I see no issue with adding a SI_PHYSIOMERGE flag and doing the > >> merges for the driver in physio(), when unmapped request has consequtive > >> iov elements ending and starting at the page boundary. > > > > I'd say it should be the other way around, physio would always strive > > to append/merge iov elements but wouldn't in case the device does not > > support it. Moreover, some modern devices does not even require the page > > boundary alignment you mentioned. These devices can execute IO to/from > > any arbitrary scatter list of buffers. > > Do you know if this issue is on someone's plate ? > If it doesn't, maybe we can try to advance it and start implementing > some solutions. > As I said earlier and as Sagi mentioned, this feature can improve the > performance of modern devices. Sure, feel free to implement it. If you need a help, just ask.