From patchwork Tue Oct 19 10:48:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lin Feng X-Patchwork-Id: 12569433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 377ADC433F5 for ; Tue, 19 Oct 2021 10:48:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8774761154 for ; Tue, 19 Oct 2021 10:48:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8774761154 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=wangsu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 01FBD900002; Tue, 19 Oct 2021 06:48:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F10EF6B0071; Tue, 19 Oct 2021 06:48:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E2746900002; Tue, 19 Oct 2021 06:48:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0127.hostedemail.com [216.40.44.127]) by kanga.kvack.org (Postfix) with ESMTP id D306D6B006C for ; Tue, 19 Oct 2021 06:48:23 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7D6BF8249980 for ; Tue, 19 Oct 2021 10:48:23 +0000 (UTC) X-FDA: 78712862886.01.A207847 Received: from zg8tmty1ljiyny4xntqumjca.icoremail.net (zg8tmty1ljiyny4xntqumjca.icoremail.net [165.227.154.27]) by imf04.hostedemail.com (Postfix) with SMTP id 4EA3350000B4 for ; Tue, 19 Oct 2021 10:48:19 +0000 (UTC) Received: from fedora33.wangsu.com (unknown [59.61.78.138]) by app2 (Coremail) with SMTP id 4zNnewBHbuRuom5hgooBAA--.3123S2; Tue, 19 Oct 2021 18:48:19 +0800 (CST) From: Lin Feng To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linf@wangsu.com Subject: [PATCH] mm/readahead.c: fix incorrect comments for get_init_ra_size Date: Tue, 19 Oct 2021 18:48:12 +0800 Message-Id: <20211019104812.135602-1-linf@wangsu.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CM-TRANSID: 4zNnewBHbuRuom5hgooBAA--.3123S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Gr48Wr15CF4xCw1DWry3Arb_yoW3uFX_Ca 18Kw4qgFZ3Gr4av3WYvw4xXFWFgrykuryDuF47XrW7J3y8uF98Wa4Dtr17Gr1xXr4qyw17 WrW3WFW7Cr43GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUUUUUUU X-CM-SenderInfo: holqwq5zdqw23xof0z/ X-Stat-Signature: d3hnhnzjgz4eqxfqjqdmzqojenekmwkx Authentication-Results: imf04.hostedemail.com; dkim=none; spf=none (imf04.hostedemail.com: domain of linf@wangsu.com has no SPF policy when checking 165.227.154.27) smtp.mailfrom=linf@wangsu.com; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 4EA3350000B4 X-HE-Tag: 1634640499-991055 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000081, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: In fact, formated values returned by get_init_ra_size are not that intuitive. This patch make the comments reflect its truth. Signed-off-by: Lin Feng --- mm/readahead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/readahead.c b/mm/readahead.c index 41b75d76d36e..88a84f254ed6 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -309,7 +309,7 @@ void force_page_cache_ra(struct readahead_control *ractl, * Set the initial window size, round to next power of 2 and square * for small size, x 4 for medium, and x 2 for large * for 128k (32 page) max ra - * 1-8 page = 32k initial, > 8 page = 128k initial + * 1-2 page = 16k, 3-4 page 32k, 5-8 page = 64k, > 8 page = 128k initial */ static unsigned long get_init_ra_size(unsigned long size, unsigned long max) {