[PATCH] D33321: [scudo] lower quarantine default sizes

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 09:37:42 PDT 2017


cryptoad created this revision.

After discussing the current defaults with a couple of parties, the consensus
is that they are too high. 1Mb of quarantine has about a 4Mb impact on PSS, so
memory usage goes up quickly.
This is obviously configurable, but the default value should be more
"approachable", so both the global size and the thread local size are 1/4 of
what they used to be.


https://reviews.llvm.org/D33321

Files:
  lib/scudo/scudo_flags.cpp


Index: lib/scudo/scudo_flags.cpp
===================================================================
--- lib/scudo/scudo_flags.cpp
+++ lib/scudo/scudo_flags.cpp
@@ -68,16 +68,16 @@
   // Sanity checks and default settings for the Quarantine parameters.
 
   if (f->QuarantineSizeMb < 0) {
-    const int DefaultQuarantineSizeMb = FIRST_32_SECOND_64(16, 64);
+    const int DefaultQuarantineSizeMb = FIRST_32_SECOND_64(4, 16);
     f->QuarantineSizeMb = DefaultQuarantineSizeMb;
   }
   // We enforce an upper limit for the quarantine size of 4Gb.
   if (f->QuarantineSizeMb > (4 * 1024)) {
     dieWithMessage("ERROR: the quarantine size is too large\n");
   }
   if (f->ThreadLocalQuarantineSizeKb < 0) {
     const int DefaultThreadLocalQuarantineSizeKb =
-        FIRST_32_SECOND_64(256, 1024);
+        FIRST_32_SECOND_64(64, 256);
     f->ThreadLocalQuarantineSizeKb = DefaultThreadLocalQuarantineSizeKb;
   }
   // And an upper limit of 128Mb for the thread quarantine cache.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33321.99446.patch
Type: text/x-patch
Size: 982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170518/0929cc1c/attachment.bin>


More information about the llvm-commits mailing list