2026-08-15
00:01Mary has quit [Quit: .]
00:01Mary has joined #asahi-dev
00:05maettu102 has quit [Quit: brb]
00:05maettu102 has joined #asahi-dev
00:09pb17 has joined #asahi-dev
00:12rosalyntg has quit [Read error: Connection reset by peer]
00:13rosalyntg has joined #asahi-dev
00:53AlohaHenry has joined #asahi-dev
01:28___nick___ has quit []
01:30___nick___ has joined #asahi-dev
01:31___nick___ has quit []
01:34___nick___ has joined #asahi-dev
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
02:01pthariensflame has joined #asahi-dev
02:14pthariensflame has quit [Remote host closed the connection]
02:21chadmedim not sure what to do about the shared gpio. i dont think upstream will want the shared-gpio-proxy behaviour to change to only requiring a vote when trying to deassert the "default value"
02:27chadmed has quit [Quit: Konversation terminated!]
02:33chadmed has joined #asahi-dev
02:42DarkShadow4444 has quit []
02:42bgb has quit [Remote host closed the connection]
02:42DarkShadow44 has joined #asahi-dev
02:44tobhe_ has joined #asahi-dev
02:47bgb has joined #asahi-dev
02:51tobhe has quit [Ping timeout: 480 seconds]
03:17nela has quit [Ping timeout: 480 seconds]
03:17nora has joined #asahi-dev
03:19nora_ has quit [Ping timeout: 480 seconds]
03:22nela has joined #asahi-dev
03:35marvin24 has quit [Ping timeout: 480 seconds]
04:08bgb has quit [Remote host closed the connection]
04:09yukahttps://github.com/AsahiLinux/m1n1/pull/657#issuecomment-5300454583 <-- I suppose I could send a feedback assistant requesting s3_0_c11_c0_12 and s3_0_c11_c0_16 to be zeroed on the secondary cores?
04:10lion328 has quit [Remote host closed the connection]
04:11bgb has joined #asahi-dev
04:13lion328 has joined #asahi-dev
04:18iretq is now known as Guest15676
04:18Guest15676 has quit [Read error: Connection reset by peer]
04:18marv7000 has quit [Write error: connection closed]
04:18iretq has joined #asahi-dev
04:19marv7000 has joined #asahi-dev
04:21yukaquoting one of sven's messages from april: "much of the s3_0_c11_c smells like CTRR stuff to me"
05:21bgb has quit [Remote host closed the connection]
05:27bgb has joined #asahi-dev
05:32user890104 has quit []
05:42JamesCalligeros[m]Sounds cursed :p
06:08bgb has quit [Remote host closed the connection]
06:09bgb has joined #asahi-dev
06:24user890104 has joined #asahi-dev
07:00weirdtreething has quit [Remote host closed the connection]
07:00weirdtreething has joined #asahi-dev
07:53Guest15641 has quit [Quit: Bridge terminating on SIGTERM]
07:53rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
08:03rhysmdnz has joined #asahi-dev
08:04Guest15688 has joined #asahi-dev
08:26picnoir has quit [Ping timeout: 480 seconds]
08:34oddline has joined #asahi-dev
08:34picnoir has joined #asahi-dev
09:03jannausven: when forcing usb4_dart to identity tbt breaks with "thunderbolt-apple-nhi 501f00000.nhi: error -ENODEV: Failed to init software connection manager"
09:06jannauI'd expect that the intel laptop uses an iommu as well so it could only be an issue how well iommu and driver handle the usage pattern
09:08svenmy current local copy is probably slightly more efficient in the irq path but that shouldn't explain >2x difference in RX vs TX
09:10chaos_princessif irq is the bottleneck, wouldn't using 9000mtu affect it (it didn't)
09:17jannausmells like irq though. on the receiving side a single core is at ~90% in soft irq state. for some reason the first (efficiency) core
09:17chaos_princesscan we turn off the e-cores and still have linux boot?
09:26jannaunot sure that perf samples correctly (I see less samples than I would expect) but https://paste.centos.org/view/cc49f0f1
09:28pb17 has quit [Ping timeout: 480 seconds]
09:31pb17 has joined #asahi-dev
09:32jannauincreased throughput from 7.2 to 8.8 Gbits/sec by forcing the irq to performance core and switching cpufreq gov to performance
09:33svencan you try echo DMA-FQ > /sys/kernel/iommu_groups/$GROUP/type for the iommu group (should be in dmesg during acio bringup i think)? i'm not sure that's actually gonna do anything with the current driver though
09:39svenit essentially batches unmaps and then does them all at once after some timeout or when the queue is filled
09:40svenif i were to be nerdsniped into fixing this i'd look into how it does dma buffer alloc/free in the RX vs. the TX path :D
09:46DarkShadow44 has quit [Read error: Connection reset by peer]
09:47linuxgemini has quit [Quit: Ping timeout (120 seconds)]
09:47linuxgemini has joined #asahi-dev
09:47DarkShadow44 has joined #asahi-dev
10:15hardy94 has joined #asahi-dev
10:32jannau~20 us per map or unmap page (~1 gigabyte per second and 4k payload per package) feels at least a order of magnitude too slow
10:34Yushi has quit [Remote host closed the connection]
10:35Yushi has joined #asahi-dev
10:45jannaulooks like a factor 10 error is mine. tracing counts 220k thunderbolt_net:tbnet_rx_ip_frame events per second and not 25k I calculated with
10:50hdbngr has joined #asahi-dev
11:00hdbngr has quit [Ping timeout: 480 seconds]
12:41hdbngr has joined #asahi-dev
13:08hdbngr has quit [Remote host closed the connection]
13:09hdbngr has joined #asahi-dev
13:19matt598 has joined #asahi-dev
13:20hdbngr has quit [Ping timeout: 480 seconds]
13:47matt598 has left #asahi-dev [Konversation terminated!]
13:54AlohaHenry has left #asahi-dev [#asahi-dev]
13:55AlohaHenry has joined #asahi-dev
13:58yukajust a different reg_offset, and the mcc_count can't be estimated using the remaining regs since there are trailing regs which are not mccs
14:00yukat8140 & t6040 are different from this: both have a moved CACHE_ENABLE/CACHE_STATUS (0x2800/0x2804 instead of 0x1c00/0x1c04) and are already enabled on startup
14:04yukathey start out with 0x2800 = 0x8000000c, 0x2804 = 0xc000c00, and if I write 0 or some other <0xc value 'X' to the last nibble of the enable reg, it is echoed back as 0xX000X00 in the status reg. So I guess that means CACHE_WAYS = 12.
14:05AlohaHenry has quit [Quit: AlohaHenry]
14:05AlohaHenry has joined #asahi-dev
14:07AlohaHenry has quit []
14:08AlohaHenry has joined #asahi-dev
14:26hdbngr has joined #asahi-dev
14:30svenand doesn't linux reserve the carveouts in its own memory map and never hands out that memory to anyhting?
14:42yukabut m1n1 does not care about the carveout-memory-map in mmu_add_default_mappings, which is why it needs special handling for the mcc carveouts
14:43pb17 has quit [Ping timeout: 480 seconds]
14:45pb17 has joined #asahi-dev
15:12hdbngr has quit [Ping timeout: 480 seconds]
15:12AlohaHenry has quit [Ping timeout: 480 seconds]
15:18rany has quit [Remote host closed the connection]
15:19rany has joined #asahi-dev
15:41rany has quit [Ping timeout: 480 seconds]
15:42rany has joined #asahi-dev
16:14sskras is now known as [||
16:17chaos_princesshow does one figure out which memory carveouts are for dcp?
16:23hardy1994 has joined #asahi-dev
16:23hardy94 has quit [Read error: Connection reset by peer]
16:23hardy1994 is now known as hardy94
16:31hardy94 has quit [Read error: Connection reset by peer]
16:32[|| is now known as sskras
16:44Guest15688 has quit [Quit: Bridge terminating on SIGTERM]
16:44rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
16:47rhysmdnz has joined #asahi-dev
16:48Guest15714 has joined #asahi-dev
16:49rany has quit [Remote host closed the connection]
16:51rany has joined #asahi-dev
16:55yukasven: do you think we should add a reserved-memory workaround for the ctrr(?) ro issue or write a feedback assistant or both?
16:55svenknowing Apple the solution for that radar will be „let’s also lock down that region on the boot core“ :D
17:10___nick___ has quit [Ping timeout: 480 seconds]
17:21nano has quit [Quit: User left the chat]
17:21nano has joined #asahi-dev
17:56pb17 has quit [Ping timeout: 480 seconds]
18:00pb17 has joined #asahi-dev
18:08yukaMy conclusion from looking into cpufreq on t8132 is: whatever is done in cpufreq_init() does not work as-is there. The APSC_DIS and APSC_BUSY do not behave as previously and I also couldn't find any new bit like that. Regarding the other cluster features, even if we figure out what xnu does there exactly, we're not allowed to modify them on the boot cluster. But disregarding all that, simply setting the pstate works as before and does increase the...
18:11yukaAlso I wonder if xnu somehow accounts for the thing where the first core of each cluster does not enter deep sleep, and thus inhibits any other core in the cluster from boosting to a higher frequency
18:15svenso we still don't really know how deep sleep works, but it's more than just that CYC_OVRD sysreg, see the m1n1 code for deep_sleep. and xnu is still allowed to modified the other stuff so it wouldn't surprise if you can somehow still force them to sleep
18:16svenonce we actually get that working on m1-m3 we can try filing a radar again and see what happens
18:17svenboth chaos and me tried and while we can get the cores to go into deep sleep / poweroff we can't wake from the state again if we put all cores into it
18:19sveni thought for boosting to the highest state the other cores had to be actually powered off. but i could be wrong, never looked into that in details
18:19yukacorresponds to wfi losing state and also the last core which is not in 'deep wfi' can boost high
18:20yukaIf the core needed to be powered off, then the cpu pstate experiments in m1n1 could never measure the higher frequencies
18:21yukabecause that does smp_start_secondaries and then the other cores sleep while a measurement is being done on one core of the cluster
18:23yukaIf we can agree on more precise terms of the possible states of a core and a cluster, and write them down somewhere that would be useful for these discussions
18:23svenhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/apple/t8103.dtsi#n283 hmmm
18:25yukaMaybe this is where I got the term from, and matched it to the 'wfi which loses state' / what the cpuidle-apple driver does because that's what is actually needed
18:26sven<yuka> If we can agree on more precise terms of the possible states of a core and a cluster, and write them down somewhere that would be useful for these discussions <-- let's maybe do just that :D
18:26chaos_princessshould be normal arm64 wfi/non-retention wfi/that full cluster shutdown that we can't exit from
18:27svenis there a different between "wfi that jumps back to RVBAR" and "wfi that results in full cluster shutdown"?
18:28chaos_princessno? normal non-retention wfi keeps pc
18:28chaos_princessyou can put just one core in the shutdown wfi, but the config regs are iirc cluster-global
18:29Pokemod9773620847128183300 has joined #asahi-dev
18:29svenchaos_princess: i'm talking about the difference between deep=true/false here https://github.com/AsahiLinux/m1n1/blob/88a98213d55f2cbd69844762c3171b39c0cd0bf9/src/utils.c#L249
18:30chaos_princessdeep=true - cluster, deep=false - non-retention
18:31sventhat's why i'm asking if there's a difference or if deep = false is just "enter shutdown wfi but don't set the cluster shutdown reg", i.e. some weird inbetween state
18:31mmediouni[m]What makes sure that the HIDx register values persist across deep sleep?
18:31mmediouni[m]That and the register masks lockdown
18:31chaos_princesswhatever "reconfig engine" is
18:31chaos_princesssven: i _think_ it is a weird inbetween
18:32yukaCYC_OVRD_WFI_MODE=3 give the remaining core in the cluster the ability to boost but retains pc and sp
18:32svenyeah, and that's where my question came "is there a different between "wfi that jumps back to RVBAR" and "wfi that results in full cluster shutdown"?" came from because i'm not sure
18:32mmediouni[m]Oh so recfg is locked down too
18:33chaos_princessi guess it would be worth it to test setting all cores in cluster in one or the other and measuring system power
18:33chaos_princessyes, but xnu does more things when enabling that mode
18:34rany has quit [Ping timeout: 480 seconds]
18:35yukabut now we use this as anchor to define proper names for it. And I think non-retention wfi should be the one which drops to RVBAR and *not* the WFI_MODE one which cpuidle-apple uses which retains pc (that should rather be "deep wfi"?)
18:37rany has joined #asahi-dev
18:37chaos_princessmakes sense https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/osfmk/arm64/machine_routines_asm.s#L1099
18:38yukahttps://github.com/AsahiLinux/linux/blob/e2e1930a9595bffafad92cec2b5504525efb9cd4/drivers/cpuidle/cpuidle-apple.c#L24
18:40yukadoes the semi-retention wfi actually power down the core (or cluster, if done on all cores)
18:40chaos_princessit uses less power
18:41chaos_princessit is the thing we are using for sleep on m1-3
18:43mmediouni[m]yuka: doesn't seem like it
18:45rany has quit [Ping timeout: 480 seconds]
18:45yukachaos_princess: but last time I tested, even just skipping smp_start_secondaries barely resulted in any power saving
18:47rany has joined #asahi-dev
18:47yukathe cores/clusters can hardly use less energy than when they're not turned on in the first place?
18:48chaos_princessare you sure they are off?
18:52snek has quit [Remote host closed the connection]
18:52snek has joined #asahi-dev
19:04rany has quit [Ping timeout: 480 seconds]
19:04rany has joined #asahi-dev
19:12rosalyntg has quit [Read error: Connection reset by peer]
19:12rosalyntg has joined #asahi-dev
19:19rany has quit [Ping timeout: 480 seconds]
19:28rany has joined #asahi-dev
19:29mripard has quit [Ping timeout: 480 seconds]
19:40mripard has joined #asahi-dev
19:46pb17 has quit [Ping timeout: 480 seconds]
20:06pb17 has joined #asahi-dev
20:08bgb has quit [Remote host closed the connection]
20:08bgb has joined #asahi-dev
20:27lacamar has joined #asahi-dev
20:39lacamar has quit [Quit: ZNC 1.10.2 - https://znc.in]
20:40___nick___ has joined #asahi-dev
20:42bgb has quit [Remote host closed the connection]
20:43bgb has joined #asahi-dev
20:50lacamar has joined #asahi-dev
21:01Yushi_ has joined #asahi-dev
21:02Yushi has quit [Remote host closed the connection]
21:02Yushi_ is now known as Yushi
21:25user890104 has quit [Ping timeout: 480 seconds]
21:27user890104 has joined #asahi-dev
22:44revadam has joined #asahi-dev
22:44revadam has quit []
22:48pb17 has quit [Ping timeout: 480 seconds]
22:49pb17 has joined #asahi-dev
23:41alessaba has quit [Ping timeout: 480 seconds]
23:41alessaba has joined #asahi-dev