Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp300777pxa; Fri, 14 Aug 2020 04:49:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7XIydtZs7vKyZUV3ntEVrTFJnIakukxQ6lSGUP+5N19ex7xS7s13sbi7K5u9ytTWzwsL9 X-Received: by 2002:a17:906:15c2:: with SMTP id l2mr1986540ejd.112.1597405785445; Fri, 14 Aug 2020 04:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597405785; cv=none; d=google.com; s=arc-20160816; b=zzrVAql7yykfTOR8t61FzqW/ferhaIv+s3eTWx/RRLnak+1wZxly+/7ivUoL4d4rSW E4ouPo1epZ4Zl/aZ5DaR+kTPHbvM6AX4TN95WuG2RgOHeemGP0zz7A9BANurcQk1QuaX w6UG5lI0anMHDVCkLSLrULMxmMmeTzAyYLibYjmBYCSWiGmfBt9ulTy2hXS02hL2gSRb /f7JsFv0/FJDlChXzW+/3Fr76HaPMweJzsZC2ZXUg9W9cI4MoxC5pd1loMY8Z3TuIzLH vVE/AD/DGBhpp9V71oX80hOzI5ZOK54ehn8GoxrR0JDrUXnnE0w9FrkwmQ7fuKLwr/Za Jkfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=MOOOT8FR20WjgLSWAiehuYkMI9+OIJrQwNnRd5HHJPg=; b=toW2SatjwLyIKvz3pW+WyDBb0i70Pi8bYUwm1rGv/OwwgIgDpiUvw076x/SVXlJ9i+ WbQkka0LlHkFzggsvZWAGNvRFRXLbQCkjYj/QdqSr2yjOjCRDm12Bc3IMLrE8716Iam3 fy4FtfsrIugfPgar69DQFekGGmW2Lq5ZgEtM/z1U23QWg71KoCA7qacNayhWD2q/HO08 FMKrKjOEdJq9NxezQlxrwNSl/X8o3VGlOAqS8OEAw9IglPyB5FsJfX1yVZWTWm3pzHhX rKsfZYpScIT2+ccu7gl6vWpQTVdAqV67TWJuAHhhLJME7r8r/UgM+QuHzF3NTWLLzYga H3kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=tNBCsedz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si5020415ejx.592.2020.08.14.04.49.22; Fri, 14 Aug 2020 04:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=tNBCsedz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726699AbgHNLsk (ORCPT + 99 others); Fri, 14 Aug 2020 07:48:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbgHNLsi (ORCPT ); Fri, 14 Aug 2020 07:48:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A606C061384 for ; Fri, 14 Aug 2020 04:48:37 -0700 (PDT) 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=MOOOT8FR20WjgLSWAiehuYkMI9+OIJrQwNnRd5HHJPg=; b=tNBCsedznNKmnNNP7AZZPcBul4 EvDBoO9HU5CTVvmv/r80UKgrIuEE1K8YL56o62Wwb3RWH9vXJDENu4+3twROWqhSejMFJyROjk75z +ofmVe6L8kHaZXB/27E0vNMrxO0cvvvdosz8ejCd36kZvjkAzqQQDj8nCcjfu3salfn3xPq9sTikN 8i5QOq84dTrzoe13hcmkHcu8H97x3GOYhVOTTfs5sBDFT4+xw9prT6oq57tTOVrUJTTour6QKeihS 8y/tSsIfoplKmU07/NbARDaIytkHdqLOiD45HVKIr4XjMosn8u6ZBibHyrfodNGZqRFolYEH4UYVx yv1awzJA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6YC4-0008Dx-02; Fri, 14 Aug 2020 11:48:20 +0000 Date: Fri, 14 Aug 2020 12:48:19 +0100 From: Matthew Wilcox To: Zhaoyang Huang Cc: Roman Gushchin , Andrew Morton , 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: <20200814114819.GW17456@casper.infradead.org> References: <1597395824-3325-1-git-send-email-zhaoyang.huang@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1597395824-3325-1-git-send-email-zhaoyang.huang@unisoc.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 14, 2020 at 05:03:44PM +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) Hang on, you're saying that the _only_ way to do turbo-read is the way that userspace currently does it, and userspace cannot be modified, only the kernel? I think somebody has their priorities wrong! > We sync ra->ra_pages with bdi->ra_pages when read. Furthermore, in consideration > of the scenario of eio and fadvise(...,POSIX_FADV_SEQUENTIAL).We introduce a > seq_read_fact to record the factors of above two cases. No, this is far too complicated.