Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3023604pxk; Mon, 7 Sep 2020 00:19:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze0yy3qNSWz1RWP0iLBkYYZkE0p9fipRvP2gz5wtoz//0forv4xCsq/gp4pqTVjeozHGUN X-Received: by 2002:a17:906:e4c:: with SMTP id q12mr19440562eji.425.1599463156346; Mon, 07 Sep 2020 00:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599463156; cv=none; d=google.com; s=arc-20160816; b=UNO2/tq82OCDHfJzt4itP+mh+wHOTSu8giD083etdQmrjcsXlqUVS7D3xu1UXznudr ZQjOyDzbR6rnl4bQoJrizoY3fqgzkhXmupwbQMS5jsAtOJzDm9zTyKnnxbVc/bocYHTv WmhAw3JMofFY+vQYCa+bJEI+lKd8g4qYuSzcpGAgSNZx7lA8WFbwFsQrPsLWfyI4tE7k Uy2auxbBelT1Q/AliePgVlvdwLU9GGVtuk/jQzekOLmFdq+63EEfnRB23Py3kRwbqR51 /oMDV0vcxwt4Ecuw895e3q4iZ3ZcZ+3Z4NJ1RVN8vtiQzxxUcbozSy8L3CbZxSLxA9Ig wL5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=We0sSC8v6x+i+H5IB1utCVAHV7Fxl84IsWXy46L4uYM=; b=icth6wAIcXG0XOc3tiMFbX0PHJ8ltevWgi8245H/71qZrz1reuh9TUrR4YzSqQzenO e7PRP+yjlPl6bhhzGJS0yiATYwMmNbwCfFMx56iCCn7RtFWwCbbIxhkNTxLyK/0m9TC/ +XWfbUQe9v7OWLOYwF3SaCPX8FlS0DmGIMWNTIjDCixJ2N9G601gizQViaAjfjNd86B8 wkUHRmC0eSnZIYPrQKS0oRhVtBGtjNtILmFmxBMlNKDrTYDuXYeG8vJ6Czvm6GzSbblB 89dVMUS2N3yoEwB5Z7FiPY2SAc0mrKsRffSovF59w/2ASxh+9rp3RZotzDO58kGo98Qo zUWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Pbd+9xsT; 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 lc19si9680081ejb.192.2020.09.07.00.18.53; Mon, 07 Sep 2020 00:19:16 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=Pbd+9xsT; 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 S1726841AbgIGHQY (ORCPT + 99 others); Mon, 7 Sep 2020 03:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726781AbgIGHQX (ORCPT ); Mon, 7 Sep 2020 03:16:23 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48330C061574 for ; Mon, 7 Sep 2020 00:16:22 -0700 (PDT) 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=We0sSC8v6x+i+H5IB1utCVAHV7Fxl84IsWXy46L4uYM=; b=Pbd+9xsTy+ypaF0EJnxn5xkUQI Yvh3apado2jso0FhuR30M6SQ4zcmbr72gGJ4DEJVQ0Ul+Hr8xAHblV6jt99emldM+nvwqJ+8NDcic Rf+H9ENRjqUsaC42EJVEbjLKwz7t4QsCuAdrbke0d7m9WgZioZBI8sa3asTgdUd/G3f4HHWO00FWe 8RrfC2kzuN+ST7YxHifWYgkB4K+uMzRMK9NYEjoDZFOAiq0I9rR4xkhD80o9EFME1MVIvS4MKLdPC eBsvfA9l9bKSVDkKmqNIlWMafghDJstAf5B8s71F2aIstErhESfdxAjYgpVju5F3FAhRt9oBANIXy LP9xlhRw==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFBNz-0007Zm-RE; Mon, 07 Sep 2020 07:16:19 +0000 Date: Mon, 7 Sep 2020 08:16:19 +0100 From: Christoph Hellwig To: Bean Huo Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, beanhuo@micron.com, Richard Weinberger , linux-mtd@lists.infradead.org Subject: Re: [PATCH RFC] mm: Let readahead submit larger batches of pages in case of ra->ra_pages == 0 Message-ID: <20200907071619.GA28569@infradead.org> References: <20200904144807.31810-1-huobean@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200904144807.31810-1-huobean@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 04, 2020 at 04:48:07PM +0200, Bean Huo wrote: > From: Bean Huo > > Current generic_file_buffered_read() will break up the larger batches of pages > and read data in single page length in case of ra->ra_pages == 0. This patch is > to allow it to pass the batches of pages down to the device if the supported > maximum IO size >= the requested size. At least ubifs and mtd seem to force ra_pages = 0 to disable read-ahead entirely, so this seems intentional.