Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752049AbcDZOV1 (ORCPT ); Tue, 26 Apr 2016 10:21:27 -0400 Received: from mail-io0-f169.google.com ([209.85.223.169]:35063 "EHLO mail-io0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751101AbcDZOVY (ORCPT ); Tue, 26 Apr 2016 10:21:24 -0400 Subject: Re: [PATCH] MD: make bio mergeable To: Ming Lei , Shaohua Li References: <384a0e0c7d6f2700aadbcbdef003cece88fa7dd7.1461626533.git.shli@fb.com> Cc: linux-block@vger.kernel.org, Linux Kernel Mailing List , "open list:SOFTWARE RAID (Multiple Disks) SUPPORT" , qkrwngud825@gmail.com, FB Kernel Team , "v4.3+" , Jens Axboe , Neil Brown From: Jens Axboe Message-ID: <571F7961.4090703@kernel.dk> Date: Tue, 26 Apr 2016 08:21:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 835 Lines: 17 On 04/26/2016 03:56 AM, Ming Lei wrote: > On Tue, Apr 26, 2016 at 7:52 AM, Shaohua Li wrote: >> blk_queue_split marks bio unmergeable, which makes sense for normal bio. >> But if dispatching the bio to underlayer disk, the blk_queue_split >> checks are invalid, hence it's possible the bio becomes mergeable. > > If the bio from md is splitted and marked as NOMERGE, it means some > queue limits are reached. So looks the raid's queue limit is set as not > big enough, could your find which limit causes the splitting and nomerge? raid0 sets a limit of the stripe size for IO. Once the IO has passed md, there's no reason why we can't merge for the lower driver. This is (potentially) a huge performance issue on trim, since a lot of devices are trim ops / sec limited rather than throughput limited. -- Jens Axboe