#
…

2023-07-22

00:03mikelee has quit [Ping timeout: 480 seconds]
00:12mikelee has joined #asahi-gpu
00:22mikelee has quit [Ping timeout: 480 seconds]
00:36mikelee has joined #asahi-gpu
00:44ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
00:44mikelee has quit [Ping timeout: 480 seconds]
00:54ourdumbfuture has joined #asahi-gpu
01:01hightower3 has joined #asahi-gpu
01:08hightower2 has quit [Ping timeout: 480 seconds]
01:09mikelee has joined #asahi-gpu
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi-gpu
01:21fenix144 has quit [Remote host closed the connection]
01:25mikelee has quit [Ping timeout: 480 seconds]
01:32ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
01:35jeisom has joined #asahi-gpu
01:37mikelee has joined #asahi-gpu
01:37ourdumbfuture has joined #asahi-gpu
01:45mikelee has quit [Ping timeout: 480 seconds]
01:50WindowPa- has joined #asahi-gpu
01:51WindowPain has quit [Read error: Connection reset by peer]
01:53mikelee has joined #asahi-gpu
02:03mikelee has quit [Ping timeout: 480 seconds]
02:13mikelee has joined #asahi-gpu
02:21mikelee has quit [Ping timeout: 480 seconds]
02:30mikelee has joined #asahi-gpu
02:37jeisom has quit [Ping timeout: 480 seconds]
02:37Hibyehello has quit [Ping timeout: 480 seconds]
02:39mikelee has quit [Ping timeout: 480 seconds]
02:48chadmed has quit [Remote host closed the connection]
02:50mikelee has joined #asahi-gpu
02:52ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
03:01skipwich has quit [Quit: DISCONNECT]
03:02skipwich has joined #asahi-gpu
03:05mikelee has quit [Ping timeout: 480 seconds]
03:16mikelee has joined #asahi-gpu
03:24mikelee has quit [Ping timeout: 480 seconds]
03:46rhoanrep_ has joined #asahi-gpu
03:46rhoanrepper has quit [Read error: Connection reset by peer]
03:47tristan2_ has joined #asahi-gpu
03:48tristan2 has quit [Ping timeout: 480 seconds]
04:14mikelee has joined #asahi-gpu
04:23mikelee has quit [Ping timeout: 480 seconds]
04:25stipa is now known as Guest6670
04:25stipa has joined #asahi-gpu
04:25Guest6670 has quit [Read error: Connection reset by peer]
04:32mikelee has joined #asahi-gpu
04:46mkurz has joined #asahi-gpu
04:56mikelee has quit [Ping timeout: 480 seconds]
05:05chadmed has joined #asahi-gpu
05:06mikelee has joined #asahi-gpu
05:16mikelee has quit [Ping timeout: 480 seconds]
05:19mkurz_ has joined #asahi-gpu
05:23mkurz has quit [Ping timeout: 480 seconds]
05:32mikelee has joined #asahi-gpu
05:35mkurz has joined #asahi-gpu
05:39mkurz_ has quit [Ping timeout: 480 seconds]
05:43mikelee has quit [Ping timeout: 480 seconds]
05:46mikelee has joined #asahi-gpu
05:49novafacing has quit [Ping timeout: 480 seconds]
05:54mikelee has quit [Ping timeout: 480 seconds]
06:00mikelee has joined #asahi-gpu
06:02wicastC has quit [Remote host closed the connection]
06:02wicastC has joined #asahi-gpu
06:08mikelee has quit [Ping timeout: 480 seconds]
06:08mkurz has quit [Remote host closed the connection]
06:18mikelee has joined #asahi-gpu
06:22mkurz has joined #asahi-gpu
06:27mikelee has quit [Ping timeout: 480 seconds]
06:33mikelee has joined #asahi-gpu
06:42mikelee has quit [Ping timeout: 480 seconds]
06:42mikelee has joined #asahi-gpu
07:30mkurz has quit [Read error: Connection reset by peer]
07:41linaWe have a Firefox problem... it's using crazy amounts of GPU memory for some stuff, like Google Maps and the PDF renderer.
07:53mikelee has quit [Ping timeout: 480 seconds]
07:53linaMaybe the BO cache is just over-enthusiastic?
08:03mikelee has joined #asahi-gpu
08:07rhoanrep_ has quit [Ping timeout: 480 seconds]
08:13linaOof yeah, I see 10+GB of BO cache. This is bad.
08:22linaOK, I think it's not the cache, I think the cache just inherits the bloat for the extra 1-2 seconds it's programmed to
08:30linaSomehow we have batches holding onto gigabytes of BOs...
08:32linaThey do get cleaned up when they complete but... I'm seeing batches holding on to 100+ screen size (or even larger) render targets
08:35rhoanrepper has joined #asahi-gpu
08:37crabbedhaloablut has joined #asahi-gpu
08:43rhoanrepper has quit [Ping timeout: 480 seconds]
08:45mikelee has quit [Ping timeout: 480 seconds]
08:48linaIt's resource shadowing.
08:54mikelee has joined #asahi-gpu
08:54linaIt's doing many alternate draws reading a framebuffer and mapping it for write, and we're pathologically shadowing it every time which is both horribly slow and blows up memory usage.
09:02linaOoooogh and there's another big silly, the BO cache can return (sometimes wildly) oversized objects and then we go ahead and shadow them whole!
09:07jennifilm has joined #asahi-gpu
09:15mikelee has quit [Ping timeout: 480 seconds]
09:39rhoanrepper has joined #asahi-gpu
09:47rhoanrepper has quit [Ping timeout: 480 seconds]
10:26bisko has joined #asahi-gpu
10:29nsklaus has joined #asahi-gpu
10:37mikelee has joined #asahi-gpu
10:47rhoanrepper has joined #asahi-gpu
10:54mikelee has quit [Ping timeout: 480 seconds]
10:55rhoanrepper has quit [Ping timeout: 480 seconds]
10:59linaella-0: Maps is still stuttering though, but I'm not so sure where the problem is any more. At least it doesn't bloat RAM though.
11:00linaTry ASAHI_MESA_DEBUG=nowc to fix the uncached reads issue, but even with that it still stutters (but then maybe profiling will point at something else?)
11:00jeisom has joined #asahi-gpu
11:03bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:05bisko has joined #asahi-gpu
11:05bisko has quit []
11:09bisko has joined #asahi-gpu
11:13ourdumbfuture has joined #asahi-gpu
11:13rhoanrepper has joined #asahi-gpu
11:17rhoanrepper has quit [Remote host closed the connection]
11:19mikelee has joined #asahi-gpu
11:23bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:24rhoanrepper has joined #asahi-gpu
11:27bisko has joined #asahi-gpu
11:28mikelee has quit [Ping timeout: 480 seconds]
11:37mikelee has joined #asahi-gpu
11:37bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:42ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:43jeisom has quit [Ping timeout: 480 seconds]
11:45mikelee has quit [Ping timeout: 480 seconds]
11:50nela has quit [Quit: bye!]
11:50rhoanrepper has quit [Remote host closed the connection]
11:50nela has joined #asahi-gpu
11:51bisko has joined #asahi-gpu
11:54mikelee has joined #asahi-gpu
11:59hightower3 has quit [Ping timeout: 480 seconds]
11:59bisko has quit [Ping timeout: 480 seconds]
12:04mikelee has quit [Ping timeout: 480 seconds]
12:20linaOK, so Google Maps is doing this completely horrible thing where it creates several 1024x1024 texture atlases, then repeatedly uploads a nonoverlapping block with glTexSubImage2D and immediately draws it.
12:20linaI have no idea how I'd fix this without outright storing a complete per-pixel validity mask???? Is there some data structure that can efficiently handle this?
12:21linaAll those shadows/flushes can be completely elided, since it always writes to an uninitialized portion to the buffer... but we need to track that at the 2D level now to make this work.
12:25dottedmaglina: There is a data structure that holds a union of rectangles in libpixman (union of rectangles -> a set of horizontal slices, each slice contains disjoint rectangles)
12:25linaI'd need something in mesa... ^^;;
12:26dottedmagThe implementation there is pretty straightforward, could be easy to lift out or reimplement.
12:26linaAt least it looks like it's the same license, so maybe we can actually lift the code...
12:29linaI guess if we use that, the heuristic would be to track the valid rectangle the first time a resource is written, then the next time check whether the new write overlaps (which we can do with a simple box check), and if it doesn't upgrade it to full fancy rect union tracking
12:29linaThat way we don't have to involve all that code most of the time
12:30ourdumbfuture has joined #asahi-gpu
12:31mikelee has joined #asahi-gpu
12:33linaIt's 2700 lines of code...
12:35dottedmagI guess this algorithm won't need most of the operations in there.
12:36dottedmag_init_from_region, _translate, _inverse, _subtract, _intersect...
12:37dottedmag_print LOL
12:39dottedmagDoesn't Mesa have anything similar? No 2D region tracking there anywhere?
12:39linajust basic 2D box tracking, nothing finer grained
12:39mikelee has quit [Ping timeout: 480 seconds]
12:40lina3D box actually
12:40linaThe current code already plays this game for 1D buffers using a dedicated range thing, but I originally wrote that with 3D box tracking before I realized we had that range thing.
12:40linaUnfortunately 3D box tracking isn't enough for this case since it's an atlas
12:41linaThe trivial case is four quadrants get written, and then you elide the copies for the first 3 but the 4th overlaps the bounding box
12:41linaMaps does that, but it also does much more complex atlases
12:42rhoanrepper has joined #asahi-gpu
12:44linaI'm seeing ~40 regions written per atlas... I wonder if we can just track a list of nonoverlapping boxes with some max like 64? It's O(n^2) but the copies/blits are way more horrible than doing 64 box intersect checks...
12:48jannauare the regions always the same size?
12:49dottedmagMaybe BSP :) Just kidding.
12:50linaI think I'm just going to try a region list thing...
12:50rhoanrepper has quit [Ping timeout: 480 seconds]
12:51ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:52dottedmaglina: 64 boxes with 32-bit coordinates is 1024 bytes, so 8 cache lines. Peanuts, for linear scanning.
12:52dottedmag(maybe even SIMD it?)
12:53linaYeah, I think I can probably just say we track up to 128 regions and then bail or something like that.
12:54linaAnd of course the moment there is any overlap this whole mechanism gets disabled, it's strictly for the clean atlas use case
13:02jeisom has joined #asahi-gpu
13:04ourdumbfuture has joined #asahi-gpu
13:05mikelee has joined #asahi-gpu
13:15mikelee has quit [Ping timeout: 480 seconds]
13:17ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:18dottedmaglina: If this turns out to be on a hot path: http://paste.debian.net/plain/1286632
13:21bisko has joined #asahi-gpu
13:25bisko has quit []
13:26mikelee has joined #asahi-gpu
13:28bisko has joined #asahi-gpu
13:28possiblemeatball has joined #asahi-gpu
13:32bisko has quit []
13:39ourdumbfuture has joined #asahi-gpu
13:40bisko has joined #asahi-gpu
13:43bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:44possiblemeatball has quit [Quit: Quit]
13:44bisko has joined #asahi-gpu
13:45bisko has quit []
13:46mikelee has quit [Ping timeout: 480 seconds]
13:51rhoanrepper has joined #asahi-gpu
13:52ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:59mikelee has joined #asahi-gpu
13:59rhoanrepper has quit [Ping timeout: 480 seconds]
14:00Hibyehello has joined #asahi-gpu
14:03ourdumbfuture has joined #asahi-gpu
14:07mikelee has quit [Ping timeout: 480 seconds]
14:12rhoanrepper has joined #asahi-gpu
14:15rhoanrepper has quit []
14:20jeisom has quit [Ping timeout: 480 seconds]
14:21mikelee has joined #asahi-gpu
14:26jannausigh, I think I have for the first time the firefox hang. unfortunately on asahi-6.4-3 / asahi-20230706
14:27jannau61 times "Blocking due to fragment queue full", 4 times with vertex in dmesg
14:28jannauis there anything useful I can do while the firefox is still "running"?
14:40mikelee has quit [Ping timeout: 480 seconds]
14:41ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:46mikelee has joined #asahi-gpu
14:54mikelee has quit [Ping timeout: 480 seconds]
14:57Hibyehello has quit [Quit: ZNC 1.8.2 - https://znc.in]
14:57Hibyehello has joined #asahi-gpu
15:00c10l5 has quit []
15:01mikelee has joined #asahi-gpu
15:08c10l5 has joined #asahi-gpu
15:20mikelee has quit [Ping timeout: 480 seconds]
15:22mikelee has joined #asahi-gpu
15:30mikelee has quit [Ping timeout: 480 seconds]
15:32mikelee has joined #asahi-gpu
15:34jeisom has joined #asahi-gpu
15:44amarioguy has quit [Remote host closed the connection]
15:46mikelee has quit [Ping timeout: 480 seconds]
15:55nepeat has quit [Quit: ZNC - https://znc.in]
15:57nepeat has joined #asahi-gpu
16:05possiblemeatball has joined #asahi-gpu
16:06possiblemeatball has quit []
16:10possiblemeatball has joined #asahi-gpu
16:10mikelee has joined #asahi-gpu
16:17ourdumbfuture has joined #asahi-gpu
16:19mikelee has quit [Ping timeout: 480 seconds]
16:20possiblemeatball has quit [Quit: Quit]
16:27mikelee has joined #asahi-gpu
16:29jeisom has quit [Ping timeout: 480 seconds]
16:40mikelee has quit [Ping timeout: 480 seconds]
16:41rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
16:41Guest6167 has quit [Quit: Bridge terminating on SIGTERM]
16:43dylanchapell has joined #asahi-gpu
16:45rhysmdnz has joined #asahi-gpu
16:45Jamie has joined #asahi-gpu
16:45mikelee has joined #asahi-gpu
16:45Jamie is now known as Guest6702
16:49ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:51ourdumbfuture has joined #asahi-gpu
16:53mikelee has quit [Ping timeout: 480 seconds]
17:01linajannau: see if the kernel reports any blocked tasks, and same after you kill firefox... but I don't really know at this point ;;
17:01mikelee has joined #asahi-gpu
17:02linaif firefox dies cleanly when you kill it and no kernel threads get stuck I don't think it's *that* problem
17:02linaI saw a different thing earlier with an older version of firefox where right clicking on a link on the GitHub page would hang it for a while, until something timed out and killed it, but it wasn't the kernel side getting wedged like before I think
17:02linaAnd it went away after an update...
17:03linaYou could try gdb and seeing where all the threads are waiting
17:15ourdumbfuture has quit [Read error: Connection reset by peer]
17:17mikelee has quit [Ping timeout: 480 seconds]
17:27mikelee has joined #asahi-gpu
17:32ourdumbfuture has joined #asahi-gpu
17:33possiblemeatball has joined #asahi-gpu
17:36jannauunfortunately many missing symbols but nothing suspicious. killed cleanly and no further kernel messages
17:42linaI think that might be a userspace bug then...
17:44possiblemeatball has quit [Quit: Quit]
17:55mikelee has quit [Ping timeout: 480 seconds]
18:01dottedmagIsn't it fun that there are so many userspace bugs uncovered by M1 that _any_ bug might actually be in the application code?
18:09mikelee has joined #asahi-gpu
18:22linaI mean it could be mesa too, I'm just not sure it's a kernel issue at this point ^^
18:42mikelee has quit [Ping timeout: 480 seconds]
18:50mikelee has joined #asahi-gpu
19:00mikelee has quit [Ping timeout: 480 seconds]
19:10mikelee has joined #asahi-gpu
19:26mikelee has quit [Ping timeout: 480 seconds]
19:32fenix144 has joined #asahi-gpu
19:33ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:36mikelee has joined #asahi-gpu
19:43ourdumbfuture has joined #asahi-gpu
19:44fenix144 has quit [Remote host closed the connection]
19:52mikelee has quit [Ping timeout: 480 seconds]
20:13rosefromthedeadhrm, i'm reading timestamps from CNTVCT_EL0 before submitting jobs and the finish timestamp on some of the jobs is ending up earlier than when they were submitted lol
20:13rosefromthedeadbut only slightly
20:14mikelee has joined #asahi-gpu
20:15rosefromthedeadgonna write that off as "wow, these machines really *are* quick!" for now
20:16rosefromthedeadi wonder whether we could (/should) #ifdef the timestamp ioctl behind !ARM64 and use inline asm otherwise
20:22mikelee has quit [Ping timeout: 480 seconds]
20:32jeisom has joined #asahi-gpu
20:53alyssa has joined #asahi-gpu
20:53alyssarosefromthedead: the important thing is that it works on !ARM64 for FEX reasons
20:54alyssa has quit []
20:59ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:00Z750 has quit [Quit: Ping timeout (120 seconds)]
21:01Z750 has joined #asahi-gpu
21:02mikelee has joined #asahi-gpu
21:12mikelee has quit [Ping timeout: 480 seconds]
21:13ourdumbfuture has joined #asahi-gpu
21:20mikelee has joined #asahi-gpu
21:29mikelee has quit [Ping timeout: 480 seconds]
21:44mikelee has joined #asahi-gpu
21:59mikelee has quit [Ping timeout: 480 seconds]
22:00mikelee has joined #asahi-gpu
22:08mikelee has quit [Ping timeout: 480 seconds]
22:11maria has quit [Remote host closed the connection]
22:12maria has joined #asahi-gpu
22:16mikelee has joined #asahi-gpu
22:24mikelee has quit [Ping timeout: 480 seconds]
22:34mikelee has joined #asahi-gpu
22:44mikelee has quit [Ping timeout: 480 seconds]
22:56crabbedhaloablut has quit []
23:02ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
23:08mikelee has joined #asahi-gpu
23:09fenix144 has joined #asahi-gpu
23:15ourdumbfuture has joined #asahi-gpu
23:16chadmed has quit [Remote host closed the connection]
23:18chadmed has joined #asahi-gpu
23:18mikelee has quit [Ping timeout: 480 seconds]
23:24nsklaus has quit [Ping timeout: 480 seconds]
23:28mikelee has joined #asahi-gpu
23:37mikelee has quit [Ping timeout: 480 seconds]
…