From 8b0d797ecdd1e416cb92bc92769c37bb9b5db0a6 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 9 Sep 2020 14:06:04 +0200 Subject: [PATCH] Check that THP is not set to always (madvise is ok) (#4001) THP can also be set to madvise, in which case it shouldn't cause problems for Redis since redis (or the allocator) doesn't use madvise to activate it. (cherry picked from commit b2419c31c166bd2d73f7af3d089859795c0e3506) --- src/latency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/latency.c b/src/latency.c index dfdc6668c..b5ccc7cc6 100644 --- a/src/latency.c +++ b/src/latency.c @@ -71,7 +71,7 @@ int THPIsEnabled(void) { return 0; } fclose(fp); - return (strstr(buf,"[never]") == NULL) ? 1 : 0; + return (strstr(buf,"[always]") != NULL) ? 1 : 0; } #endif