From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E0C8C433E2 for ; Fri, 11 Sep 2020 11:36:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A73DE221E7 for ; Fri, 11 Sep 2020 11:36:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U16qJ5NM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A73DE221E7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A006E6B0003; Fri, 11 Sep 2020 07:36:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D83E6B0070; Fri, 11 Sep 2020 07:36:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8EC6D6B0072; Fri, 11 Sep 2020 07:36:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id 7ABD86B0003 for ; Fri, 11 Sep 2020 07:36:09 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3FAC28248047 for ; Fri, 11 Sep 2020 11:36:09 +0000 (UTC) X-FDA: 77250576858.22.top81_550a660270ee Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 0D2E318038E6B for ; Fri, 11 Sep 2020 11:36:09 +0000 (UTC) X-HE-Tag: top81_550a660270ee X-Filterd-Recvd-Size: 4368 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Fri, 11 Sep 2020 11:36:08 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id m6so11186292wrn.0 for ; Fri, 11 Sep 2020 04:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=ROqzDYH2GWYM03ZSU07Jdgz37KQwQ40XxoRk8JD+TfA=; b=U16qJ5NMAwDC6g/alubwUiD2DCT0aJtaJaowLTNkDEK02oXkyuE17uyB71I8XjKcUn Oj1V+twOY/oc+NXpqGTg+KEvB+Hhj4rCDQ7+RKHidMWQ8jU1Jrtd2m6v6DPAO/2GMy8D nHL4jQTVt4Chj3q8/u3mVfb17Mo34LmngzIeSzFU1FCTE/sBInI237nHWgS5WTaxzTsF oQpVfGt82Ket8KLic/wKsOhzOd7TfsPWDLT1QlWZv9fqjErjYu91LiOVxBBeyFCk/ZY1 gzrUpRrLZuyge0BsxkP0GNLGPTGvxpABLc4ezQrfMLDd6iSG/r7D65+ZRuDv6gLX/Kvd 4s4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=ROqzDYH2GWYM03ZSU07Jdgz37KQwQ40XxoRk8JD+TfA=; b=gns+QTejzUl9pBH2hO0MZC8iT0bAb5uhFbkpoRxEQn8ma4ZSSU6UPXDJ7P8h/rtjIu ZyHLHyNIl86EPl1IOJ2OZ01poi3VJDrVrt7LY7RsK50VEV7buFTzhVPPOaLB5QUZqpmD l+mquVKpawnKQlYjOmoYa997AKur90AXTFoAOi6qhyxFMyEgdwbKrtQkJi9zOr/+R8xq uxInsmI+kuMixcM+S6DMF0c/fUBC2YXKRjjfMSrxKYFiL5RVB235B4Lk+YYnKTwvHtiS T6lYEP2RXrcnUSu+IVHgltmxsly3E5+wLNQLSVKg30UH2sDLGHBjhxK66dj8jZ5J1HO7 fLGw== X-Gm-Message-State: AOAM532qFViRKJYsCFMox8F8bJGHoDlfHZWjUBypsMsW70yLgibvzAT8 zOohK+6tyEarMueXTYESOSQ= X-Google-Smtp-Source: ABdhPJyOGi2dx1dxviGDvQdJEqt/EeYPVvT2aETHZSh69NTkv1l/vSh40bPwIrPOobBK5Bzc6uZWXg== X-Received: by 2002:adf:e843:: with SMTP id d3mr1610921wrn.290.1599824167385; Fri, 11 Sep 2020 04:36:07 -0700 (PDT) Received: from ubuntu-laptop ([2a01:598:b906:6939:8868:1825:7dd4:faeb]) by smtp.googlemail.com with ESMTPSA id m185sm3899728wmf.5.2020.09.11.04.36.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Sep 2020 04:36:06 -0700 (PDT) Message-ID: Subject: Re: [PATCH RFC] mm: Let readahead submit larger batches of pages in case of ra->ra_pages == 0 From: Bean Huo To: Christoph Hellwig Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, beanhuo@micron.com, Richard Weinberger Date: Fri, 11 Sep 2020 13:36:00 +0200 In-Reply-To: <20200911094709.GB14158@infradead.org> References: <20200904144807.31810-1-huobean@gmail.com> <20200904110938.d9a2cb53a58e67a15c960f47@linux-foundation.org> <20200911094709.GB14158@infradead.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0D2E318038E6B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 2020-09-11 at 10:47 +0100, Christoph Hellwig wrote: > > > Doesn't this defeat the purpose of having ->ra_pages==0? > > > > > > Hi Andrew > > Sorry, I am still not quite understanding your above three > > questions. > > > > Based on my shallow understanding, ra_pages is associated with > > read_ahead_kb. Seems ra_pages controls the maximum read-ahead > > window > > size, but it doesn't work when the requested size exceeds > > ra_pages. > > > > If I set the read_ahead_kb to 0, also, as Christoph mentioned, MTD > > forcibly sets ra_pages to 0. I think the intention is that only > > wants > > to disable read-ahead, however, doesn't want > > generic_file_buffered_read() to split the request and read data > > with > > 4KB chunk size separately. > > They way I understood Richard this is intentional. Hi Christoph Thanks. understood now, MTD expects this result. Even so, I think this patch doesn't impact MTD because the flash-based FS only achieved the readpage. Inside __do_page_cache_readahead will use mapping->a_ops- >readpage to read data. Thanks, Bean