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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS 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 7716CC433E1 for ; Fri, 14 Aug 2020 20:10:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 29A7520771 for ; Fri, 14 Aug 2020 20:10:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XubzUq1k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29A7520771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AB8906B000A; Fri, 14 Aug 2020 16:10:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A42078D0001; Fri, 14 Aug 2020 16:10:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E36A6B000D; Fri, 14 Aug 2020 16:10:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0068.hostedemail.com [216.40.44.68]) by kanga.kvack.org (Postfix) with ESMTP id 741D86B000A for ; Fri, 14 Aug 2020 16:10:37 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 397BF181AEF1A for ; Fri, 14 Aug 2020 20:10:37 +0000 (UTC) X-FDA: 77150266914.20.brush69_500bd3226fff Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 0AD6C180C07AB for ; Fri, 14 Aug 2020 20:10:37 +0000 (UTC) X-HE-Tag: brush69_500bd3226fff X-Filterd-Recvd-Size: 2262 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Fri, 14 Aug 2020 20:10:36 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 601C2206B2; Fri, 14 Aug 2020 20:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597435835; bh=V1LBnLR6GD/H9lBrBNExcAJGbLLMmg8AfmNutpx8vGA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XubzUq1kxjyC5SQygeG3LR9yJ8DHHjdN1/M3aSrVHWlCJtG+SSfQyWOM8RzGMwgpa jb0rRWtCr9/lIactA/ZevYNzPnoeK+pl6wOpiQmtcg83y5wcJCcB+zpDmRuuq58m8V oK0vXvWx3EjM51MLhf4amqoc+oh3gST4/TgjbTqY= Date: Fri, 14 Aug 2020 13:10:34 -0700 From: Andrew Morton To: Zhaoyang Huang Cc: Roman Gushchin , Zhaoyang Huang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm : sync ra->ra_pages with bdi->ra_pages Message-Id: <20200814131034.f71a91c6827904e12a629e04@linux-foundation.org> In-Reply-To: <1597395824-3325-1-git-send-email-zhaoyang.huang@unisoc.com> References: <1597395824-3325-1-git-send-email-zhaoyang.huang@unisoc.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0AD6C180C07AB X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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, 14 Aug 2020 17:03:44 +0800 Zhaoyang Huang wrote: > Some system(like android) will turbo read during startup via expanding the > readahead window and then set it back to normal(128kb as usual). However, some > files in the system process context will keep to be opened since it is opened > up and has no chance to sync with the updated value as it is almost impossible > to change the files attached to the inode(processes are unaware of these things) How about making VM_READAHEAD_PAGES a variable? Provide a kernel boot parameter to alter the default setting. Userspace can then restore the usual value later in boot?