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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 1875AC433DF for ; Fri, 14 Aug 2020 17:46:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B3A8A20774 for ; Fri, 14 Aug 2020 17:46:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rQF9QclW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3A8A20774 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3277D8D000B; Fri, 14 Aug 2020 13:46:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D8F18D0003; Fri, 14 Aug 2020 13:46:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1EE018D000B; Fri, 14 Aug 2020 13:46:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0D1F78D0003 for ; Fri, 14 Aug 2020 13:46:44 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C7063381E for ; Fri, 14 Aug 2020 17:46:43 +0000 (UTC) X-FDA: 77149904286.20.jail77_570e65226ffe Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 9B376180C07A3 for ; Fri, 14 Aug 2020 17:46:43 +0000 (UTC) X-HE-Tag: jail77_570e65226ffe X-Filterd-Recvd-Size: 3229 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Fri, 14 Aug 2020 17:46:42 +0000 (UTC) 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=kYAQV0Tbe/Xkg6dDIRNNv2tqIRDwN5EAzR9Dc9+lDxA=; b=rQF9QclWzmH/lzMkTLJY7+O9L6 v5PRKMXyA+vkFlN0Lo1x5yd5CR8Rpu41bsk4iwJicoeaJM777EjiHiWTIyoTJhT3jWjM1OANg2wCX 1ffXx8thZ+jPHEfDjJRp8Em6hYcncLSUvi+oCiJIyBq6stJ5pgOp9U0JEKV7nUU9Nk6bwlglow5YM HDY1ueNIb4SqBiipfxSG0ncwWOEY0NRzu3g/dX6OxPiJIFuRJSEnh4sWPH50UOctqOHiiWLlTCbgq w7bsbthoIeQYauFXftbzU6Wg+82aWQyXT442gUWLTlz5+Nezqx92iY52IogxAyJWWxxP07k+tZxf/ tA5RPhGQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6dmf-0002lN-3f; Fri, 14 Aug 2020 17:46:29 +0000 Date: Fri, 14 Aug 2020 18:46:29 +0100 From: Matthew Wilcox To: Andrew Morton Cc: Zhaoyang Huang , Roman Gushchin , Zhaoyang Huang , "open list:MEMORY MANAGEMENT" , LKML Subject: Re: [PATCH] mm : update ra->ra_pages if it's NOT equal to bdi->ra_pages Message-ID: <20200814174629.GY17456@casper.infradead.org> References: <1597368611-7631-1-git-send-email-zhaoyang.huang@unisoc.com> <20200814014355.GS17456@casper.infradead.org> <20200814020700.GT17456@casper.infradead.org> <20200813193307.d5597367b7964d95f63e4580@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200813193307.d5597367b7964d95f63e4580@linux-foundation.org> X-Rspamd-Queue-Id: 9B376180C07A3 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 Thu, Aug 13, 2020 at 07:33:07PM -0700, Andrew Morton wrote: > On Fri, 14 Aug 2020 10:20:11 +0800 Zhaoyang Huang wrote: > > No, What I want to fix is the file within one process's context keeps > > using the initialized value when it is opened and not sync with new > > value when bdi->ra_pages changes. > > So you're saying that > > echo xxx > /sys/block/dm/queue/read_ahead_kb > > does not affect presently-open files, and you believe that it should do > so? > > I guess that could be a reasonable thing to want - it's reasonable for > a user to expect that writing to a global tunable will take immediate > global effect. I guess. But it's also reasonable for someone to have written an application assuming that the current behaviour won't change. As I understand it, if we change net.ipv4.tcp_window_scaling, that will take effect only for new connections, and not for existing ones. I think the _real_ problem is that readahead never scales down, except for EIO. I don't have time to take on another project right now, but I think this patch is too simplistic and has too many downsides. Someone needs to really think the readahead situation through properly.