Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755695AbbFONb1 (ORCPT ); Mon, 15 Jun 2015 09:31:27 -0400 Received: from smtpbg302.qq.com ([184.105.206.27]:57418 "EHLO smtpbg302.qq.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754089AbbFONbT (ORCPT ); Mon, 15 Jun 2015 09:31:19 -0400 X-Greylist: delayed 431 seconds by postgrey-1.27 at vger.kernel.org; Mon, 15 Jun 2015 09:31:19 EDT X-QQ-mid: bizesmtp10t1434374616t211t14 X-QQ-SSF: 0140000000000010F322000A0000000 X-QQ-FEAT: 0IrakC4z2PSOsyDyihi3Iq9+6+r8N4Z7QXhRWIBLymD+rjeKLI0aXQG3GI0JJ 1RTi4U9kMWGpRP+Kadfp6/B6Sv6z2hEOURcCCppGwkTlFA7341aRqF4wEJf9RG4eaoEzGL+ sdrTSxPqCTq6h3Knxn+KOjvnNj7EGkwsXXzzFQKpRZfmiFF8eEZ1+ey1w2kPlJg4/WP1/jo rbILt3XCLxaaYdBIjeJthGCHFb6srk3KYZ73aQ8bVLw== X-QQ-GoodBg: 2 Message-ID: <557ED1D4.20605@unitedstack.com> Date: Mon, 15 Jun 2015 21:23:32 +0800 From: juncheng bai User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ilya Dryomov CC: idryomov@redhat.com, Alex Elder , Josh Durgin , lucienchao@gmail.com, jeff@garzik.org, yehuda@hq.newdream.net, Sage Weil , elder@inktank.com, "linux-kernel@vger.kernel.org" , Ceph Development Subject: Re: [PATCH RFC] storage:rbd: make the size of request is equal to the, size of the object References: <557EB47F.6090708@unitedstack.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-QQ-SENDSIZE: 520 X-QQ-FName: 2075737CFF9440D8B52C9FFD36C45D4A X-QQ-LocalIP: 163.177.66.155 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2754 Lines: 66 On 2015/6/15 21:03, Ilya Dryomov wrote: > On Mon, Jun 15, 2015 at 2:18 PM, juncheng bai > wrote: >> From 6213215bd19926d1063d4e01a248107dab8a899b Mon Sep 17 00:00:00 2001 >> From: juncheng bai >> Date: Mon, 15 Jun 2015 18:34:00 +0800 >> Subject: [PATCH] storage:rbd: make the size of request is equal to the >> size of the object >> >> ensures that the merged size of request can achieve the size of >> the object. >> when merge a bio to request or merge a request to request, the >> sum of the segment number of the current request and the segment >> number of the bio is not greater than the max segments of the request, >> so the max size of request is 512k if the max segments of request is >> BLK_MAX_SEGMENTS. >> >> Signed-off-by: juncheng bai >> --- >> drivers/block/rbd.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c >> index 0a54c58..dec6045 100644 >> --- a/drivers/block/rbd.c >> +++ b/drivers/block/rbd.c >> @@ -3757,6 +3757,8 @@ static int rbd_init_disk(struct rbd_device *rbd_dev) >> segment_size = rbd_obj_bytes(&rbd_dev->header); >> blk_queue_max_hw_sectors(q, segment_size / SECTOR_SIZE); >> blk_queue_max_segment_size(q, segment_size); >> + if (segment_size > BLK_MAX_SEGMENTS * PAGE_SIZE) >> + blk_queue_max_segments(q, segment_size / PAGE_SIZE); >> blk_queue_io_min(q, segment_size); >> blk_queue_io_opt(q, segment_size); > > I made a similar patch on Friday, investigating blk-mq plugging issue > reported by Nick. My patch sets it to BIO_MAX_PAGES unconditionally - > AFAIU there is no point in setting to anything bigger since the bios > will be clipped to that number of vecs. Given that BIO_MAX_PAGES is > 256, this gives is 1M direct I/Os. Hi. For signal bio, the max number of bio_vec is BIO_MAX_PAGES, but a request can be merged from multiple bios. We can see the below function: ll_back_merge_fn, ll_front_merge_fn and etc. And I test in kernel 3.18 use this patch, and do: echo 4096 > /sys/block/rbd0/queue/max_sectors_kb We use systemtap to trace the request size, It is upto 4M. Thanks. --------- juncheng bai > > Thanks, > > Ilya > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/