04:14treasuryx: <treasuryx> so it's quite simple for Bitcoin you generate random numbers and ask for collision from in format own generated number with blocks nodes in the Blockchain to see if servers rng did good job, that means only if collision is detected you need a new number, otherwise the occupancy does never matter. the rng technically would never fail if they were cheating like you in life, if
04:14treasuryx: they were as <treasuryx> big as trash as you however. But you have to collect the response all the time, it's rpc but not internet in cpuminer so it is the bottleneck, can be recoded however number of threads in too aggressive modes, would cause random runaheads and you'd have no way of telling what to discard, remember that you are butchers not programmers you are alien butcher staff.
04:14treasuryx: someday soon your balls will <treasuryx> be removed however. so you are pushing number of generated hashes to comparison through multibank accesses the single threaded mode already accommodates block size length of this you can not push to several blocks at the same time that way you would cause your own numbers to collide and .... validating yourself is not very intelligent thing to do, as
04:14treasuryx: you give work to yourself where as you <treasuryx> never used rng in the first place so your numbers do not collide anyways. so even Bitcoin miner does not take advantage of multiple threads it's too simple model for it. vulkan compute shaders hence, pointless.
04:23Ermine: dwfreed: requesting banhammer
05:39DavidHeidelberg: eric_engestrom: I could reproduce the same failure 2 times in my MR, but not in the different previous MRs pipelines, now it passed, but I'm afraid something is wrong, can you check it's ok? https://mesa.pages.freedesktop.org/-/mesa/-/jobs/58794048/artifacts/results/summary/results/trace@broadcom-rpi4@behdad-glyphy@glyphy-v2.trace.html
05:39DavidHeidelberg: it's not standard flake, because the screenshot was identical each time and it's pretty non-flake specific
08:20luc: I'd appreciate if someone could shed light on the throttle thing under X11/mesa? When exactly is it needed? https://elixir.bootlin.com/mesa/latest/source/src/gallium/frontends/dri/dri_drawable.c#L529
08:23MrCooper: luc: it limits how many frames the CPU can run ahead of the GPU
08:25luc: MrCooper: if vblank is enabled, does it imply to throttling?
08:26MrCooper: not directly
08:28MrCooper: with the same number of colour buffers in the rotation, sync-to-vblank makes the underlying issue worse, since it results in higher input→output latency
08:46luc: MrCooper: IIUC, it means even if vblank is enabled, we still have to do throttling for lower latency, doesn't it?
08:47MrCooper: right
08:47luc: thanks a lot
08:48MrCooper: no worries
11:43sima: pinchartl, did you look at the bridge hotplug proposal already?
11:46sima: well especially the hotunplug part ...
11:49pinchartl: sima: notyet. I suppose I should ? :-)
11:50pinchartl: sima: what's your opinion on making connectors more dynamic, and allowing them to be created and removed at runtime ?
11:51emersion: they already are
11:51emersion: for DP-MST
11:53pinchartl: indeed
12:35sima: pinchartl, yeah that's my main take on this too, we should tie bridge hotplug a lot more to the connector
12:35sima: since hotplug for that is already solved
12:36sima: but it means that "who creates the connector" becomes even more fun for bridges ...
12:38pinchartl: if we want bridges to become hot-pluggable resources, we need a way to signal bridges being removed, and we need drivers to react to that correctly
12:39pinchartl: we may need a complete redesign of the bridge attach/detach API
12:42mripard: plus all the use after free issues I'm sure it would entail :)
12:44pinchartl: mripard: yes, those come as an added bonus of course
12:45pinchartl: you get them for free
12:53sima: pinchartl, yeah I think I'll just put that part as an open into my mail
12:54sima: the patch set has a hotplug bridge to absorb some of the fun, but I think that needs to be lifted into shared code or it wont work all that well
12:54sima: I'll focus more on the lifetime/locking fun
12:57pinchartl: the "hotplug bridge" seems a bit of a hack :-S
13:42karolherbst: mareko: I'm hitting the assert you added in 0e546fb6833dd178bb9f7889c82ae38e14dd868d sometimes when calling into clear_buffer
14:04karolherbst: gfxstrand: up for a quick review? https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29230
15:44gfxstrand: karolherbst: done
15:50karolherbst: thanks!
17:58DavidHeidelberg: karolherbst: heya! I think about the freedreno+rusticl could be merged (at least for LLM it works), but I would maybe guard it somehow to prevent people accidentally using it ?
17:59DavidHeidelberg: lumag: what do you think ^ ?
18:03karolherbst: DavidHeidelberg: I mean.. there is still the env variable
18:04karolherbst: soo... nobody will use it unless they really want to anyway
18:12DavidHeidelberg: right :)
18:52JoshuaAshton: pinchartl, sima: FWIW, there are still weird issues with unavoidable EINVALs with MST hotplugging due to connectors being removed/added kernel side. It broke a lot of userspace assumptions.
18:54emersion: i think we fixed these?
18:54JoshuaAshton: Link?
18:55JoshuaAshton: I remember seeing those in Gamescope still with our dock that transitions from SST to MST when > 1 connector, definitely hit an EINVAL at some point there occasionally
18:56emersion: i remember about this one https://lore.kernel.org/dri-devel/20231005131623.114379-1-contact@emersion.fr/
18:58JoshuaAshton: I am thinking about where you get a New Device event thing from polling, then go to set up the connector, query it, then by the time you want to use it it's been removed
18:58emersion: t should be in the unregistered state
18:58emersion: iit*
18:58emersion: hm
18:58emersion: maybe that only happens when the connector has been enabled?
18:58emersion: would need to check the kernel source again
18:59JoshuaAshton: It's very difficult to see in like typical cable plug scenarios, but a Dock initializing as SST then doing a MST transition very shortly after triggers it pretty reliably fwir
19:03JoshuaAshton: You could probably reproduce it synthetically in your app by just adding a big sleep after you query the connectors and unplugging the cable in that time
19:03JoshuaAshton: (on an MST dock)
19:07sima: JoshuaAshton, so as long as you don't include the connector, you shouldn't get EINVAL due to hotunplug
19:07sima: at least we've tried to fix all these
19:07sima: if you do include it, it's kinda unavoidable by design, because userspace doesn't hold a connector reference
19:07JoshuaAshton: yeah
19:07sima: so between you getting the connector stuff and then trying a modeset it might be gone again
19:08sima: if you want to fix that, we could add userspace refcounting
19:08sima: like a special GETCONNECTOR ioctl flag that opens a reference
19:08sima: and you need to promise to close that with some new ioctl again
19:08JoshuaAshton: Sounds good to me -- but also migggghtttt be abusable?
19:09JoshuaAshton: I guess there is nothing stopping a userspace from being naughty and leaking connectors kernel side then
19:09sima: you'd still get an EINVAL though if it's gone, but at least there's a guarantee that the connector id won't be reused by something else
19:09sima: JoshuaAshton, you need to physically replug to actually leak anything
19:09JoshuaAshton: Sure
19:09sima: and we'd drop the refcount on close(drmfd)
19:09JoshuaAshton: ye
19:09sima: so it's kinda meh
19:10sima: but also, it's not really giving you the "no EINVAL" guarantee, since if the thing is gone it's kinda hard to modeset on it
19:10sima: I guess we could allow that, but might be somewhat funky and timeout prone ...
19:10sima: (only on these special refcounted drm connectors)
19:11emersion: another way would be a "i've seen this hotplug event" kind of IOCTL from userspace
19:11JoshuaAshton: Yeah, makes sense when you can't modeset on it anyway really
19:11sima: JoshuaAshton, so anyway, if it's a big issue we can certainly adjust the uapi
19:11emersion: or, if you just want a workaround, wat 30s and then delete the connector
19:11emersion: wait*
19:11sima: but kinda another point in making hotpluggable bridges work like dp mst connectors, defo don't want to flavours of all these sharp uapi corners
19:12sima: emersion, there's kinda the hotplug sequence counter for that
19:12emersion: yea
19:12sima: I guess we could pass that sequence counter in as part of the atomic commit
19:12emersion: not exposed to userspace
19:12sima: and if they mismatch, give you a special errno
19:12emersion: … maybe
19:12sima: well would be a good reason to do that
19:13sima: but fundamentally there's just a race there
19:14sima: and I think the current uapi that guarantees (or well tries to, we still find bugs&corners) that you wont get a hotunplug EINVAL as long as you don't include connector properties in your atomic commit is probably the best we can do
19:17emersion: the timer workaround thing would solve it
19:18emersion: it's not _great_, but we've been doing that for Wayland globals (which are Hard to fix for reasons) and it works very well
19:32sima: emersion, the timer would need to be on the connector status change to unplugged itself
19:32sima: which kinda opens a can of worms if we do this across all drivers
19:32emersion: not sure i understand
19:33sima: since delaying the connector deletion only delays reallocating the kms id of that connector
19:33sima: you still get EINVAL the moment it's unplugged (if it's included in a modeset/atomic ioctl call)
19:33emersion: hm yeah
19:33sima: so also a bit a question of what's the real issue, just connector id confusion, or also the EINVAL
19:36sima: emersion, hence why I'm leaning towards exposing the hotplug seqno and passing that as an argument to atomic and then failing with a special E_OUT_OF_DATE errno or so
19:36emersion: yeah that sounds better
19:36sima: and then just leaving it to userspace how it wants to recover
19:36sima: EIDRM sounds neat for this :-)
19:37emersion: it could generalize to other state that needs sync as well
19:38sima: yeah could do it in general for IMMUTABLE properties that the kernel sets
19:39sima: if the value you supply doens't match you get the special errno back
19:39sima: but the hotplug seqno should cover it all pretty well, including the connector id confusion case
19:39emersion: well
19:39emersion: connector confusion would happen anyways
19:40emersion: you can GETCONNECTOR and then get the wrong thing back
19:41sima: well would need it there too
19:41sima: hm the epoch counter is per connector
19:41emersion: but that wouldn't generalize
19:41emersion: GETPROPERTY etc
19:42emersion: eh
19:42sima: so you actually cannot use that to avoid confusion, we'd need to make the epoch counter at least device global
19:42emersion: i think the epoch counter is per-connector for a good reason?
19:42emersion: hm
19:42emersion: i think to detect when a connector changed?
19:42sima: yeah it needs to be per-connector
19:42sima: but we'd need a global timeline
19:42emersion: so would need a new but similar thing
19:42emersion: right
19:42sima: so that when a connector is unplugged and a new one is replugged, it has a higher epoch counter
19:43sima: well it's not yet exposed, so doesn't matter
19:43emersion: right
19:43emersion: indeed
19:43sima: and even if it is, it would just mean the epoch increments a bit faster, when it does
19:43sima: which userspace already needs to cope with anyway
19:43emersion: yea
19:43sima: emersion, so thinking some more for the GET* one, if you just wrap it in GETPROP calls for the epoch, that should be enough?
19:44sima: like you get the connector id from the uevent, so you can just go right ahead and grab the epoch of that
19:44sima: and then do whatever you feel like, and then recheck the epoch
19:44sima: so we'd also need to make sure that we send out the connector id everywhere
19:45emersion: that sounds a bit cumbersome for userspace i must admit
19:46emersion: do a bunch of things, then check the epoch, f it changed rollback all these things…
19:46emersion: would be nicer to have -ETRYAGAIN
19:47emersion: a "ACK epoch" mechanism would allow for that
19:47sima: uh there's still a lot of places which don't even send out the connector id :-/
19:47emersion: yeah, and we can't send the connector ID always
19:48emersion: when you unplug a dock there might be 2 connectors involved
19:48sima: well I mean a lot of places that could but don't
19:48sima: emersion, well those could just send 2 events
19:48emersion: i tried to fix at least some of them
19:48emersion: sima, amdgpu groups these
19:48emersion: well, it's nicer to have a single uevent for a single logical change
19:48emersion: user-space only needs to rescan once
19:49sima: well most should go out through dp mst helpers, which atm just batches them because it doesn't bother
19:49emersion: i reall thought i fixed that…
19:49sima: wouldn't be too hard to keep track of the impacted connector, and if there's more than one, clear that and send the big event
19:50emersion: yeah i implemented something like this
19:50sima: emersion, I think on the big driver the usual connector events are fixed, but not dp mst stuff
19:51sima: I think at least, from a few quick greps
19:52emersion: hm i fixed drivers but not DP-MST it seems
19:52emersion: https://patchwork.freedesktop.org/series/95938/
19:53sima: yeah, there's also a pile more
19:54sima: git grep is 48 vs 19 ...
20:00ernstp: so intel-vulkan requires llvmspirvlib now?
20:03airlied: yeah to buuild
20:11ernstp: been trying to maintain a mesa ppa with ubuntu 20.04 (focal) support but I think I have to drop that now
20:11ernstp: well, there has to come a time for that
20:54kisak: ernstp: fwiw, spirv-llvm-translator 15-18 are on the build farm focal i386 whitelist. You can unstuck yourself https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa/+sourcepub/15775693/+listing-archive-extra
21:04ernstp: hi kisak! looked like spirv-llvm-translator wanted gcc-13 though? and got some test failures when building with gcc-9 instead..
21:05ernstp: was trying with -16 though. perhaps -15 would work better...
21:19pinchartl: emersion: sima: I like the seqno idea
21:21pinchartl: regarding reuse of the connector id, I wonder if we could avoid reusing ids. that won't work if we consider transient objects like frame buffers, but for objects that have a longer life span, could we just increase the id ?
21:21pinchartl: that brings other issues obviously
21:21pinchartl: we'll have a wraparound at some point
21:22pinchartl: but maybe we don't need to care about >2G plugs/unplugs ?
21:25kisak: spirv-llvm-translator-## should be the same number as the llvm build you're using with mesa.
21:32emersion: imho warparound is fine
21:33emersion: hm
21:33emersion: would need to make sure to skip already allocated IDs though
21:34pinchartl: that may lead to log(n) operations
21:34pinchartl: sorry, O(n)
21:35pinchartl: too late to type
21:35pinchartl: or think :)
22:51DemiMarie: not if one uses a range tracking data structure that makes this fast