linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Wang <wvw@google.com>
Cc: gregkh@linuxfoundation.org, toddpoynor@google.com,
	wei.vince.wang@gmail.com, "Wei Wang" <wvw@google.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Michal Hocko" <mhocko@suse.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	"Jan Kara" <jack@suse.cz>, "Jérôme Glisse" <jglisse@redhat.com>,
	"Hugh Dickins" <hughd@google.com>,
	"Matthew Wilcox" <willy@infradead.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Sherry Cheung" <SCheung@nvidia.com>,
	"Oliver O'Halloran" <oohall@gmail.com>,
	"Andrey Ryabinin" <aryabinin@virtuozzo.com>,
	"Huang Ying" <ying.huang@intel.com>,
	"Dennis Zhou" <dennisz@fb.com>,
	"Pavel Tatashin" <pasha.tatashin@oracle.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm: add config for readahead window
Date: Fri, 16 Mar 2018 11:25:08 -0700	[thread overview]
Message-ID: <20180316182512.118361-1-wvw@google.com> (raw)

From: Wei Wang <wvw@google.com>

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.

Signed-off-by: Wei Wang <wvw@google.com>
---
 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

             reply	other threads:[~2018-03-16 18:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 18:25 Wei Wang [this message]
2018-03-16 18:49 ` Wei Wang
2018-03-16 20:53   ` Greg KH
2018-03-19  2:36   ` Huang, Ying
2018-03-19  3:15     ` Wei Wang
2018-03-20 20:17   ` Jan Kara
2018-03-16 20:56 ` Kirill A. Shutemov
2018-03-16 21:26   ` Linus Torvalds
2018-03-16 21:33 ` Andrew Morton
2018-03-16 21:51   ` Wei Wang
2018-03-16 21:59     ` Andrew Morton
2018-03-16 22:13       ` Wei Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180316182512.118361-1-wvw@google.com \
    --to=wvw@google.com \
    --cc=SCheung@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=dan.j.williams@intel.com \
    --cc=dennisz@fb.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=oohall@gmail.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=toddpoynor@google.com \
    --cc=wei.vince.wang@gmail.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox