Friday, 2021-04-02

*** tpb has joined #litex00:00
*** Degi_ has joined #litex01:14
*** Degi has quit IRC01:17
*** Degi_ is now known as Degi01:17
*** CarlFK has quit IRC02:35
*** kgugala_ has joined #litex04:02
*** kgugala__ has joined #litex04:04
*** kgugala has quit IRC04:04
*** kgugala_ has quit IRC04:07
*** cr1901_modern1 has quit IRC04:47
*** kgugala has joined #litex04:52
*** kgugala__ has quit IRC04:54
*** peeps[zen] is now known as peepsalot05:34
*** kgugala_ has joined #litex06:15
*** kgugala has quit IRC06:16
*** Melkhior has joined #litex06:19
*** cr1901_modern has joined #litex06:33
*** peepsalot has quit IRC06:48
*** Billy_ has joined #litex06:49
*** Billy_ is now known as fly06:51
*** peepsalot has joined #litex06:55
Melkhior@somlo About the micro-sd card; I have a new board for LiteX where the sd-card works better than on my custom carrier (that I used previously for LIteX); which kernel (git/branch/commit/...) would you recomment at this time? I can boot Yocto from a sd-card root, but I have random issues that seem related to sd-card access (buildroot works07:13
Melkhiorapparently fine, but is much lighter on storage I/O...) Currently booting the commit pointed to by linux-on-litex-vexriscv.07:13
MelkhiorTIA07:13
*** Bertl_oO is now known as Bertl_zZ07:21
*** hansfbaier has joined #litex09:32
*** hansfbaier has quit IRC09:59
Melkhior@somlo tried branch litex-rebase, but it dies during boot after timed-uot CMD18: https://pastebin.com/ScJ7WX9311:58
tpbTitle: [ 1.291426] mmc0: new SDHC card at address 0001[ 1.299177] mmcblk0: mmc0 - Pastebin.com (at pastebin.com)11:58
somlo@Melkhior: I just rebased litex-rebase again, and put back the restriction to single-block transfers12:19
MelkhiorI'm trying on the previous commit, I got to the login prompt12:20
somlowith multi-block, reads are about twice as fast as before, but (large) writes will cause a hard lock-up of kernel and/or gateware, whereas large single-block writes might fail silently but leave the system still operational otherwise12:20
Melkhiorit's trying to log me in but that was very slow on the regular kernel as well12:21
somlo_florent_ is looking at the gateware, I've been pretty busy over the last week, didn't have a chance to do anything on my end12:21
Melkhiorno problem, just wanted to know what I needed to test with VexRiscv12:22
Melkhioras you're working with Rocket12:22
somloright, thanks!12:22
MelkhiorI'm on the sdcard because I couldn't get the Ethernt to work in Linux :-)12:23
somlomy test is: `mount /dev/mmcblk0p1 /mnt; cp /mnt/boot.bin /root/foo; cp /root/foo/mnt/; umount /mnt; mount /dev/mmcblk0p1 /mnt; md5sum /mnt/*`12:23
Melkhiorotherwise NFS would be easier to have a large FS accessible12:24
somlothe idea is after mounting the second time, /mnt/boot.bin and /mnt/foo should have the same md5sum12:24
Melkhioryes they definitively should...12:24
MelkhiorI've gone one further:12:25
Melkhiorroot@litex-riscv32:/root# mount | grep mmc12:25
somlowhich only happens for me with single-block, *and* if I further slow down the sdclock to max out at 12.5MHz :)12:25
Melkhiordev/mmcblk0p2 on / type ext4 (rw,relatime)12:25
somlootherwise (full 25MHz sdclock) the write fails silently in single-block mode; in multi-block mode, the write locks up the system at any sdclock (limited or not)12:25
somloMelkhior: yeah, any *fancy* filesystem (i.e., fancier than fat16 :) ) will involve lots of housekeeping writes (unless you mount r/o)12:26
Melkhiormmm, I'm 4 cores @ 85 MHz so:12:26
Melkhior[    1.788867] litex-mmc f0006000.mmc: Requested clk_freq=0: set to 332031 via div=25612:26
Melkhior[    1.808410] litex-mmc f0006000.mmc: Requested clk_freq=12500000: set to 10625000 via di12:26
Melkhiorv=812:26
Melkhior[    1.845192] litex-mmc f0006000.mmc: Requested clk_freq=25000000: set to 21250000 via di12:26
Melkhiorv=412:26
somloand those writes will sometimes fail, because the (gateware x linux_driver) combo is still having some issues...12:27
Melkhiorslower than 25 MHz but faster than 12.512:27
Melkhiorhave you tried intermediate speed or just an increased divisor going straight from 25 to 12.5 ?12:28
somloMelkhior: try adding a `div <<= 1;` after this line: https://github.com/litex-hub/linux/blob/litex-rebase/drivers/mmc/host/litex_mmc.c#L8712:30
somloyeah, no idea if (and how) I could get additional resolution for sdclock beyond factors of 212:31
somloFWIW, the `dd if=/mnt/boot.bin of=/dev/null` reported time doesn't change by more of 1 or 2 seconds (out of 20) when halving the sdclock12:32
somlowhere boot.bin is about 15MB12:32
somloall this on Rocket, I *think* it should be fairly similar on vexriscv12:33
MelkhiorI guess it would be, but you never know ...12:33
MelkhiorI will try with the increased divisor as well12:33
Melkhiorbuildroot was much more stable than Yocto but probably doesn't do anywhere near as much I/O12:33
Melkhiorsystemd is ... well, systeld :-)12:34
Melkhiorsystemd12:34
somlobaby steps :D12:34
Melkhioryes, I guess 4 RV32GCBK cores and a 'full' distro might be a bit ambitious for a soft-SoC :-)12:35
somloyou say that now, but who knows ;)12:36
Melkhiorbut except for mass I/O it works fairly well !12:36
Melkhiorbut currently, process '(rdisc)' with parentesis is using a full core at 100% and I get in dmesg:12:37
Melkhior[  314.216330] rcu: INFO: rcu_sched self-detected stall on CPU12:37
Melkhior[  314.216701] rcu:     1-....: (52515 ticks this GP) idle=512/1/0x40000004 softirq=7625/712:37
Melkhior627 fqs=2617412:37
Melkhior[  314.217306]  (t=52509 jiffies g=11841 q=4215)12:37
Melkhior[  314.217615] Task dump for CPU 1:12:37
Melkhior[  314.217821] task:(rdisc)         state:R  running task     stack:    0 pid:  140 ppid:12:37
Melkhior    1 flags:0x0000000812:37
Melkhior[  314.218548] Call Trace:12:37
Melkhior[  314.218689] [<c00033f0>] walk_stackframe+0x0/0xca12:37
somlopretty ominous...12:38
Melkhioryes, and I accidentaly typed 'tab' and invoked auto-completion ... and the terminal froze12:39
Melkhiorfrom pas experience, after some time (closer to minutes than seconds...) I will get the control back12:39
Melkhiors/pas/past/12:39
somlotab auto-complete is a good test of how well filesystem reads work...12:42
Melkhioryes, unfortunately a test I often invoke involuntarily...12:43
Melkhiorrebooting on latest rebase12:43
Melkhiorthis time it's dbus-daemon eating up a core; hadn't seen that one before:12:48
Melkhior[  311.231188] rcu: INFO: rcu_sched self-detected stall on CPU12:48
Melkhior[  311.231526] rcu:     2-....: (1 GPs behind) idle=99a/1/0x40000004 softirq=7055/7056 fqs=2614012:48
Melkhior[  311.232099]  (t=52509 jiffies g=11441 q=4277)12:48
Melkhior[  311.232406] Task dump for CPU 2:12:48
Melkhior[  311.232609] task:dbus-daemon     state:R  running task     stack:    0 pid:  123 ppid:     1 flags:0x0000000812:48
Melkhior[  311.233326] Call Trace:12:48
Melkhior[  311.233460] [<c00033f0>] walk_stackframe+0x0/0xca12:48
Melkhiordespite that, copying a 12 MiB file seemed to work... same md5sum after reboot13:08
somloMelkhior: although the output you pasted seems somewhat orthogonal to any sdcard issues, not sure I see a strong link there13:40
Melkhiorme neither, but more often that not it's rdisc13:40
Melkhiormaybe some I/O issue causing weird behavior to random programs ?13:41
MelkhiorI'll have to re-test a buildroot root as well13:41
Melkhiorcompilation issue would be deterministic accross reboot13:43
Melkhiorcore issue would probably also affect buidlroot13:43
Melkhiorso I'm guessing I/O to the root FS as yocto is more intensive13:43
Melkhiorbut I agree it's just a guess and not substantiated by the output in dmesg :-(13:44
MelkhiorBuildroot has no apparent issue; of course it starts a lot fewer processes during boot as well...14:08
MelkhiorNo idea how to figure out what is causing those semi-random failures in Yocto... any suggestions welcome!14:10
MelkhiorThe only thing that points to the sd-card subsystem is that when there's no 'living dead' process (100% cpu, unkillabe, flagged aby rcu_sched), then auto-comlpetion is decently fast... not particularily conclusive :-(14:12
Melkhioranyway, will try to figure out the yocto issue as time permits14:12
Melkhiorand watch litex-rebase for update :-)14:12
*** Bertl_zZ is now known as Bertl15:07
geertuhttps://society.oftrolls.com/@geert/10599671642207586316:40
tpbTitle: Geert Uytterhoeven: "OrangeCrab ECP5 FPGA board + LiteX + VexRiscv + A…" - Society of Trolls (at society.oftrolls.com)16:40
*** m4ssi has joined #litex18:22
*** kgugala has joined #litex18:53
*** kgugala_ has quit IRC18:55
*** kgugala_ has joined #litex19:38
*** kgugala has quit IRC19:41
*** BryceSchroeder has quit IRC22:08
*** m4ssi has quit IRC22:33
*** lf has quit IRC23:41
*** lf has joined #litex23:41

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