From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id 3085A4204D2 for ; Wed, 22 Jul 2020 09:18:44 +0200 (CEST) Date: Wed, 22 Jul 2020 09:18:09 +0200 From: Christoph Hellwig To: Johannes Thumshirn Message-ID: <20200722071809.GA25816@lst.de> References: <20200722062552.212200-1-hch@lst.de> <20200722062552.212200-7-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Jens Axboe , "linux-raid@vger.kernel.org" , Hans de Goede , Minchan Kim , Richard Weinberger , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , Song Liu , "dm-devel@redhat.com" , "linux-mtd@lists.infradead.org" , "linux-mm@kvack.org" , "linux-fsdevel@vger.kernel.org" , "cgroups@vger.kernel.org" , Christoph Hellwig , "drbd-dev@lists.linbit.com" Subject: Re: [Drbd-dev] [PATCH 06/14] block: lift setting the readahead size into the block layer List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Jul 22, 2020 at 07:13:54AM +0000, Johannes Thumshirn wrote: > On 22/07/2020 08:27, Christoph Hellwig wrote: > > + q->backing_dev_info->ra_pages = > > + max(queue_io_opt(q) * 2 / PAGE_SIZE, VM_READAHEAD_PAGES); > > Dumb question, wouldn't a '>> PAGE_SHIFT' be better instead of a potentially > costly division? > > Or aren't we caring at all as it's a) not in the fast-path and b) compilers > can optimize it to a shift? That's my thinking. If anyone has a strong preference I can change it.