Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp430773pxk; Thu, 24 Sep 2020 09:01:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvzP2rsmSkc/FRE/3bvVmkaLlEIS7msMsv1xpfAa0M9hY9ilx42yIviJJWybYpq8v77+SJ X-Received: by 2002:a17:906:6ce:: with SMTP id v14mr528327ejb.451.1600963286309; Thu, 24 Sep 2020 09:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600963286; cv=none; d=google.com; s=arc-20160816; b=oVpD6LtPEKIkeI8mi3x8WBrToTQg2E+kR46KdQSfg5pkc7p6kMcnrOS7mPTAzrljai y7cYg4ApaEq1wkhRK+gxpz4x0+ryYPxknNPNh8pXGz2TDcVMFjJVVtQtLGLjSXRGgLVm Qv93WnCyTyxoDr9jd2FgyNgKSxQxA+WECQHvOR5gJTxwplPhQ/lan5uA/UdfnrvY0X+X b5b7rX9OTJOI4U+dIc96cPK5txOlunI2hsVsHGEFdP5xuDL1M4u9j3LIonPN702KBxKv mgAOo1MOLeOJXK6eugHkaeXaMCmYIxtxYozSg3buALZspqrJ3MHwj3ho17IE57RCyp19 IaWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:date:references :message-id:organization:from:subject:cc:to:dkim-signature; bh=coGfpNEvHw1Ww6VMM3AUAr95WYwBGdMfGxQAq7Ut3Eo=; b=kuqAAA6AZT5WHbSppvE7R47U+RO0g+3+qwf1RO+tdgg0LhF15ifgDYb2vNJ2nVc8de B9efz9Jq2KseOxxfxXk/doVf5JpEx8v9g9lhVlZUglEtV9RfzC1yHgy+UgtPDaFd6mPu DIh1VEGYcrMgDmJIy/JPyN8DrkgYiE8wqSg+YKsVfNHF3BJPO3pOkMgabOL0lCcHL2Da OT3sud2fhe+ZwuWFScwEF/j4qYY79k28NIqkX+h6Gso54w5/ZyamFBdxNqtyd6q5WnEP 2LUL0aKnsp2VGAj2UO8NFR+3y+AT3xq0ZZaujx8jFNT25HaIqNSvfncsmAfBTC8R4YQ0 O9uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=td1+RxKd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id q5si2147840eji.118.2020.09.24.09.00.58; Thu, 24 Sep 2020 09:01:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=td1+RxKd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728537AbgIXP5t (ORCPT + 99 others); Thu, 24 Sep 2020 11:57:49 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:58118 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728139AbgIXP5t (ORCPT ); Thu, 24 Sep 2020 11:57:49 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08OFYNF4187938; Thu, 24 Sep 2020 15:57:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : message-id : references : date : in-reply-to : mime-version : content-type; s=corp-2020-01-29; bh=coGfpNEvHw1Ww6VMM3AUAr95WYwBGdMfGxQAq7Ut3Eo=; b=td1+RxKdoLOO2t63uF4zlGVrGlzNX/kncvf9CRu1+Q/Z185II6vOPY7OYVmR00lwbBvB oI39qsaxEsXuhrFRnhPNYadRAzid4vpFVH1DnNrCOUVZGKGLshblg06fbzYwGPztgdZo Z/fUTCgCP16jQ550PJt+VWDuquf6GdVURF+vw2dk3HUNxhFcamf3ZH2BVw0ZfMpJ+5yZ mxpIgUdAVm3QXDHsXihsvYimVL4XmoOEGm2cGgSqGvu3D9jELBR6iVkzSAWn9+LAYCfl ZfTFRr7HESquQPnKqBx6g1RyXHnWraO8Kxaud9pk648QpJJgQ9L9MM7dy9P+I69dS8p3 Iw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 33qcpu62rn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 Sep 2020 15:57:21 +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 08OFUVZ4083297; Thu, 24 Sep 2020 15:57:21 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 33nujr3a74-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Sep 2020 15:57:21 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08OFvJrj021930; Thu, 24 Sep 2020 15:57:19 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Sep 2020 08:57:19 -0700 To: Christoph Hellwig Cc: Jens Axboe , Song Liu , Hans de Goede , Coly Li , Richard Weinberger , Minchan Kim , Johannes Thumshirn , Justin Sanders , linux-mtd@lists.infradead.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@tron.linbit.com, linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: Re: [PATCH 07/13] block: lift setting the readahead size into the block layer From: "Martin K. Petersen" Organization: Oracle Corporation Message-ID: References: <20200924065140.726436-1-hch@lst.de> <20200924065140.726436-8-hch@lst.de> Date: Thu, 24 Sep 2020 11:57:14 -0400 In-Reply-To: <20200924065140.726436-8-hch@lst.de> (Christoph Hellwig's message of "Thu, 24 Sep 2020 08:51:34 +0200") MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9753 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 adultscore=0 spamscore=0 suspectscore=1 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009240118 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9753 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 mlxlogscore=999 adultscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 spamscore=0 malwarescore=0 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009240118 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christoph, > Drivers shouldn't really mess with the readahead size, as that is a VM > concept. Instead set it based on the optimal I/O size by lifting the > algorithm from the md driver when registering the disk. Also set > bdi->io_pages there as well by applying the same scheme based on > max_sectors. To ensure the limits work well for stacking drivers a > new helper is added to update the readahead limits from the block > limits, which is also called from disk_stack_limits. Looks good! Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering