2024-10-01 14:28:41 I've got opensbi+u-boot built from source on alpine to work \o/ 2024-10-01 14:29:01 for spacemit SoC 2024-10-01 15:20:24 congrats! Awesome! 2024-10-01 16:00:31 ncopa: thanks. But we will have again to 'play' with their sources 2024-10-01 17:01:14 and this is what I use as APKBUILD for opensbi-spacemit 2024-10-01 17:01:27 have no better idea for now 2024-10-01 19:12:12 >>> ERROR: u-boot-spacemit: 2022.10_2.0 is not a valid version 2024-10-01 19:12:16 why? 2024-10-01 19:12:53 The _ is not valid there 2024-10-01 19:13:51 The _ can only be used to separate a pre or post suffix 2024-10-01 19:13:55 same is with 2022.10-2.0 2024-10-01 19:13:58 https://gitlab.alpinelinux.org/alpine/go/-/blob/master/version/doc.go? 2024-10-01 19:14:38 only 2022.10.2.0 would be valid 2024-10-01 19:14:40 ah like I did with mesa-asahi 2024-10-01 19:14:58 mesa-asahi-24.3.0_pre20240930-r0 2024-10-01 19:15:09 that is valid indeed 2024-10-01 19:15:34 hm, have to contemplate about this 2024-10-01 19:16:15 What does that specific version mean? 2024-10-01 19:16:22 2nd release of october 2024? 2024-10-01 19:16:45 tag in gitlab 2024-10-01 19:16:59 sure, just trying to understand the version scheme 2024-10-01 19:17:03 https://gitlab.freedesktop.org/asahi/mesa/-/tags 2024-10-01 19:17:45 ah, you mean for u-boot-spacemit? 2024-10-01 19:17:55 yes 2024-10-01 19:18:00 it is branch 'bl-v2.0.y' 2024-10-01 19:18:18 bl is baseline? 2024-10-01 19:18:30 could be 2024-10-01 19:18:50 upstream is not open source friendly 2024-10-01 19:19:33 to see commits on their repo you must register account or use google account 2024-10-01 19:19:38 anoying 2024-10-01 19:20:38 but I 'promised' to clandmeter that I will try to make all this for bpi f3 and I want to finish 2024-10-01 19:20:40 I'd mirror it somewhere public 2024-10-01 19:21:15 like ncopa did with linux-spacemit kernel? 2024-10-01 19:23:11 He rebased the commits iirc 2024-10-01 19:23:44 yes 2024-10-01 19:39:21 for now I will go with 2022.10.2.0 2024-10-01 19:48:12 by blind trying I see tar.gz could be downloaded from their repo 2024-10-01 19:48:43 it is very nuce that my crystal ball still works fine ;) 2024-10-01 19:48:52 heh 2024-10-02 10:59:21 anyone have bpi f3 running with linux-spacemit kernel? source "$(OPENSBI_SRC_DIR)/lib/sbi/Kconfig" 2024-10-02 10:59:24 source "$(OPENSBI_SRC_DIR)/lib/sbi/Kconfig" 2024-10-02 10:59:26 21:17 ......... mps| https://gitlab.freedesktop.org/asahi/mesa/-/tags 2024-10-02 10:59:26 21:17 ......... mps| https://gitlab.freedesktop.org/asahi/mesa/-/tags 2024-10-02 10:59:28 source "$(OPENSBI_SRC_DIR)/lib/sbi/Kconfig" 2024-10-02 10:59:31 source "$(OPENSBI_SRC_DIR)/lib/sbi/Kconfig" 2024-10-02 10:59:32 huh 2024-10-02 10:59:52 I hate touchpads 2024-10-02 11:05:12 wanted to ask what is load on bpi f3 with latest linux-spacemit kernel 2024-10-02 11:05:22 anyone can check 2024-10-02 11:15:52 I still need to install mine. Maybe this evening. But need to liberate an sdcard 2024-10-02 11:19:03 ok, noticed it uptime never goes below 1.00 in my case, while with old kernel locally build it is mostly 0.00 2024-10-02 11:22:52 You mean load? 2024-10-02 11:24:09 load, yes 2024-10-02 11:54:46 alpine-bpi-f3:~# uptime 2024-10-02 11:54:46 11:54:34 up 6 days, 17:54, 0 users, load average: 8.04, 8.11, 7.91 2024-10-02 11:54:54 Linux alpine-bpi-f3 6.6.52-2-spacemit #3-Alpine SMP 2024-09-25 16:59:27 riscv64 Linux 2024-10-02 11:55:15 but it is also building qemu currently 2024-10-02 11:55:21 I've guess because linux-spacemit have CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y instead of CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 2024-10-02 11:56:17 I know you like SCHEDUTIL but I told few times it is not good choice 2024-10-02 11:56:41 you can change it? 2024-10-02 11:56:50 yes 2024-10-02 11:56:55 to test if that is the case 2024-10-02 11:57:21 now I'm testing apks of opensbi and u-boot 2024-10-02 11:58:03 will test later, probably at evening. for now just wanted to ask if someone can confirm this load 2024-10-02 11:59:19 ncopa: btw do you have time to review opensbi and u-boot APKBUILDs, can paste them. they are not big 2024-10-02 12:07:34 here is the opensbi-spacemit https://tpaste.us/XvEv 2024-10-02 12:08:23 and u-boot-spacemit is here https://tpaste.us/Lyv4 2024-10-02 12:36:35 mps: looks like they are good enough to push to testing 2024-10-02 12:37:39 thanks for review 2024-10-02 12:49:56 re gov schedutil, I use that to utilize modenr CPU's capability to scale down the freqency 2024-10-02 12:50:01 to save energy 2024-10-02 12:50:36 i dont like waste resources 2024-10-02 12:51:44 schedutil will be fixed in 6.12 to work fine, for now it is 'not so'. because this I use conservative to save energy 2024-10-02 12:52:11 i havent seen any doc explaing the problem with schedutil? 2024-10-02 12:52:44 schedutil is supposed to be balanced. get the freq up under load, and take it down again when cpu is idle 2024-10-02 12:52:51 also I didn't, but talk on different channels persuades me 2024-10-02 12:53:10 and experience 2024-10-02 12:54:02 what does not work fine with schedutil in your experience? 2024-10-02 12:55:08 less battery and somewhat higher load 2024-10-02 12:55:54 try to change to conservative on bpi f3 and check 2024-10-02 12:58:11 it should be 0.00 if not some intensive program runs 2024-10-02 12:58:46 with hostapd it is mostly 0.00 in my case 2024-10-02 13:55:36 not sure if load is a good measure nowaday 2024-10-02 13:56:17 not really sure how it works, but as I understand it is amount of work relative available CPU 2024-10-02 13:57:51 yes, you are right 2024-10-02 13:58:15 maybe call it 'cpu utilization' 2024-10-02 13:58:34 if you for example have close to no work to do. lets say it is 0.001 when cpu freq is at 100% 2024-10-02 13:58:56 which would be rounded to 0.00 2024-10-02 13:59:15 then you reduce the CPU freq, the CPU speed 2024-10-02 13:59:32 to 10% 2024-10-02 14:00:13 then load will tell you that you would need 10 times more CPU power to do the same amount of work 2024-10-02 14:00:33 and load will show you 0.010 (rounded to 0.01) 2024-10-02 14:00:46 even if it is the exact same amount of work 2024-10-02 14:00:49 no? 2024-10-02 14:00:58 there is 'sugov' kernel thread which is very active with schedutil, could be bug in some of patches for spacemit 2024-10-02 14:01:17 but i am not convinced it is a problem 2024-10-02 14:01:55 so, if this thread runs constantly you have 1.00 load 2024-10-02 14:02:13 1.00 load means you use all CPU power 2024-10-02 14:02:31 1.00 is one cpu 2024-10-02 14:02:37 it means you use CPU 100% 2024-10-02 14:02:39 not all 8 2024-10-02 14:03:42 you can easily create program which runs on one cpu to check this 2024-10-02 14:04:09 not use sleep in loop 2024-10-02 14:04:16 what i know for sure is that CPU gov "performance" will set up the speed to max, regardless if there is work to do or not 2024-10-02 14:04:33 yes 2024-10-02 14:05:00 like pressing the gas pedal down to bottom in a car, regardless if you move fast, slow or stand still 2024-10-02 14:05:58 cpu freq will be max but that doesn't mean that cpu work intensive task, they have 'halt' mode (from my memory from I486 times) 2024-10-02 14:06:11 exactly 2024-10-02 14:06:30 you press the gas pedal down to the bottom, even if the car stand still 2024-10-02 14:07:00 engine runs super fast, even if car is not moving 2024-10-02 14:07:01 comparison is not good in this case 2024-10-02 14:07:39 cpu clock is max, but most of the cpu is idle 2024-10-02 14:08:31 and when it is in some kind of 'sleep' 2024-10-02 14:08:45 or better say 'snooze' 2024-10-02 14:09:20 it does wake up regularily to do maintence tasks, like updating the clock, respond to IRQ 2024-10-02 14:09:28 to do very light work 2024-10-02 14:09:57 yes, and one cpu is enough for this 2024-10-02 14:10:23 one cpu is enough, and it does not need full speed to do it 2024-10-02 14:10:27 lower freq works fine 2024-10-02 14:10:31 and saves energy 2024-10-02 14:10:31 right 2024-10-02 14:10:34 thats the idea at least 2024-10-02 14:11:05 but if it is broken that is ofc not good 2024-10-02 14:11:20 yes, even if cpu is 'snoozing' higher clock use more energy than low freq 2024-10-02 14:11:23 but i dont think looking at 'load' is a good indication that something is broken 2024-10-02 14:12:02 higher load than expected is sign that something is wrong 2024-10-02 14:12:44 but what i try to say is that it will give higher 'load' number for the exact same amount of work 2024-10-02 14:12:49 when freq is low 2024-10-02 14:12:52 vs high 2024-10-02 14:13:05 higher 'load' does not mean it has more work to do 2024-10-02 14:13:21 try `echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor` on bpif3 and you will see 2024-10-02 14:13:22 as it is relative the capacity of the CPU 2024-10-02 14:13:49 higher load means that it works on something 2024-10-02 14:13:58 yes 2024-10-02 14:15:05 in /sys/devices/system/cpu/cpufreq/policy0/ are some files with which you can 'play' to see 2024-10-02 14:15:11 but if the load shows 0.001 on 100% cpu freq, and you reduce cpu freq with 90%, the exact same amount of work will sho load '0.01'. It looks like load is 10 times more 2024-10-02 14:15:23 while you in fact only have 1/10 CPU capacity 2024-10-02 14:15:26 right 2024-10-02 14:15:26 its a relative number 2024-10-02 14:15:50 so I'm not convinced it is a problem 2024-10-02 14:16:03 no, freq and load not much related (on same cpu) 2024-10-02 14:16:22 then I misunderstand 2024-10-02 14:16:37 freq is only 'capability' while load is real usage 2024-10-02 14:17:59 if you have one process or thread spinning constantly you will have load of 1.00 independent of freq (not exactly this but I think you understand) 2024-10-02 14:19:18 yup 2024-10-02 14:19:28 TBH I didn't examined much of this on modern cpus, but this is principle 2024-10-02 14:20:26 more than 30 years passed when I had work deeply with such problems and solutions 2024-10-02 14:21:02 but I'm sure that high freq doesn't mean high load 2024-10-02 14:21:15 yes agree on that 2024-10-02 14:21:22 high freq does not mean high load 2024-10-02 14:21:26 ofc 2024-10-02 14:22:38 if I use machine for real time I use performance and if on batteries I use conservative, IME best options 2024-10-02 14:22:42 but as I understand it: if you have a specific amount of work, that requires 1Gig cpu clock cycles to complete (lets say xz compress some data) 2024-10-02 14:22:52 and you have 1 cpu core 2024-10-02 14:22:57 ofc, tried schedutil but always had issue with it 2024-10-02 14:22:58 running at 1Ghz 2024-10-02 14:23:14 the job will take 1 second 2024-10-02 14:23:40 and load will show 1.0 2024-10-02 14:23:46 no, depends on cpu class, RISC or CISC 2024-10-02 14:24:07 er... 2024-10-02 14:24:30 i give up 2024-10-02 14:24:36 CISC needs few clocks for one instructions while RISC mostly need one clock for one instruction 2024-10-02 14:24:48 yeah i perfectly know that 2024-10-02 14:24:59 that is why i did not say 1Gig instructions 2024-10-02 14:25:07 i said 1 Gig cycles 2024-10-02 14:25:13 but really i need to do other stuff now 2024-10-02 14:25:17 i give up 2024-10-02 14:25:27 only one CPU existed which could execute 1.5 instructions per one clock cycle - NC4016 2024-10-02 14:25:38 ok 2024-10-02 14:25:44 i never talked about instructions in the exacmple but ok 2024-10-02 14:26:06 all in all I think schedutil is buggy on spacemit 2024-10-02 14:26:08 feel free to set gov to performance of conservative if that is what you need 2024-10-02 14:26:15 file a bug to upstream kernel 2024-10-02 14:26:39 send me the link when kernel devs acknoledge it is a bug 2024-10-02 14:26:44 bianbu want registration even to see commits :) 2024-10-02 14:27:14 no, I didn't told that mainline schedutil is buggy 2024-10-02 14:28:19 some improvements are announced to 6.12 schedutil and I wait release to test it 2024-10-02 14:28:40 in theory it should be good scheduler 2024-10-02 14:44:07 my friend chatgpt agrees with me: higher load avg when you reduce CPU freq is to be expected due to the way the load is calculated: https://chatgpt.com/share/66fd5b87-0f70-8010-a2c1-78d5f32b4e83 2024-10-02 14:48:43 ahaha 2024-10-02 14:50:49 you trust to AI 2024-10-02 14:56:29 I will stay with my definition - 'cpu utilization' 2024-10-02 14:58:11 relative cpu utilization 2024-10-02 14:58:39 agree 2024-10-02 14:59:35 no, I can't forge right english term but something like 'cpu utilization of its capacity' 2024-10-02 15:00:51 'cpu utilization of its current working capacity' 2024-10-02 15:05:07 so with same amount of work, "load" increases when "current working capacity" goes down due to lower freq. 2024-10-02 15:05:20 but i do have one cpu core running at 100% here 2024-10-02 15:05:56 PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND 2024-10-02 15:05:56 117 2 root RW 0 0% 6 12% [sugov:0] 2024-10-02 15:06:06 what is sugov? 2024-10-02 15:06:30 HAHA! 2024-10-02 15:06:37 Sugov is a kernel thread used in ARM architecture as part of the scheduling governor 2024-10-02 15:07:40 which means there actually is a bug related CPU governor 2024-10-02 15:08:47 how do we report this to bianbu linux? 2024-10-02 15:10:47 I guess you have to login at https://gitee.com/bianbu-linux/linux-6.1 and create issue report 2024-10-02 15:14:13 gives me 500 2024-10-02 15:14:38 btw, i built the leds heartbeat as module 2024-10-02 15:14:40 it asks me to login 2024-10-02 15:14:52 when i login or register i get 500 2024-10-02 15:15:05 Linux alpine-bpi-f3 6.6.53-0-spacemit #1-Alpine SMP 2024-10-02 09:48:21 riscv64 Linux 2024-10-02 15:15:12 the leds heartbeat is gone 2024-10-02 15:17:35 I didn't tried to register, agreement is in chinese so I don't understand it 2024-10-02 15:18:00 im not able to report it 2024-10-02 15:18:02 oh well 2024-10-02 15:18:13 nice :/ 2024-10-02 15:18:27 ncopa: do you have nvme on bpif3 2024-10-02 15:18:37 i do 2024-10-02 15:19:02 and you can lower loadavg with changing scheduler? 2024-10-02 15:23:17 when changing it to "performance" it dropped yes 2024-10-02 15:23:36 [sugov:0] is related the cpu scheduler 2024-10-02 15:24:37 right 2024-10-02 15:24:49 and even with nvme? 2024-10-02 15:49:44 ncopa: I pushed opensbi and u-boot for spacemit to builder. now have to change image create script to use our build for them 2024-10-02 15:49:56 but first will go to walk 2024-10-02 16:55:39 well, ofc load will go up if freq is low. by 'load' I mean execution will be slower, and not sure for calculated load in /proc/loadavg 2024-10-02 16:56:00 forget this ^ 2024-10-02 16:56:12 intended for someone else 2024-10-02 17:53:48 ncopa: here is my updated script to create sd image https://tpaste.us/lbMn 2024-10-02 17:54:18 it uses now all from our repo 2024-10-02 17:54:43 you dont happen to have a diff? 2024-10-02 17:54:49 nice, very nice 2024-10-02 17:55:23 note use u-boot.itb instead of u-boot.itb and fw_dynamic.itb instead of fw_dynamic.bin 2024-10-02 17:56:28 https://tpaste.us/dojW diff but not sure is it correct 2024-10-03 12:08:41 I have booted by banapi f3 now as well with ncopas image and tiny-init 2024-10-03 12:08:51 For some reason I cannot get the serial console to work 2024-10-03 12:11:17 Hmm, does not come back after upgrade 2024-10-03 12:16:08 oh, I have serial console n ow 2024-10-03 12:16:56 And it received a different IP 2024-10-03 12:25:29 the ip depends on your dhcp server and which port you plug in 2024-10-03 12:41:16 Usually it's stable 2024-10-03 12:41:31 But I thought it didn't come back because the ip changed 2024-10-03 12:46:02 I must say that the fan that came with it is very quiet 2024-10-03 12:46:14 initially I didn't even realize it was working 2024-10-03 12:49:15 this is even more quiet: https://fosstodon.org/@ncopa/113231568682842848 2024-10-03 12:49:45 What temperatures do you measure? 2024-10-03 12:50:35 48C currently 2024-10-03 12:50:57 Mine is ~39C 2024-10-03 12:51:01 temp was lower with the heatsink than with fan when runnin stress 2024-10-03 12:51:13 But I'm not running any load 2024-10-03 12:51:27 mine runs docker and gitlab CI 2024-10-03 12:51:30 aha 2024-10-03 13:48:44 ncopa: did you manage to disable the leds? 2024-10-03 13:53:35 ikke: red led can't be disabled 2024-10-03 13:53:43 The green one then? 2024-10-03 13:54:25 add '/etc/local.d/led.start' file 2024-10-03 13:54:45 and put in it: 2024-10-03 13:54:49 echo none > /sys/class/leds/sys-led/trigger 2024-10-03 13:55:01 echo 0 > /sys/class/leds/sys-led/brightness 2024-10-03 13:57:19 thanks 2024-10-03 14:51:04 i at least was able to build the hearbeat trigger as module, so it does not blink at least. 2024-10-03 15:57:41 linux-spacemit need more modularization but some things must be in-kernel. which ones will 'try and see'