08:00sima: alyssa, thanks for typing up the more reliable tiler heap heuristics, saved me some work
08:00sima: bbrezillon, ^^ was about to type that up for you re your "possible perf regressions" comment from yesterday
08:01sima: bbrezillon, it's probably still reasonable to have the page fault handler at least try to save the day with GFP_NORECLAIM allocations
08:03tanty: cmarcelo, from Igalia's side I don't think we are using vkrunner as a library.
08:18bbrezillon: sima: yeah, alyssa's comment got me thinking to, and I think I can come up with something for panthor's tiler heap that would try a non-blocking allocation, then, if it fails, fallback to incremental rendering, and defer blocking allocation to a separate workqueue, so more chunks are available next time the tiler needs them
08:19bbrezillon: but I still have no solution for older GPUs, which we're asked to support Vulkan on, and which I'd love to use the same transparent shrinker (swapout on reclaim, swapin on next VM use) on
08:22sima: bbrezillon, I have a really horrendous idea
08:22bbrezillon: shoot
08:22sima: let me do some workout to decided whether I want to attach my name to it before I go type
08:22sima: it's like ... terrible
08:22bbrezillon: :D
08:26sima: it might also not work, depending how picky the hw is
08:39bbrezillon:compulsively hitting the "Get Mail" button to see sima's crazy idea :-)
08:48sima: bbrezillon, I'll ping you
08:48sima: also got distracted writing some notes instead of doing work-out
08:49bbrezillon: Good training
10:01daniels: sima: as long as it's better than forcing all rendering to be completely synchronous on hardware which can't do incremental rendering :)
10:54sima: daniels, it's not strictly better, but I think like overcommit we can pile up enough very clever tricks that it's good enough in practice without breaking too many fundamental pillars
10:54sima: also it's getting worse, the longer I'm drafting notes :-P
12:01sima: bbrezillon, daniels I'm sorry :-(
12:27bbrezillon: sima: don't be. The global mempool idea is something Arm wanted to have for this kind of on-demand/unpredictible allocations (it's called JIT-something in kbase)
12:28sima: bbrezillon, even for panthor?
12:28sima: I guess it might still be beneficial, but maybe with slightly less aggressive limit heuristics so we don't waste too much memory
12:30sima: bbrezillon, and the horrible thing is just step 2, trying to get an actual dynamic memory requirement out of a dead context
12:32bbrezillon: oh yeah
13:32alyssa: daniels: you don't like mesa statically allocating 128MB for every VkDevice just in case???
13:48sima: 128MB for you, 128MB for you, 128MB for everyone!
13:48sima: who doesn't like that
13:52MrCooper:was hoping for a car or something
14:05alyssa: unfortunately the witcher 3 is OOMing the 128MB
14:05alyssa: so i might need to bump to 512M or something everywhere
14:05alyssa: :p
14:18kusma: mareko: I'm having some issues understanding the interaction of AMD_framebuffer_multisample_advanced and ARB_internalformat_query... The problem I see arise when some formats supports higher multisample-counts than others, yet AMD_framebuffer_multisample_advanced says that an implementation *must* support up to MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD samples, and specifying samples higher than that are illegal... That erase that flexibility again,
14:18kusma: doesn't it?
14:19kusma: We're also applying that limitation in Mesa for all renderbuffers, but I think that should only apply when RenderbufferMultisampleAdvancedAMD is called...
14:37daniels: alyssa: on the bright side, Collabora could really monetise our production-ready branch with awesome memory savings from just reverting to how it was before
14:38alyssa: real
14:39bbrezillon: $$$$$$
14:41alyssa: unrelated, but does anyone else get annoyed by dozens of "Image Type operand of OpTypeSampledImage should not have a Dim of Buffer.' when running vk cts
14:53zmike: yes
14:57alyssa: how do we fix this
15:00zmike: impossible
15:07alyssa: k
15:17melissawen: if userspace tries an async page flip and gets a EINVAL rejection, userspace will try to perform a sync flip, right? it will try again async flipping or not anymore after the first rejection?
15:19zamundaaa[m]: melissawen: yes, it'll fall back to sync
15:20zamundaaa[m]: Or maybe first async with some planes removed or sth. The usual mess with atomic tests
15:23melissawen: zamundaaa[m], I see... so userspace can approach the rejection with trial and error?
15:23zamundaaa[m]: Yes
15:26melissawen: I see. Thanks for clarifying! I'm in a context where AMD driver rejects an async page flip when the fb mem type changes: https://lore.kernel.org/amd-gfx/20230804182054.142988-1-hamza.mahfooz@amd.com/
15:27emersion: melissawen: it can fallback to front buffer rendering like Xserver does
15:27emersion: ie, mutate the current front buffer
15:32melissawen: So, at some point, AMD driver allocates FB in VRAM but when there is no more space in VRAM, it passes to allocate in GTT without explicitly mention the mem type change. So, the async flip test in IGT started to fail because of this dual mem types :/
15:33melissawen: I'm trying to figure out what is the right way to implement this mem type change condition in the IGT test
15:33melissawen: considering userspace perspective
15:34melissawen: I don't think userspace is aware of these two mem types to decide the right conditions to try to async flip
15:35emersion: async flip is allowed to fail for any driver-specific reason
15:36melissawen: emersion, yeah, but how to better translate this expectation in the current async flip test?
15:37melissawen: maybe just allowing failure, and then skipping the test?
15:37melissawen: or trying a different set of planes, for example? or... just failing the test and, that's it?
15:40emersion: yeah, i'd say skipping is fine
15:40emersion: i wonder how other tests requiring hw features behave?
15:40emersion: like, plane tests
15:41emersion: (could skip on -EINVAL and hard fail on anything else)
15:43melissawen: I suspect current implementation isn't generic enough about hw features. It creates a scenario in which the test should not fail for any reason, but probably this scenario is valid just for a subset of hw.
15:43emersion: indeed
15:44melissawen: and then specific limitations were added over time
15:44melissawen: I wonder if I should add another specific limitation for AMD's case or what hahaha
15:45melissawen: I think I'll follow your suggestion to just skip if EINVAL
15:46melissawen: thanks .o/\o.
15:47emersion: cool, feel free to CC me :P
15:50melissawen: sure!
16:23cmarcelo: tanty: thanks good to know. I might write up an MR to start a more wider discussion then.
17:38alyssa: gfxstrand: for sparseBuffer emulation, I'll need to use a different address for loads vs stores/atomics of SSBOs
17:38alyssa: I can calculate the required fixup in shader, the buffer descriptor remains the same thing that nvk uses
17:39alyssa: any preferences on how that looks like wrt the common code?
17:39alyssa: easiest thing for me is probably a special address mode
17:40alyssa: or a pair of new modes (one robust, one not)
17:41alyssa: I just don't know how much weirdness we are ok putting in lowre_explicit_io
17:41alyssa: otoh, if bbrezillon goes thru with sparse on panvk, this will be used there too lol
18:05sima: alyssa, I guess minimally zink needs to pass this up through gl as arb_context_robustness fail
18:05sima: for everything else you don't replay work, you just eat the gpu hang and potentially a bunch of corrupted rendering and hope that's enough
18:06sima: it's not any different from current gl "recovery"
18:09alyssa: ouch
18:14sima: alyssa, well hence the bracketing with the tricks in step 1 and quirks in 3 to try and make sure this doesn't actually ever happen
18:14sima: or once per game you run or something like that
18:14sima: and I did say this is terrible
18:19sima: bbrezillon, I don't think you gain anything from a background task, because memory reclaim will already try to make more memory available, to help the current job
18:20sima: and resizing on the next cs ioctl avoids all the pain with async errors and potential deadlocks
18:20sima: I guess I'll reply on-list too
20:59mareko: kusma: yes, that extension doesn't allow different sample counts for different formats
21:02kusma: Ack, thanks!