From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752458AbcDZPSE (ORCPT ); Tue, 26 Apr 2016 11:18:04 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:54466 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400AbcDZPSB (ORCPT ); Tue, 26 Apr 2016 11:18:01 -0400 MIME-Version: 1.0 In-Reply-To: <571F7961.4090703@kernel.dk> References: <384a0e0c7d6f2700aadbcbdef003cece88fa7dd7.1461626533.git.shli@fb.com> <571F7961.4090703@kernel.dk> Date: Tue, 26 Apr 2016 23:17:57 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] MD: make bio mergeable From: Ming Lei To: Jens Axboe Cc: Shaohua Li , linux-block@vger.kernel.org, Linux Kernel Mailing List , "open list:SOFTWARE RAID (Multiple Disks) SUPPORT" , Ju Hyung Park , FB Kernel Team , "v4.3+" , Jens Axboe , Neil Brown Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 26, 2016 at 10:21 PM, Jens Axboe wrote: > 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. Just found raid0 maps the chunk sectors into max hw sectors of queue, and dm uses blk_stack_limits() to set up the limits. So looks a raid specific issue, then the fix is correct, sorry for the noise. thanks, Ming