Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp390363pxk; Thu, 24 Sep 2020 08:04:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy92+NAGy0p4cv/ww0vN0Y1B/6QwhzJTCL2cx6kLEv2Lc26Oce9ILmxvCYQWyz7fAj+punG X-Received: by 2002:aa7:d4d2:: with SMTP id t18mr327330edr.55.1600959897907; Thu, 24 Sep 2020 08:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600959897; cv=none; d=google.com; s=arc-20160816; b=Lu0N3pmHIEeFxBfkkbgtf2Cb2tvHbWmwpDTNh6giepVeabGruQBN9EBjApfCaQ5x9j Lz1q/jerly05Q7cHyiTt7kcZKBHb9VXNHeRC7P2BFXx5hXwA9vB3bGOgFhk2XmSdCgvx 82IxFBKYLSN/aJfZrS1h78EXWv9Myc4+ABYE3u+mCAPTGvvltuwZ2MEsiwkilywZUNeC ukm3/h95hf7UuGZ0XTFLx3uZ6GPHizBFDEs0KD/ttj2fOVzHpFnsoGLLnKCcWFpHzmtF SHAY3MRW8cYrthTYq7EUlM9nZxT5hbBVNr/9kd97ZkY4ek2e34sedaLJPLHJ1zlC8QI0 QllQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CuPbzvXQosIYzpsTmyDB+PWCFgx3pRZznwdDq166LWs=; b=xMLyUAFIFJ5WaJO3yF0KUS3C4207u0UsuKrbLx7ub2GsZp73jvT+QIuUBp/Ue2NQRU XDPLzBdu3X6Ous6BcxvNRNPjAfN6PZUET7M5XbKfiK4jSF21yT3vLF0wlZOB74Pr8rFU JuTqSaLTXpJRVQYHUVbeV5a6Os1jDWXWiBEm3ikEDsMfBy2WF9Mqf0qRSWoPecfytYp5 NidaSHa4wvBqLAmiJthU08MuLeDve+rI/SuqCW15YHeh6/2R1F1u9DRemxu1uOh+gp6q l9P1YzPu8CZosF/w+D5/A5K9LHxYXAqLbk8sC7kg+9oN1/xbQxrOkWj8oZ/6j+IUj6cB pjyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IKbUluUB; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t23si2219088ejf.457.2020.09.24.08.04.32; Thu, 24 Sep 2020 08:04:57 -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=@redhat.com header.s=mimecast20190719 header.b=IKbUluUB; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728240AbgIXPDb (ORCPT + 99 others); Thu, 24 Sep 2020 11:03:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47985 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728252AbgIXPDa (ORCPT ); Thu, 24 Sep 2020 11:03:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600959809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CuPbzvXQosIYzpsTmyDB+PWCFgx3pRZznwdDq166LWs=; b=IKbUluUBlNINh996O+RKMbH4p1TuesSGuv2sE3xB98vIqE3nYLAdyw9+kt7iDm7BAzNJ1K CG+M8f5Oy9fI5yvidOYu/UJ2xvA9Rs8lEvfXIs77/dUGkBzMkCINAatJAIYR2s8jTfm89t g28a2lipLgQdQp9Rd2uoPMfINmJHzRc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-283-iUJ3YX6mN1eUqjWHfNMFxw-1; Thu, 24 Sep 2020 11:03:27 -0400 X-MC-Unique: iUJ3YX6mN1eUqjWHfNMFxw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C924802B75; Thu, 24 Sep 2020 15:03:24 +0000 (UTC) Received: from localhost (unknown [10.18.25.174]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92FD35C1D7; Thu, 24 Sep 2020 15:03:19 +0000 (UTC) Date: Thu, 24 Sep 2020 11:03:19 -0400 From: Mike Snitzer To: Christoph Hellwig Cc: Jens Axboe , linux-raid@vger.kernel.org, Hans de Goede , Justin Sanders , Minchan Kim , Johannes Thumshirn , cgroups@vger.kernel.org, linux-bcache@vger.kernel.org, Coly Li , linux-block@vger.kernel.org, Song Liu , dm-devel@redhat.com, linux-mtd@lists.infradead.org, Richard Weinberger , drbd-dev@tron.linbit.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/13] block: lift setting the readahead size into the block layer Message-ID: <20200924150318.GE13849@redhat.com> References: <20200924065140.726436-1-hch@lst.de> <20200924065140.726436-8-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924065140.726436-8-hch@lst.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24 2020 at 2:51am -0400, Christoph Hellwig wrote: > 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. > > Signed-off-by: Christoph Hellwig > Acked-by: Coly Li > Reviewed-by: Johannes Thumshirn Thanks for adding blk_queue_update_readahead() Reviewed-by: Mike Snitzer