Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2141485ybf; Mon, 2 Mar 2020 02:52:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyAUAS2XiC+IrZw2BUpfAliuN1r5LbSrKDam+6ZuAXkhXVJmPmblu1/YRTGSji3yz8adrVD X-Received: by 2002:aca:ebcf:: with SMTP id j198mr9503964oih.115.1583146343630; Mon, 02 Mar 2020 02:52:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583146343; cv=none; d=google.com; s=arc-20160816; b=EeO/pQF98fmtRkfidwd7niHtYEMw//N3315DPkwHdwRy3ZFWFBjOg866qkZpOPSsq5 1NVDr/mNpcdD17oKuBPCy7PXVkyolGZPs1dXbAErJ4s1mqw+1oedfwiEjeCrg8veNyqU 4VOYzsBC74crpten8uAK/Por9s1pPgMD2nmZdunXQirLmdn8BfOp0LQ6Dadz5uuHpYcG 67TZcC9OsjO97/6ko2kNYyxUblgxET66mDZo+W/Z1Sf7Fe69FrX21Xew8B0YRzqWHCLf y9+B6p49T9IxgUD5ECUbEjRMBu9Z3TWf5kzD4FCGNEsm6+h6QFM0bvjBQFvZytYo5zc0 +heg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=c8nRtiIQTy0hYZDBROc/llu6uiBzaMtKduryGQp4LBA=; b=cK2vLftWGF1Ik5n9YDrjlks4g/B89YVvT+kUmCx0IUTqbtUDdhpS/6CwAWFnqBsSFv jGwp8zHZymPWfxLc7LEWpzIsWEson3+x/O/t8JYBCxhcA4zqE/YQwrWCtTBLJkmUUILx hJadARu6zFDRpCiHcTOp/P/0w9B//WB5u9r00rKvNkySenWCe2vhNMHoungPXwr+DPX4 RZ1xKkIryieOOq9C+cQQSTcov0XG2y1nFyDDgNPI//zJk3zplXB2bhY05sfbN/ViP+5D UlOuwK9Rt/1CyoIraizA+ZWV9aE8OxRpfLVamPcLqMbSUHmDXXfHqy1rz+iXrWeNi8LO CsnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex-team.ru header.s=default header.b=gCBpS1Km; 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=pass (p=NONE sp=NONE dis=NONE) header.from=yandex-team.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x136si5457965oif.122.2020.03.02.02.52.02; Mon, 02 Mar 2020 02:52:23 -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; dkim=pass header.i=@yandex-team.ru header.s=default header.b=gCBpS1Km; 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=pass (p=NONE sp=NONE dis=NONE) header.from=yandex-team.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727672AbgCBKvz (ORCPT + 99 others); Mon, 2 Mar 2020 05:51:55 -0500 Received: from forwardcorp1o.mail.yandex.net ([95.108.205.193]:53838 "EHLO forwardcorp1o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727027AbgCBKvy (ORCPT ); Mon, 2 Mar 2020 05:51:54 -0500 Received: from mxbackcorp1g.mail.yandex.net (mxbackcorp1g.mail.yandex.net [IPv6:2a02:6b8:0:1402::301]) by forwardcorp1o.mail.yandex.net (Yandex) with ESMTP id 1AEC12E09C5; Mon, 2 Mar 2020 13:51:51 +0300 (MSK) Received: from myt4-18a966dbd9be.qloud-c.yandex.net (myt4-18a966dbd9be.qloud-c.yandex.net [2a02:6b8:c00:12ad:0:640:18a9:66db]) by mxbackcorp1g.mail.yandex.net (mxbackcorp/Yandex) with ESMTP id xzrWdUQQnx-pox8C8xr; Mon, 02 Mar 2020 13:51:51 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1583146311; bh=c8nRtiIQTy0hYZDBROc/llu6uiBzaMtKduryGQp4LBA=; h=In-Reply-To:Message-ID:From:Date:References:To:Subject:Cc; b=gCBpS1KmIO8HmVRphH0wt2/ehafdwEXHTQvpI1t/jpszIVkKnQ4W8mDmJfxzFGbTD nvs85msRPN7O6gHUcZeh3uWlwzUE6B10eiF2RgrFmSrxpVSSeSm7rjNGIi9gbHQR8J bUuXSS0nTTxOeYwPM2hhd4BPO88uD7rmLcAssvsI= Authentication-Results: mxbackcorp1g.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from dynamic-red.dhcp.yndx.net (dynamic-red.dhcp.yndx.net [2a02:6b8:0:40c:7cd4:25a8:c7e3:39e2]) by myt4-18a966dbd9be.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id 1HkcgWlnvl-poWebbTs; Mon, 02 Mar 2020 13:51:50 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Subject: Re: [PATCH] block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices To: Paul Menzel , linux-block@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-raid@vger.kernel.org, Song Liu , Dmitry Monakhov References: <158290150891.4423.13566449569964563258.stgit@buzz> <35ef813c-d5a4-8eb8-073d-9c5814266299@molgen.mpg.de> From: Konstantin Khlebnikov Message-ID: <4ce1ccf2-6a7c-818d-bfe3-b9bf29e8be3e@yandex-team.ru> Date: Mon, 2 Mar 2020 13:51:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <35ef813c-d5a4-8eb8-073d-9c5814266299@molgen.mpg.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/03/2020 13.41, Paul Menzel wrote: > Dear Konstantin, > > > Thank you for the patch. > > > On 2020-02-28 15:51, Konstantin Khlebnikov wrote: >> Field bdi->io_pages added in commit 9491ae4aade6 ("mm: don't cap request >> size based on read-ahead setting") removes unneeded split of read requests. >> >> Stacked drivers do not call blk_queue_max_hw_sectors(). Instead they setup > > The verb is spelled with a space *set up*. > >> limits of their devices by blk_set_stacking_limits() + disk_stack_limits(). >> Field bio->io_pages stays zero until user set max_sectors_kb via sysfs. >> >> This patch updates io_pages after merging limits in disk_stack_limits(). >> >> Commit c6d6e9b0f6b4 ("dm: do not allow readahead to limit IO size") fixed >> the same problem for device-mapper devices, this one fixes MD RAIDs. > > Add a Fixes: tag? > > Fixes: 9491ae4aade6 ("mm: don't cap request size based on read-ahead setting") Maybe, but this isn't fatal bug. Just incomplete fix. Same problem exists for non-disk BDIs. I.e. network filesystem must set io_pages manually if doesn't want split read requests. > >> Signed-off-by: Konstantin Khlebnikov >> --- >> block/blk-settings.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/block/blk-settings.c b/block/blk-settings.c >> index c8eda2e7b91e..66c45fd79545 100644 >> --- a/block/blk-settings.c >> +++ b/block/blk-settings.c >> @@ -664,6 +664,8 @@ void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, >> printk(KERN_NOTICE "%s: Warning: Device %s is misaligned\n", >> top, bottom); >> } >> + >> + t->backing_dev_info->io_pages = t->limits.max_sectors >> (PAGE_SHIFT-9); >> } >> EXPORT_SYMBOL(disk_stack_limits); > > Reviewed-by: Paul Menzel > > > Kind regards, > > Paul >