diff options
author | Suresh Srinivas <suresh.srinivas@intel.com> | 2018-03-23 12:16:48 -0700 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2018-10-18 17:43:07 -0400 |
commit | bf7ed80475cfa7ae1ab6086c325f57557b75dffe (patch) | |
tree | ec24d78702e44a442cbec3aac357bc7ba00eb347 /configure.py | |
parent | 05394d2e10c83fe0efb2f47eb5404a18acfe439b (diff) | |
download | node-new-bf7ed80475cfa7ae1ab6086c325f57557b75dffe.tar.gz |
src: initial large page (2M) support
PR-URL: https://github.com/nodejs/node/pull/22079
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.py b/configure.py index ae44051edf..538ae0445a 100755 --- a/configure.py +++ b/configure.py @@ -388,6 +388,12 @@ parser.add_option('--with-etw', dest='with_etw', help='build with ETW (default is true on Windows)') +parser.add_option('--use-largepages', + action='store_true', + dest='node_use_large_pages', + help='build with Large Pages support. This feature is supported only on Linux kernel' + + '>= 2.6.38 with Transparent Huge pages enabled') + intl_optgroup.add_option('--with-intl', action='store', dest='with_intl', @@ -998,6 +1004,24 @@ def configure_node(o): else: o['variables']['node_use_dtrace'] = 'false' + if options.node_use_large_pages and flavor != 'linux': + raise Exception( + 'Large pages are supported only on Linux Systems.') + if options.node_use_large_pages and flavor == 'linux': + if options.shared or options.enable_static: + raise Exception( + 'Large pages are supported only while creating node executable.') + if target_arch!="x64": + raise Exception( + 'Large pages are supported only x64 platform.') + # Example full version string: 2.6.32-696.28.1.el6.x86_64 + FULL_KERNEL_VERSION=os.uname()[2] + KERNEL_VERSION=FULL_KERNEL_VERSION.split('-')[0] + if KERNEL_VERSION < "2.6.38": + raise Exception( + 'Large pages need Linux kernel version >= 2.6.38') + o['variables']['node_use_large_pages'] = b(options.node_use_large_pages) + if options.no_ifaddrs: o['defines'] += ['SUNOS_NO_IFADDRS'] |