From fc51d749a0f6824b79106af0deb75bcbcc2a9839 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 1 Apr 2021 08:12:14 +0000 Subject: [PATCH 1/5] wasm: use signal handlers for bounds checking in V8 runtime. This change improves performance by up to 36% in microbenchmarks. Benchmark Diff -------------------------------------------------------------------- WasmSpeedTest_empty -0.0185 WasmSpeedTest_get_current_time -0.1184 WasmSpeedTest_small_string -0.0081 WasmSpeedTest_small_string1000 -0.1324 WasmSpeedTest_small_string_check_compiler -0.0654 WasmSpeedTest_small_string_check_compiler1000 -0.1338 WasmSpeedTest_large_string -0.3187 WasmSpeedTest_large_string1000 -0.3624 WasmSpeedTest_get_property -0.0213 WasmSpeedTest_grpc_service -0.1426 WasmSpeedTest_grpc_service1000 -0.2431 WasmSpeedTest_modify_metadata -0.0287 WasmSpeedTest_modify_metadata1000 -0.0431 WasmSpeedTest_json_serialize -0.2729 WasmSpeedTest_json_deserialize -0.2594 WasmSpeedTest_json_deserialize_empty -0.2609 WasmSpeedTest_convert_to_filter_state -0.2889 Signed-off-by: Piotr Sikora --- bazel/external/wee8.patch | 4 ++-- bazel/repository_locations.bzl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bazel/external/wee8.patch b/bazel/external/wee8.patch index 85c962463075c..a7776c892483c 100644 --- a/bazel/external/wee8.patch +++ b/bazel/external/wee8.patch @@ -1,5 +1,5 @@ # 1. Fix linking with unbundled toolchain on macOS. -# 2. Increase VSZ limit to 4TiB (allows us to start up to 409 VMs). +# 2. Increase VSZ limit to 64 TiB (allows us to start up to 6,553 VMs). # 3. Fix MSAN linking. --- wee8/build/toolchain/gcc_toolchain.gni +++ wee8/build/toolchain/gcc_toolchain.gni @@ -28,7 +28,7 @@ constexpr size_t kAddressSpaceLimit = 0x8000000000L; // 512 GiB #elif V8_TARGET_ARCH_64_BIT -constexpr size_t kAddressSpaceLimit = 0x10100000000L; // 1 TiB + 4 GiB -+constexpr size_t kAddressSpaceLimit = 0x40100000000L; // 4 TiB + 4 GiB ++constexpr size_t kAddressSpaceLimit = 0x400100000000L; // 64 TiB + 4 GiB #else constexpr size_t kAddressSpaceLimit = 0xC0000000; // 3 GiB #endif diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 6c95aa83d6ec0..db1002decc5ba 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -935,8 +935,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "WebAssembly for Proxies (C++ host implementation)", project_desc = "WebAssembly for Proxies (C++ host implementation)", project_url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host", - version = "217320a45ef21db1bf79e7bd8e0190f9a9750b94", - sha256 = "cc1eac37f92dad52c0091bb53503f735e5412f61d04693cc0426a92e7f6eae46", + version = "01df058637b5eacacef6f12773aa893870cdb0ab", + sha256 = "9ecff7f4d9124ec448172c5b50a155007fadcfc3b924b8630af00eebf87d4c83", strip_prefix = "proxy-wasm-cpp-host-{version}", urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], @@ -951,7 +951,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( "envoy.wasm.runtime.wavm", "envoy.wasm.runtime.wasmtime", ], - release_date = "2021-03-08", + release_date = "2021-04-01", cpe = "N/A", ), proxy_wasm_rust_sdk = dict( From dbf87630f90be4b6cabdb8de7f47f743c99076e7 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 1 Apr 2021 10:17:21 +0000 Subject: [PATCH 2/5] review: use std::call_once. Signed-off-by: Piotr Sikora --- bazel/repository_locations.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index db1002decc5ba..c91801b7e26a7 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -935,8 +935,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "WebAssembly for Proxies (C++ host implementation)", project_desc = "WebAssembly for Proxies (C++ host implementation)", project_url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host", - version = "01df058637b5eacacef6f12773aa893870cdb0ab", - sha256 = "9ecff7f4d9124ec448172c5b50a155007fadcfc3b924b8630af00eebf87d4c83", + version = "8fdfecd50ba19d5ec33932a1b969ccb5cacbb915", + sha256 = "8574d271f68a8af015e29c234320ad77a2a0b9165193b7e752e0609d71dfbebd", strip_prefix = "proxy-wasm-cpp-host-{version}", urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], From 77160c5f7993d9b982f82d963518582735d08391 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 1 Apr 2021 11:51:11 +0000 Subject: [PATCH 3/5] review: fix build with GCC. Signed-off-by: Piotr Sikora --- bazel/repository_locations.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index c91801b7e26a7..c941bf3a59200 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -935,8 +935,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "WebAssembly for Proxies (C++ host implementation)", project_desc = "WebAssembly for Proxies (C++ host implementation)", project_url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host", - version = "8fdfecd50ba19d5ec33932a1b969ccb5cacbb915", - sha256 = "8574d271f68a8af015e29c234320ad77a2a0b9165193b7e752e0609d71dfbebd", + version = "d0d00765f0186bdb7ab69415f140b083b14b3df6", + sha256 = "e45bddec5fd5853a5f11ce3d58aa385323ca8b3a869f6f590a72b2093f5a4c54", strip_prefix = "proxy-wasm-cpp-host-{version}", urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], From aee2916fb250d864bbb2ec8afa5c2fcf6eb1b405 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 1 Apr 2021 13:13:35 +0000 Subject: [PATCH 4/5] review: use merged commit. Signed-off-by: Piotr Sikora --- bazel/repository_locations.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index c941bf3a59200..394508a7f680e 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -935,8 +935,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "WebAssembly for Proxies (C++ host implementation)", project_desc = "WebAssembly for Proxies (C++ host implementation)", project_url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host", - version = "d0d00765f0186bdb7ab69415f140b083b14b3df6", - sha256 = "e45bddec5fd5853a5f11ce3d58aa385323ca8b3a869f6f590a72b2093f5a4c54", + version = "2b559959c4733be137ab5aa92cc19a55ef69fb47", + sha256 = "8de0cb963608df8933513d00c08db659948ab912966c206b1ac7943b5eb4ee63", strip_prefix = "proxy-wasm-cpp-host-{version}", urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], From 0ce7beb691e3a6b4ba8696ceb605e83397d1782b Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Fri, 2 Apr 2021 10:46:55 +0000 Subject: [PATCH 5/5] review: update commit to latest. Signed-off-by: Piotr Sikora --- bazel/repository_locations.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 394508a7f680e..e673628dfa79f 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -935,8 +935,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "WebAssembly for Proxies (C++ host implementation)", project_desc = "WebAssembly for Proxies (C++ host implementation)", project_url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host", - version = "2b559959c4733be137ab5aa92cc19a55ef69fb47", - sha256 = "8de0cb963608df8933513d00c08db659948ab912966c206b1ac7943b5eb4ee63", + version = "ca7ec41d2dd4276b246a454f7fd975a883b87c80", + sha256 = "2984c41e8899fa277fced8ad027bfa3731ed1baeef075c316cb84de6d178c0df", strip_prefix = "proxy-wasm-cpp-host-{version}", urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], @@ -951,7 +951,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( "envoy.wasm.runtime.wavm", "envoy.wasm.runtime.wasmtime", ], - release_date = "2021-04-01", + release_date = "2021-04-02", cpe = "N/A", ), proxy_wasm_rust_sdk = dict(