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=-0.8 required=3.0 tests=BAYES_00,DATE_IN_PAST_96_XX, 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 343E2C4361A for ; Sat, 5 Dec 2020 11:04:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A355B22DFA for ; Sat, 5 Dec 2020 11:04:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A355B22DFA 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 8913F6B0036; Sat, 5 Dec 2020 06:04:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 841BD6B005D; Sat, 5 Dec 2020 06:04:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 731B06B0068; Sat, 5 Dec 2020 06:04:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id 5960F6B0036 for ; Sat, 5 Dec 2020 06:04:19 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 12EAA8249980 for ; Sat, 5 Dec 2020 11:04:19 +0000 (UTC) X-FDA: 77558944638.10.stage15_570e1c6273cc Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id E722316A07F for ; Sat, 5 Dec 2020 11:04:18 +0000 (UTC) X-HE-Tag: stage15_570e1c6273cc X-Filterd-Recvd-Size: 4366 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Sat, 5 Dec 2020 11:04:18 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id c7so8542452edv.6 for ; Sat, 05 Dec 2020 03:04:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:subject:to:cc:in-reply-to:references:date :mime-version:content-transfer-encoding; bh=ptB7VjFOHXGa3Nl2TvXAUSYtLzguBp9ctPeePIRKIvM=; b=mjYNJ6wrOZ/8oP6erkxFQT5rWHE0geqzUr2wuhi57zBWlSf0GkHslQultnxdYadYPi qEZejANd1krMu6PmWcdBj9SN0R/2u1eP9ypxXDbvnBbSRTGcFQvpvp7UfdUdx6wIo/37 EpjPqgZbSmkqle5HyZo6fvSUTTJXhBhR5n6K29Yye2N2pRYukUGwDZTLytTd5SvRQEPA OQbVq4MAX3YoX5NtV+la9YiDKlU2Ca9LdCmjKRxgHnmpUpi/lXHqjGXS55ayZVXsxusd xWVfhTi+9Y8tY71fbJFG2iPnLVRRR8k5V+ZvaSsH3DnS4M5vsGXoCb8wqIjnQk8Rp9JK 2O2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:subject:to:cc:in-reply-to :references:date:mime-version:content-transfer-encoding; bh=ptB7VjFOHXGa3Nl2TvXAUSYtLzguBp9ctPeePIRKIvM=; b=PPG9qPe8poszsMD3bAzOwkjc0Zoy8Ruj2KXeq3mI2pqilSn7GAK7qH/OHN7CUuuEgV Dzlr/WOVJNC5d6RxhWgftzNsN/x8uMIc1MPDx0SeXVkQPu1I3IRXg9iFUF5dSDStgIy1 VzQLf3KbPsXASBLfYHKNBgwM9UR2Cuqg+brgGLRuLcVJLCdYs1dGF+McwgrmY9P7OHJk ARMwUgMQx83TUjUr/9JZVP6dJDAMHRpg+a/Vd+oKbnEQ8RL0wG87drLWL/bsMMKKGlMH 1lqskVPAGnRmxgBEMEVf7qDd4tYVTMNq9PN8kpjYrhndzEks3GpcFrbkDDZm6pdZs3AX 0PtQ== X-Gm-Message-State: AOAM533nd/3yxuIqSjlAnoSXaHA2OiwcIbQS0GQ+Q9voiMWzGgtXaAy2 pCeDXbyYZyCWjOSIPboiDZs= X-Google-Smtp-Source: ABdhPJww6rtnhyZ6J5HO0cyBw7T7LcSslvTFiC1k1kUHZvqssKFJtXIpiRv9/asus/Ky1CQsJO+QtA== X-Received: by 2002:a50:ff0c:: with SMTP id a12mr11701689edu.79.1607166257309; Sat, 05 Dec 2020 03:04:17 -0800 (PST) Received: from ubuntu-laptop (ip5f5bfce9.dynamic.kabel-deutschland.de. [95.91.252.233]) by smtp.googlemail.com with ESMTPSA id n1sm4963181ejb.2.2020.12.05.03.04.15 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Dec 2020 03:04:16 -0800 (PST) From: Bean Huo X-Google-Original-From: Bean Huo Message-ID: Subject: Re: [PATCH RFC] mm: Let readahead submit larger batches of pages in case of ra->ra_pages == 0 To: Christoph Hellwig Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, beanhuo@micron.com, Richard Weinberger 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" Date: Fri, 11 Sep 2020 13:35:23 +0200 Mime-Version: 1.0 X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Content-Transfer-Encoding: 7bit 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: > > 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