urbit/nix/pkgs
Philip Monk 2713083386
libsigsegv: disable stack vma check
This patches libsigsegv to not check the stack vma on Linux, since that
involves reading procfs, and we make very heavy use of sigsegv.  This
eliminates most of urbit's performance discrepancy between Linux and
MacOS.  These are the benchmarks used; note this is a local MBP vs a
cloud Linux server, and the MBP is almost certainly faster hardware.

We take two benchmarks, one of which decrements 10 million times and the
other simply allocates 125MB of memory.  These are the results:

cpu-heavy ==  =/ n 10.000.000 |-(?~(n n $(n (dec n))))
mem-heavy == =a (bex 1.000.000.008)

macos, cpu-heavy: 6 seconds
macos, mem-heavy: 1 second

linux-before, cpu-heavy: 30 seconds
linux-before, mem-heavy: 160 seconds

linux-after, cpu-heavy 9 seconds
linux-after, mem-heavy 1.3 seconds

This represents a 3x speedup for the cpu-heavy operation and a 120x
speedup for the memory-heavy operation.

This check was used to try to distinguish stack overflow from other
forms of segmentation fault.  In the comments in src/handler-unix.c, it
describes three heuristics it uses, depending on what's available from
the OS.  In the linux-i386 case, all three are availble, so we simply
disable the slow one.  This correctly recognizes stack overflow if you
simply alloca(10000000000).
2020-06-26 11:15:01 -07:00
..
arvo build: give arvo a high priority 2019-11-05 07:10:04 +08:00
arvo-ropsten arvo-ropsten: revert ALEF to AMES [ci skip] 2019-12-02 16:04:06 +08:00
ent Fixed Nix build errors on Bernardo's Ubuntu. (#1220) 2019-03-06 11:57:31 -08:00
ge-additions Minus the stdenv? 2019-06-24 15:53:33 -07:00
libaes_siv aes_siv: vendors libaes_siv since it isn't in nix. 2020-05-20 13:51:59 -07:00
urbit libsigsegv: disable stack vma check 2020-06-26 11:15:01 -07:00
default.nix aes_siv: vendors libaes_siv since it isn't in nix. 2020-05-20 13:51:59 -07:00