Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2210418ybf; Mon, 2 Mar 2020 04:17:24 -0800 (PST) X-Google-Smtp-Source: APXvYqy4BSE+Esditk/FR5EO4mpaytTzPaornt/JPEo9iS98J+x7w93pAE/XWZlFbyXbNWgFuSUV X-Received: by 2002:a05:6808:48c:: with SMTP id z12mr10919368oid.92.1583151443990; Mon, 02 Mar 2020 04:17:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583151443; cv=none; d=google.com; s=arc-20160816; b=hVKMcKBN6lC3Bk4K9875xLmdI95Hb1/hW+R/Dekzaxpi4c/8eydB5MYsC5DWSRoav1 qFNZbsWelrW0AeWWUwGtQhDmRkGm7mNqmZUIVFHJ1ouQ17dnqJIutM5IjYEq1fnU71jA 6gnbJh1UkmJLdcTS9IRDKDxguGEEdeUWps70IeIBMVJsUFwp4gKC9fNxasvD0HEjLhbi i3Wn4vAfQ5RJhtM0j2WTL1Fg6eLwcIoW518VMlnfrRmTH1jKnM+FIbe7NQNC6HbAitJv 3AGgSH4OjTjay3uJ7EbPxIKgkTI2V8YlyvidzC0UkIO+x7mFeXqqbfv7tMyr+R5lVH8R 46pA== 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=saQf8udrO5ljQAJSWGGKFC+TWXSS0LQVNPjAb1EGFzg=; b=WjLdlh57FRxSLLXO0/kwwXsDdTkv6aTU6FQ+PugrWZ9zeWroBb9JPW7aSUcbIi/EBZ 443XQcJauUWZ+O7aeIGB60T1HUZ8xfxaPdV+pPop3PCd+DiQz0NQZb7y4GjOsf0PGWaw 4jTYZ38UDSRYIqxG4cjAY+/zaUVYuR8jyprLfQkpvORJS1evCX4u5qMCqyyC07uxzxKp 5HySn4qsyJukQhc4XEe6hwidqlh3KjDCEFGSwHx6k/CcJUpy4p5bCOZDl2TqUOyNivnd AHHdHVuEK0IWTMN37io9PTt7x7ILBvMV5JJFXcLO3135trJSvQsQjUMqPnLbyCuzzjm1 xKLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=Ssu40JyA; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j134si3779593oib.52.2020.03.02.04.17.12; Mon, 02 Mar 2020 04:17: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=@oracle.com header.s=corp-2020-01-29 header.b=Ssu40JyA; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbgCBMRA (ORCPT + 99 others); Mon, 2 Mar 2020 07:17:00 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:45768 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727659AbgCBMRA (ORCPT ); Mon, 2 Mar 2020 07:17:00 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 022CE5HG092421; Mon, 2 Mar 2020 12:16:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=saQf8udrO5ljQAJSWGGKFC+TWXSS0LQVNPjAb1EGFzg=; b=Ssu40JyAUe51lbVP3kGL7jIf+XTK/q7y1tlhtqOFLQNeRDv1tXnE6DzJFh6W0M+2BeXL 2NSMa6g8s66QNbGsW3+p2vC/+Px46zIBHFLCc1B+u00jxxnL4ZiaDUhkByiyL85a7tHl 2FN8mx2sTM+JGzRv+nZU8ugrFgnPLBwkqy2cv5tmvWS+Ct+vGoVR6N1vNzjKwC8UNWNW iXDfoAoXhiMES/+oftcE9lb0nWgblVS5blvH6NSYr6/dSfbE5q5phRIIVUMDq3BppxHv nDKbzMVpuV/ES+qXMkCGSFZxbl0Gz4SmRYHxo68M8iwFs/e74Tz1FS84a3LYsTMAD+F7 cQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2yffwqfbu9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Mar 2020 12:16:56 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 022CD7Ch091345; Mon, 2 Mar 2020 12:16:55 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 2yg1gv073e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Mar 2020 12:16:55 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 022CGrex000594; Mon, 2 Mar 2020 12:16:54 GMT Received: from [192.168.1.14] (/114.88.246.185) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 02 Mar 2020 04:16:52 -0800 Subject: Re: [PATCH] block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices To: Konstantin Khlebnikov , 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> From: Bob Liu Message-ID: <7133c4fb-38d5-cf1f-e259-e12b50efcb32@oracle.com> Date: Mon, 2 Mar 2020 20:16:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <158290150891.4423.13566449569964563258.stgit@buzz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9547 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 suspectscore=18 malwarescore=0 mlxlogscore=999 mlxscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003020093 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9547 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=18 phishscore=0 clxscore=1011 bulkscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003020093 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/28/20 10:51 PM, 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 > 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. > > 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); > > Nitpick.. (PAGE_SHIFT - 9) Reviewed-by: Bob Liu