Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1242852pxu; Thu, 17 Dec 2020 05:47:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5/vjdLezgCZ9l12hdxaE5wHUi+fA2d/TJb47aOAQlHCLAJ10IvJWtRCXt4B1ivnNi4unX X-Received: by 2002:a17:906:9acc:: with SMTP id ah12mr34337858ejc.386.1608212867349; Thu, 17 Dec 2020 05:47:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608212867; cv=none; d=google.com; s=arc-20160816; b=mUYDVCKLogSXL5EAix25usJ3uIdduCHRwJ806xjAqpY6Bya69I3DdWOtkI46oWlNtC pjZ0tSXsvDuoIpIdQ/5a+kjXWs76rjvmq5VciOObCHITes1V+ThaWhLYRTIFP71VDbA2 rhR32xZaHnYE1mfo+buhm/vXAN1HV++eWFuhrr/QrsmEi4SkxrVaMK9wqyguEVZo1hZi 9kpqJ6PoPRFLKytfw0Yh19T+qvtW9ckwO2zPwRXdJGrEBvT2ZdpodTlTAM/Uor4uqVjf rz0ehsMSiFe36QbqZZuOFWqCILdgvXuvqCDr3AShwTkl7gtYgSe9LJ9A1Z3aQOq4onDQ ldLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/8lQifGcjmxPMERF4ubMZzEbBgP5tWrAqrwbgQG01/Q=; b=0nQ0jglJQKZHOgky1cxhCvyMZZwDPyQQjmT9v6yG1rmPpcXMxEFZ0rIZXGw1a2efLr eLqh8PtwyXAacbpRx/Rrq/OkwA2hhgkP3QxSkmV6Sb8aTncfY6OoG0/f/0Dw3DSXSeqd Pg9LtCftgpv2y+l/hac5yDlOuLu8IJhUx4hBNEDpKlyceamqwVt99Zfv76FYtzy89Eag VusIWGZxqFUr+Zce17+I/JXStEtI2bdIXj1UW6fx155m7cNUQOWPctfzYlhpS8QfDMUX KOzjsYym2iSY2PUiaGPr0nJET6pB/dcN7kEngbRET1G9j/nXiWxQfEzoynyDooJ8bilf pL3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Tv+BEuMq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si4464158edf.510.2020.12.17.05.47.24; Thu, 17 Dec 2020 05:47:47 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=Tv+BEuMq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728117AbgLQNnf (ORCPT + 99 others); Thu, 17 Dec 2020 08:43:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727368AbgLQNnf (ORCPT ); Thu, 17 Dec 2020 08:43:35 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10F71C06138C; Thu, 17 Dec 2020 05:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/8lQifGcjmxPMERF4ubMZzEbBgP5tWrAqrwbgQG01/Q=; b=Tv+BEuMqTd/K8WVZLQxLEiXPdc CbKWGO9BGErSn3G2Jeh+1mBevLNLruQHGH3OzLxjSBBNIUm1jtVC2/mQqJsVp1lCuO3q2HnOBFuOe ee1MfduWiDzTiTOMQsdlsoSzRpQN9PO0lMThLySdyOv6HkbS+kn77PnocNCBPDXIbxwJcFRHdG0au JYPaUNktkRHv+oCpEwJvMRbIFmBygMOhkPKuoNzeDQ4OS5IV7qAZ4odKbRf525DB+duDogeNqUGl2 Y0adOedGYl8Z6f/I2TAjvwDcV3a57S3lny6A4G3AjEc0/pHUJvXCNWKsKBK+2jc9uN8WY0kp0Col6 B9LozgGg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kptYT-0006kd-IQ; Thu, 17 Dec 2020 13:42:53 +0000 Date: Thu, 17 Dec 2020 13:42:53 +0000 From: Matthew Wilcox To: John Hubbard Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 18/25] btrfs: Use readahead_batch_length Message-ID: <20201217134253.GE15600@casper.infradead.org> References: <20201216182335.27227-1-willy@infradead.org> <20201216182335.27227-19-willy@infradead.org> <20201217121246.GD15600@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201217121246.GD15600@casper.infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 17, 2020 at 12:12:46PM +0000, Matthew Wilcox wrote: > ehh ... probably an off-by-one. Does subtracting 1 from contig_end fix it? > I'll spool up a test VM shortly and try it out. Yes, this fixed it: - u64 contig_end = contig_start + readahead_batch_length(rac); + u64 contig_end = contig_start + readahead_batch_length(rac) - 1;