Received: by 10.213.65.68 with SMTP id h4csp633400imn; Fri, 16 Mar 2018 13:59:40 -0700 (PDT) X-Google-Smtp-Source: AG47ELs/qPdDPpsH1viOyIrhBwkK7tc+xD3p6h6H8YJgddrrA22Szazq2nqJbpnUk3iZsU4z7RmB X-Received: by 10.99.158.9 with SMTP id s9mr2585082pgd.64.1521233980663; Fri, 16 Mar 2018 13:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521233980; cv=none; d=google.com; s=arc-20160816; b=xfz/qljnrjELkQjgoxVJzweufV8UVlkFzKGj4jCw6HfIN9OGv/8HbhRJTODOIANdTA 5Y2N/VraHO0Usqr7QoimjSQnZYLF2WzDApQ657KMzvs1flLOEXSUgcYuRj5tob1APQJu ta7wZDHqygKaB/MPTY8Donwtj1nkiESQ58AXXHkcN+e/mcJmYfeylrRw4gtRqOJmUVjp vI/6hOb+BVxCNs137fwkS8qbFJBqWRr+tKzdmGEbiSBfdAMKPxrfHE03FwtJW5RA033R T9gYPMFPPLC9ZdXG0vaxnoCO3dHwd9cJbQpSs7YIoNGZhBeZ6v38oZf8qMJJtQRKSOq3 brGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=kZN1OcTiGzDg0YRqf5GTAF73sQvedJqp5QzR3L2aViw=; b=F0mOV6vzkQUeZSvXXBkm9uF/TbVZBTfIt/ttt35tzO9LQNT/SNGdRKECHKtESPfAL5 k6bnzb1gsXIIQFGyoCKvSMVCVwg3bp7hd8eyoonTL06E8pKlpj4kj/gZp+A62t59TF+3 c/7RXCp4m7iAAAf1P+isek7+numdNoWJfa5NzSHrFBb7qo7i5q4J+kCfz5q4AxnYlrfR VfT/q71VclOdEG4COgCt5zrwrHdYQ88BTyQhBlwJpIvFnARZqoCt9XSJFFis309m/2j5 4WY8f4JJvsO5xvreW+FwN7aRFbdL6BWJ0JVS8Z3JOhgCe1+2miBBQlaEn6qEQNAlG1md +ONg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=DkK7LhrC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az2-v6si6730496plb.145.2018.03.16.13.59.26; Fri, 16 Mar 2018 13:59:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=DkK7LhrC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751653AbeCPU4i (ORCPT + 99 others); Fri, 16 Mar 2018 16:56:38 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:50264 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751597AbeCPU4d (ORCPT ); Fri, 16 Mar 2018 16:56:33 -0400 Received: by mail-wm0-f66.google.com with SMTP id w128so5465098wmw.0 for ; Fri, 16 Mar 2018 13:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kZN1OcTiGzDg0YRqf5GTAF73sQvedJqp5QzR3L2aViw=; b=DkK7LhrCyuslt7SHgueFf5g8Dzs0bcQg47ssBaz6QMOqloaL7FMX3VcymtO+BjFC+e XKTqXI0gAjD+RrbTpx983u5Q+yC2XMLbTg8j75c1l6KJwBYwmZ65AjBVbQUUaeyorRHr 3xllBU508yZyGPiSvJ3k7BPlbMWIG4aJE+rUNU2nR9FOksC4RCkN9MT1IFnpNqG2TH31 j91sAcoGVmZWG9HQHOdEODKA0H9SHBRdaKvV7NEnj3RRQ+EZB+l92CGn8/FGGD8bIvEu L3WrvObhdIbrEdZA6XHhV+vwl0REr7XLm7pEXWQjHF0r/WePagJQiZMhWM5GzC1bxeK4 Xfwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kZN1OcTiGzDg0YRqf5GTAF73sQvedJqp5QzR3L2aViw=; b=s83WS5N1WoxQ53+swU8sDgquBezGkthVezfGrHl2tGBXeiLeXxfwX7zxHCwz6dKxD+ 5bHCD8aJMIkUEwfo9Jj7gn71U3/FBAwjp2yI/eqoUzeQd9ZpLl4sH4JObQrwEzfwrdb2 oy/zJdme+kLf9hF8n+Wm8oXoI/S38dfxGnORQQMTE5wmIwH6X9PwOYXS42bJXJofyz+L PT0VOwZ/ZDnQWYuymISMIxNP9dRCpG/eojQsq5260fP5vBwg5hwoEBkxrcMyVpYD7fgi 32C984XVWX5oNWYRQKWlLMIiDDYuhcrfcrFHB9oWKl32f37D30LsG6uuGdSLn/PbDQC9 6ZDw== X-Gm-Message-State: AElRT7En2u3EK1+cli036fDhtoNtc6i160nEK5GuNgGkQg4etdwkUNql OBrxJKQfCKxy2tBfDcjV25QGeg== X-Received: by 10.80.192.146 with SMTP id k18mr3832183edf.229.1521233792196; Fri, 16 Mar 2018 13:56:32 -0700 (PDT) Received: from node.shutemov.name ([178.121.195.98]) by smtp.gmail.com with ESMTPSA id h55sm4448563eda.73.2018.03.16.13.56.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 13:56:31 -0700 (PDT) Received: by node.shutemov.name (Postfix, from userid 1000) id 8C238648D520; Fri, 16 Mar 2018 23:56:07 +0300 (+03) Date: Fri, 16 Mar 2018 23:56:07 +0300 From: "Kirill A. Shutemov" To: Wei Wang , Linus Torvalds Cc: gregkh@linuxfoundation.org, toddpoynor@google.com, wei.vince.wang@gmail.com, Andrew Morton , Dan Williams , Michal Hocko , "Kirill A. Shutemov" , Jan Kara , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Hugh Dickins , Matthew Wilcox , Ingo Molnar , Sherry Cheung , Oliver O'Halloran , Andrey Ryabinin , Huang Ying , Dennis Zhou , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: add config for readahead window Message-ID: <20180316205607.lr6nmrkkzzbw2tqh@node.shutemov.name> References: <20180316182512.118361-1-wvw@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180316182512.118361-1-wvw@google.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 16, 2018 at 11:25:08AM -0700, Wei Wang wrote: > From: Wei Wang > > Change VM_MAX_READAHEAD value from the default 128KB to a configurable > value. This will allow the readahead window to grow to a maximum size > bigger than 128KB during boot, which could benefit to sequential read > throughput and thus boot performance. Increase of readahead window was proposed several times. And rejected. IIRC, Linus was against it. What is different this time? > Signed-off-by: Wei Wang > --- > include/linux/mm.h | 2 +- > mm/Kconfig | 8 ++++++++ > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index ad06d42adb1a..d7dc6125833e 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -2291,7 +2291,7 @@ int __must_check write_one_page(struct page *page); > void task_dirty_inc(struct task_struct *tsk); > > /* readahead.c */ > -#define VM_MAX_READAHEAD 128 /* kbytes */ > +#define VM_MAX_READAHEAD CONFIG_VM_MAX_READAHEAD_KB > #define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ > > int force_page_cache_readahead(struct address_space *mapping, struct file *filp, > diff --git a/mm/Kconfig b/mm/Kconfig > index c782e8fb7235..da9ff543bdb9 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -760,3 +760,11 @@ config GUP_BENCHMARK > performance of get_user_pages_fast(). > > See tools/testing/selftests/vm/gup_benchmark.c > + > +config VM_MAX_READAHEAD_KB > + int "Default max readahead window size in Kilobytes" > + default 128 > + help > + This sets the VM_MAX_READAHEAD value to allow the readahead window > + to grow to a maximum size of configured. Increasing this value will > + benefit sequential read throughput. > -- > 2.16.2.804.g6dcf76e118-goog > -- Kirill A. Shutemov