Received: by 10.213.65.68 with SMTP id h4csp558302imn; Fri, 16 Mar 2018 11:26:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELuu3AwrZvnQiCeBgWlhA27G3bXOpjSVmOTxdVVw+XTb/0zXgYyP4Qn6YXadijeJ2+1930L1 X-Received: by 10.99.146.66 with SMTP id s2mr2210199pgn.372.1521224815555; Fri, 16 Mar 2018 11:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521224815; cv=none; d=google.com; s=arc-20160816; b=0a/nuZFB4D95e9Gn5dsdb1y8hAjhqk1Vc/uFj/5vS9XJ8J+37bOkuIQkbH8G6pnsQH inJOw+dJgxl4QORubCrxRoEgLXlA0tmeEyQ/OC8TyhaWhbu1qEYaQ8y4/Jlq1iXSv7FE f7C3S/6VLqaSvfJhTZe28Rh8+c3zFhCU0ehHfQgBm1MLozrSH7xxRrS3EAZ0hOQEPf+f MmtQizLfhS0kE70ceDZZ6biZE65TnzcHc7Lrm31F1Dbxm6EosiVy090KF9gGOcarXkSi Pn+HZG757Iec3BnRxiAjXLldYZcAdFpZBlysE4t5YhdPmcN2iOesmv+aqeb+L5WWsH8m rpFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature:arc-authentication-results; bh=Gmu+7hOHpcO9sKELnNqHUuwXs6/8tIA9e9UIvLdS3Ww=; b=I+57IRYROp11BiCeMyWWBDxSwvGZR/xapN2czwSF45e+Yvu/SPQ4VDWYhf4yfnwxHK wSXSBFqZKL6MAUUaudGV8hDiAINGxGGFNhINuemPO5q2M9Q5VUjbjjf/FIC0Rfthgs4e EZE5dZ7Q1uE6Lw+q3mFql/2Ulhu+FveroLZde8S328WoKs0ZCYzNkHUZalOZ+Vf0S8k8 KKNjdONUf9Y7/TaVBlN9SKY709KQjN1Zi7isAEJkbxv88zGmPG+3vZPWhGmSJWhNqkpx si4QcpZCFSDmm/JyKfFz6+nZXVawxqYyohc0mrxTwY9zxW0YtQS1z07+v4zY5oW822+W ZCYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=sdbZfizO; 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; dmarc=fail (p=REJECT sp=REJECT dis=REJECT) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p20-v6si6616593plo.643.2018.03.16.11.26.38; Fri, 16 Mar 2018 11:26:55 -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=fail header.i=@google.com header.s=20161025 header.b=sdbZfizO; 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; dmarc=fail (p=REJECT sp=REJECT dis=REJECT) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751905AbeCPSZk (ORCPT + 99 others); Fri, 16 Mar 2018 14:25:40 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37981 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbeCPSZj (ORCPT ); Fri, 16 Mar 2018 14:25:39 -0400 Received: by mail-pg0-f68.google.com with SMTP id a15so4391936pgn.5 for ; Fri, 16 Mar 2018 11:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Gmu+7hOHpcO9sKELnNqHUuwXs6/8tIA9e9UIvLdS3Ww=; b=sdbZfizOOWJuu/dBh60Ml+4fm+hbb+R8oBWAY3kXUXGWcgLgYvwsVamVs1yirlucps q5Iw65kHu2Ew9YWO3TYdzgmyLOso8iBt5wjfhoPZm1l5IG/WaYlZac9xtoGddPCgVqGk MLEyszVFyn1PpWhClg01eka1TLUfm5S51fA+//fX2fEvQfz5XLTUDLqawmFIWpy7SNcj tHuwAVCDepyKD/UoQ9xzaBH8pwnuObFsjnkPjmluunL5cdxT9+5XfaLHhHCiL/FYsUiZ blL+ISu72cQVBBB4nZIDep1wUu/5BjSdzxmrThQ/GJWnpmA2Ak23YdUvwJgU9oKVMOir 2Cvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Gmu+7hOHpcO9sKELnNqHUuwXs6/8tIA9e9UIvLdS3Ww=; b=qBkDTiFbPqOrAiA0LVEfXMw7wYYJySDLXtGnO92tM0u0rvgykDZaj0q2i5L02krNu2 /eGNTaMFE19uzULcwC0AVzjO+WNUZ8TDKkbYjrIA/IOxvEn0fVxf8e+sKXJMRNprgcV9 KNmvZdhi45cYhu3lN0KlmF7W8XrO1PV+q8Hjjw/+fSx5IDjhx1qDeRWls3pyJjeDFM2n 2unEn+yn7SK+Qo+iKnUjswxYhBwUD0DmN8SRdjmWKQ/I2bPM8cvXhfsg/XMnXekQXQ17 ZQBIHUHiYTZtW0IBWsgYtDA8b/iqlACWbVmmVqJuUZr0MQhznKmjYl05NKgBg/kXhevx 9y7Q== X-Gm-Message-State: AElRT7ERx270DezsOjEJpPruYoPseJdIm+9R2UcMJS7awwVnIIk3zEnh dJqkjIUAiB3KP3vUogpK0Cm8Ug== X-Received: by 10.98.74.143 with SMTP id c15mr2365368pfj.83.1521224738374; Fri, 16 Mar 2018 11:25:38 -0700 (PDT) Received: from wvw-pc1.mtv.corp.google.com ([2620:0:1000:1612:84ca:16e0:5117:522f]) by smtp.gmail.com with ESMTPSA id p86sm17414101pfi.55.2018.03.16.11.25.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 11:25:37 -0700 (PDT) From: Wei Wang X-Google-Original-From: Wei Wang < wvw@google.com > Cc: gregkh@linuxfoundation.org, toddpoynor@google.com, wei.vince.wang@gmail.com, Wei Wang , Andrew Morton , Dan Williams , Michal Hocko , "Kirill A. Shutemov" , Jan Kara , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , 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: [PATCH] mm: add config for readahead window Date: Fri, 16 Mar 2018 11:25:08 -0700 Message-Id: <20180316182512.118361-1-wvw@google.com> X-Mailer: git-send-email 2.16.2.804.g6dcf76e118-goog To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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