Tuesday, 2022-05-03

*** tpb <[email protected]> has joined #openrisc00:00
zx2c4SMP thing might be a redherring, but CONFIG_PREEMPT seems like a good differentiator00:18
zx2c4btw, any interest in making `-accel tcg,thread=multi` work properly?00:26
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)04:15
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc05:32
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Remote host closed the connection)07:08
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc07:13
shornezx2c4: I did have multi threading working before, I have some patches I'll try to find them07:18
shorneill try the CONFIG_PREEMPT setting to see if I can see anything07:19
*** littlebo1eep <littlebo1eep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc08:15
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)08:15
zx2c4shorne: oh yea multithreading would be a very nice difference indeed08:20
zx2c4Any luck with CONFIG_PREEMPT?08:20
shornezx2c4: sorry only had time on the computer to reply to you, I have a few minutes now08:56
shorneill see if I can find my threading patches, it doesn't look like I pushed them anywhere08:56
shornethis was the patch: https://github.com/stffrdhrn/qemu/commit/27bb7ae5837c18b0355643a53279aaa915f2b04109:00
*** littlebo1eep <littlebo1eep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Remote host closed the connection)09:00
shorneAll I did was move ttcr to be a per cpu property, but somehow that broke singlethread timer sychronization I think09:01
shorneI did it to try to solve a TLB thrashing problem but since it didn't really help I just dropped it09:01
zx2c4Oh you should push that upstream to qemu09:10
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc09:10
shornealright, let me work on it09:15
shorneyou are making my todo list pretty long ;), all good stuff for openrisc09:16
shorneI hope you find it useful to have wireguard running on OpenRISC09:16
shorneIt sure uncovers some interesting dependencies09:17
zx2c4heh09:22
zx2c4well it succeeded for the first time on build.wireguard.com last night09:22
zx2c4(when i disabled preemption)09:22
zx2c4so it's now there if you ctrl+f for or1k 09:22
zx2c4(working on wireguard-linux-stable)09:22
zx2c4it currently takes three times as long to run as other architectures though09:22
zx2c4not quite sure why tcg is so much slower09:23
shorneI am running CONFIG_PREEMPT=y, CONFIG_SMP=y I am still not seeing the errors with curve2551909:24
shornethats interesting09:25
zx2c4let me send you my VM image09:25
zx2c4that exhibits the issue09:25
zx2c4then you can see whether it's your qemu09:26
shornethanks09:26
zx2c4wait...09:26
zx2c4try with CONFIG_SMP=n09:26
zx2c4you misunderstood me earlier09:26
shorneI tried with SMP=n too, let me try more09:27
shorneif you don't mind me asking where do you live?09:27
shorneEither you don't sleep much or we have pretty good time overlap09:28
shorneI am in Japan09:28
zx2c4haha09:28
zx2c4I'm in Paris09:28
zx2c4I also dont sleep much09:28
zx2c4This one exhibits the issue. Run with `qemu-system-or1k -nodefaults -nographic -cpu or1200 -machine or1k-sim -smp 1 -m 256M -serial stdio -monitor none -kernel path/to/vmlinux` https://usercontent.irccloud-cdn.com/file/VYhUCJ7l/vmlinux09:29
zx2c4(and remember to use that patch that page aligns the kernel)09:30
zx2c4er, page aligns the dtc i mean09:30
zx2c4dtb09:30
shorneyes09:30
shorneI need to go away again, dinner time09:32
shornenot sure I will be back until morning09:32
shorneOne strange thing about the page_align patch is my kernel boots ok even when I don't use an external initrd09:32
shorneyour vmlinux doesn't I might just be lucky with the bondary09:33
shornemine is only about 6mb compared to 11mb09:33
shornegot to go09:33
zx2c4yea, it'll boot okay but it uses the compiled-in DTB09:33
zx2c4rather than the provided one09:33
zx2c4im forwarding porting your multithreaded patch to recent qemu09:34
zx2c4hmm seems like that doesnt work straight forwardly10:08
zx2c4no idea10:08
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)11:10
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc11:10
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Remote host closed the connection)13:34
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc13:35
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)14:19
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc18:12
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)18:31
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc18:40
*** littlebo1eep <littlebo1eep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc18:49
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)18:53
*** littlebo1eep <littlebo1eep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)18:57
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc19:02
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)19:14
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc19:15
arndshorne, zx2c4: I've seen compilers struggle with curve25519 a lot. Usually it manifests as exploding stack usage that shows up in the build warnings, and that can lead to data corruption, but I guess it could be anything. May be worth trying to see if it happens with both gcc and clang, or just one of them19:26
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)19:29
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc19:33
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)19:42
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc19:56
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)20:09
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc20:12
zx2c4Ive seen chacha20poly1305 tests fail too fwiw20:13
zx2c4Less commonly but still20:13
shornegood morning, I see20:14
shorneBTW, booting your kernel20:29
shorneLinux version 5.18.0-rc4+ (zx2c4@thinkpad) (or1k-linux-musl-gcc (GCC) 11.2.1 20211120, GNU ld (GNU Binutils) 2.37) #31 PREEMPT Tue May 3 11:27:57 CEST 202220:29
shorneon my existing QEMU I can see the issue right away20:29
shorneLinux version 5.18.0-rc4-00002-gd53a0fd87c26-dirty (shorne@antec) (or1k-linux-gcc (GCC) 12.0.1 20220210 (experimental), GNU ld (GNU Binutils) 2.38.50.20220202) #737 PREEMPT Tue May 3 18:28:10 JST 202220:31
shornebasics seem fairly inline, compilers are different, I did fix a few things in gcc 12.x but I think mostly related to linking20:35
shorneone was updating libgcc20:36
shorne-#define _FP_TININESS_AFTER_ROUNDING 120:36
shorne+#define _FP_TININESS_AFTER_ROUNDING 020:36
zx2c4So it's either: compiler config or linux config20:36
zx2c4https://xn--4db.cc/JZujg1aZ try this config i guess20:37
shornewell, I tested with that compiler20:37
shorneso it seems unlikely20:37
zx2c4Oh, and couldnt repro with my compiler20:37
zx2c4Alright so my config then...20:37
shorneyes, testing with that20:39
shornebtw this is my config I have been using to try to reproduce the issue: https://gist.github.com/8bffdbaf3eca34f100bee9962d3a137520:43
zx2c4No idea if it matters but my configs set CONFIG_HZ_250 instead of 10020:51
zx2c4Your kernel has scheudler and lock debugging enabled20:57
zx2c4shorne: ^21:01
zx2c4Also im using slub instead of slob fwiw21:01
zx2c4My guess would be that the scheduler or lock debugging hides the bug21:02
shorneit could be21:09
shorneI got your config booting, the only difference now is I am not packing your initrd into the kernel21:10
shornebut its not reproducing, it could be that the extra work of unpacking initrd during boot changes something21:11
shorneI can try with one of my initrds...21:12
shorneok, even with your config, and a big fat initrd, its not reproducing21:24
shorneIll try using the compiler too21:24
shorneI am looking at your initramfs --- https://github.com/WireGuard/wireguard-linux/blob/2bc51cf02c400ec6ea230a0efed2f2d9cc2bc5f5/tools/testing/selftests/wireguard/qemu/Makefile#L30721:46
shorneits not much different from mine, its just you build a very minimal one, mine is here: https://github.com/stffrdhrn/or1k-utils  initramfs/ initramfs.devnodes21:48
shornezx2c4: one difference I find is where Unpacking initramfs... happens: https://gist.github.com/stffrdhrn/b81c2fc73253a11a7ec1ccea472ddd7a22:06
shorneIll try to reproduce the order you are seeing22:07
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 240 seconds)22:15
shorneas per how the kernel is linked the order in your kernel should be more correct, but the rootfs init is run async so the order doesn't need to be guaranteed22:27
shornezx2c4: what is your setting for `locale`, i,e, LC_COLLATE="en_US.UTF-8"  I wonder if sorting has anything to do with it22:29
zx2c4Ill be home in 10min22:40
zx2c4Same locale though i believe22:40
shorneOK, probably not related then, not sure what is the difference now, Ill try to build using your wireguard-linux makefile22:41
shornesorry, I need to go out now22:41
zx2c4Darn.22:43
zx2c4alright home now22:50
zx2c4taking a look22:50
zx2c4LANG=en_US.UTF-822:50
zx2c4> In my builds Unpacking initramfs... runs after crypto self tests22:51
zx2c4Oh interesting observation22:51
zx2c4[    3.380000] Initramfs unpacking failed: compression method gzip not configured22:51
zx2c4i wonder if i can repro if i remove the initramfs entirely22:52
zx2c4shorne: huh here's a new flake i havent seen before https://א.cc/WI4rWSXq and cant repro now22:55

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!