!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

82 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5126 Servers

Load older messages


SenderMessageTime
31 Jul 2022
@k900:0upti.meK900Oh yeah, I just meant that when it needs a value, it converts the endianness in place05:41:46
@k900:0upti.meK900So if you miss calling the conversion function somewhere, it explodes in some subtle way05:42:56
@joerg:thalheim.ioMic92I don't think rust would be a good choice at the time. patchelf is used in many package manager for bootstrapping and Rust would be a heavy bootstrap dependency05:43:30
@joerg:thalheim.ioMic92It does not even use a sane build system like meson or cmake for the same reason.05:43:59
@k900:0upti.meK900Yeah, that was more of a joke 05:44:04
@k900:0upti.meK900 Rust also isn't really a (that) good fit for doing this kind of low level byte-twiddling 05:45:08
@k900:0upti.meK900Cause it is kind of inherently unsafe05:45:34
@joerg:thalheim.ioMic92the endianess conversion is actually mostly done in this helper: https://github.com/NixOS/patchelf/blob/master/src/patchelf.cc#L97 so most of the code does not have to care about it.05:46:42
@k900:0upti.meK900Yeah, but it has to care about calling the helper every time 05:49:09
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgSo one thing I didn't think of during the strip discussion yesterday: The old initrd unconditionally strips. So the question about if we've been adding an undue binutils dependency for most people's rebuilds was moot :P12:51:45
@k900:0upti.meK900 But we can remove it now 12:51:58
@k900:0upti.meK900That's good12:52:02
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea, that is an improvement12:52:04
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Finally ran the test I meant to yesterday. Looks like the goblin change reduces initrd build time (for a very simple initrd) from 3.47s to 2.67s. Neat 14:51:20
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I should time the actual make-initrd-ng runtime, because I'm sure a ton of that time is cpio and the compressor 14:53:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

Oh, uh, lul, that's way more dramatic. Old:

real 1.09
user 0.56
sys 0.58

Goblin:

real 0.27
user 0.06
sys 0.20

Notice how much of that time is actual rust code running. Nice

15:00:03
@k900:0upti.meK900Try it without stripping15:02:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
real 0.09
user 0.00
sys 0.08

lul

15:04:44
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

Compared to old with stripping commented out:

real 0.89
user 0.49
sys 0.44
15:06:49
@linus:schreibt.jetzt@linus:schreibt.jetztexec is expensive! Especially in the Nix world.15:18:44
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI was originally very happy about rewriting this logic in rust because my bash code took several minutes and this took about a second. Now it's a tenth of a second. That makes me smile15:30:28
@k900:0upti.meK900I just switched my laptop to a goblin-built initrd15:58:23
@k900:0upti.meK900And nothing exploded15:58:26
@k900:0upti.meK900So that's nice15:58:29
@k900:0upti.meK900image.png
Download image.png
15:59:46
@k900:0upti.meK900Teehee15:59:46
@k900:0upti.meK900Also, I just realized16:03:14
@k900:0upti.meK900Bootspec dragged in a kernel to my WSL system :(16:03:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Is there a way to get the rust dependencies to build in a separate derivation from make-initrd-ng? It's really annoying that what used to be like a 1s build now takes closer to 10s when trying to iterate on it 18:23:51
1 Aug 2022
@lukegb:zxcvbnm.ninjalukegb (he/him) joined the room.16:25:23

Show newer messages


Back to Room ListRoom Version: 6