06:21flowejam: Hey all, I'm quite new to kernel dev, with a handful of small patches (in C). I guess I'm looking for an excuse to learn Rust, and thought of contributing to the Rust for linux project after going through the Rust book. Would it be better just to stay focused on submitting patches in C though? I guess since I'm neither experienced in kernel dev nor in Rust, I'm wondering if this project is mainly just for very experienced ker
06:24dolphin: flowejam: It of course depends on what your end goal is, but the Rust in kernel is not standard Rust in many ways
06:24dolphin: if you want to be effective in fixing bugs or implementing features, may be good to get familiar with the C side of things and work on the Rust skills orthogonally
07:42mripard: mlankhorst: will you send the drm-misc-next PR ?
08:23fomys: emersion: VKMS devices will all have a different name (folder name in configFS) see make_device_group / https://lore.kernel.org/all/20250901122541.9983-3-jose.exposito89@gmail.com/ + https://elixir.bootlin.com/linux/v6.17.1/source/drivers/gpu/drm/vkms/vkms_drv.c#L156-L157
08:24fomys: The only one named "vkms" is the default device (modprobe vkms create_default_dev=1)
08:24emersion: oh you're in here, nice
08:24emersion: cool!
08:24emersion: so yeah it's more of a businfo than a deviceinfo
08:31fomys: Yes, I'm here, I just need to remember to open my IRC client x)
13:32gfxstrand: cwabbott: It would be lovely if I could get an ack on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803 at some point
13:33gfxstrand: I can just land the first patch without the turnip one but that seems kinda pointless
15:03alyssa: gfxstrand: will my ack count
15:03alyssa: oh danylo did it
17:45gfxstrand: robclark, bbrezillon: I think I'm going to drop util_l1_cacheline_size() in favor of just making util_cpu_caps.cacheline correct on arm
17:46robclark: seems reasonable
17:50gfxstrand: I just need to double-check that my 32-bit code works.
18:34HdkR: gfxstrand: How does this work on hardware with different d-cacheline size depending on core?
18:34gfxstrand: HdkR: Good question!
18:34gfxstrand: Presumably we have to flush at the minimum size because we don't know what core we're on but assume granularity of the higher size.
18:34gfxstrand: Ugh...
18:35HdkR: :>
18:35gfxstrand: Probably want DminLine for flushes but CWG for granularity
18:37gfxstrand: Wait... Is CTR per-core?
18:38HdkR: yeppers
18:38gfxstrand: Big.little is evil
18:39HdkR: It's almost like the kernel should provide some min/max values for all cores in the system or something.
18:39gfxstrand: Would be nice...
18:40gfxstrand: There's SV_LEVEL1_DCACHE_LINESIZE but glibc just implements that by grabbing the bit from CTR_EL0 on whatever core you're on
18:40HdkR: It's a good joke that one
18:42gfxstrand: Are people actually making chips where those two are different?
18:42HdkR: Of course!
18:42vsyrjala: maybe the instruction should just take start+end and dtrt
18:43HdkR: A common config is 64-byte on the big core, and 32-byte on the small cores.
18:45gfxstrand: https://www.mono-project.com/news/2016/09/12/arm64-icache/
18:45HdkR: Samsung infamously shipped a big.little configuration where I think it was 128B and 64B and failed to broadcast all cache clears across the boundary resulting in fun interleaved non-cleared lines
18:45HdkR: Oh hey, there it is :P
18:47gfxstrand: https://github.com/mono/mono/pull/3549/files
18:47gfxstrand: But even that's not correct because the process can get re-scheduled min-clear
18:48HdkR: Yea, definitely a bug in that
18:48HdkR: You want to start from the minimum and work up instead
18:48gfxstrand: But you don't know the minimum
18:48HdkR: Well, minimum is 4 bytes :P
18:49gfxstrand: Sure, but you don't want to flush every dword
18:49gfxstrand: You want to know the actual minimum (64B in this case)
18:49gfxstrand: But unless you can ask the kernel to bounce you around between CPUs, there's no way to get that
18:49HdkR: yep
18:50HdkR: and the sysfs cache topology information doesn't store any of that either, so you can't query through there
18:50gfxstrand: I can walk /sys/devices/system/cpu/cpu*/cache/index0/coherency_line_size
18:51HdkR: If it exists
18:51gfxstrand: yes
18:51HdkR: It's not guaranteed~
18:51gfxstrand: I assume it doesn't on Android
18:51HdkR: It doesn't exist on my Radxa with Linux
18:51gfxstrand: entertaining
18:52HdkR:stacks the pile of garbage higher
18:52gfxstrand: It's almost like we need an actual system call for this
18:53HdkR: It does exist on my other device although. So it was either added between 6.11 and 6.16, or Debian kernel is missing something...Or Maybe just missing on ACPI platforms?
18:53HdkR: It's a cluster.
18:54gfxstrand: I don't have it on my TX1
18:54gfxstrand: But I have it on my mediatech chromebook
18:54HdkR: :chefs_kiss:
18:54gfxstrand: 6.15 vs. 6.12
18:54vsyrjala: parse /proc/cpuinfo?
18:54HdkR: cpuinfo doesn't have it
18:54gfxstrand: Doesn't have it
18:55HdkR: ARM Kernel maintainers have claimed that /proc/cpuinfo is immutable and no new information can be added to it.
18:55gfxstrand: Do I at least have this in kernel data structures?
18:55gfxstrand: Because I'm happy to add a getparam and a drm helper
18:55gfxstrand: Ugh... No I'm not happy to do that
18:55alyssa: gfxstrand: do you need a hug
18:55gfxstrand: I want this in common code, damnit!
18:56HdkR: Welcome to my garbage pile, enjoy the mess of ARM.
18:56gfxstrand: I was already hating Arm this week.
18:56gfxstrand: daniels owes me soooo many beers...
18:57HdkR: Last time I asked about exposing information like this, I got told it could be a security implication so I walked out of the channel.
18:57alyssa: *checks train schedules*
18:57gfxstrand: Uh.... And not being able to proper cache maintenance isn't?
18:57HdkR: :)
18:57gfxstrand: WebGPU attackers are gonna have a field day
18:57Sachiel: just remove all the caches
18:58gfxstrand: We already tried that. Sucks for perf. Now we're trying to turn the caches back on.
18:58gfxstrand: You know what's really bad for security? Big.little.
18:58gfxstrand: Sorry. big.LITTLE
18:58gfxstrand: Because that makes sense
18:58HdkR: Ultra.Pro.Premium.Nano now
18:59gfxstrand: I kinda want to steal the Mono implementation and call it a day
18:59gfxstrand: Reading a register at the start of the loop shouldn't cost that much
19:00gfxstrand: And we just pray no one moves us to a different core
19:00gfxstrand: mid-loop
19:01gfxstrand: alyssa: Looks like it's too late to catch a train yet today
19:01HdkR: You know the kernel is going to hit at a bad time and then you'll have spurious corruption.
19:01HdkR: Which'll be even harder to track down
19:03gfxstrand: Then we'll write the minimum cache size to a file and and it'll work when they restart their app
19:03HdkR: :D
19:03gfxstrand: In any case, this has answered one very important question: I'm going to have separate files per-arch.
19:04gfxstrand: But ugh... So how do I provide the Vulkan query
19:04alyssa: gfxstrand: Yeah... earliest I could hug you is 24h from now sadly
19:05alyssa: uh wait that's a lie flights exist
19:05gfxstrand: :giggle:
19:05f_: no they don't, not in this world
19:05f_: :P
19:05alyssa: that's the spirit
19:05f_: it's the intention that counts, heh
19:06gfxstrand: Only fights. We're all out of flights.
19:06f_: I believe I could fly
19:06f_: ahem, sorry
19:06f_: f_ly
19:07gfxstrand: Yeah, I need to know min/max
19:07gfxstrand: There's no way I can implement Vulkan correctly otherwise
19:08gfxstrand: For nouveau, we're fortunate to have a pretty fixed set of CPUs to work with.
19:08gfxstrand: I'm a lot more worried about Mali
19:08gfxstrand: Or IMG
19:09gfxstrand: I suppose I can fire off a bunch of threads and hope at least one hits each CPU core
19:09HdkR: ooo, actually does the kernel emulate CTL_EL0 with differing features these days?
19:10HdkR: hmmm
19:10HdkR: CTR_EL0*
19:13gfxstrand: Yeah, the kernel does have a trap for CTR_EL0
19:14HdkR: Looking at cpufeature.c it looks like it does generate the minimum for L1I and L1D even
19:14HdkR: So you might actually be safe to read it once.
19:14gfxstrand: But I need both min and max
19:15HdkR: Welp
19:16gfxstrand: It's possible I can use CWG
19:16gfxstrand: But I don't know
19:16HdkR:checks was CWG affects
19:17HdkR: That /does/ hit the FTR_HIGHER_OR_ZERO_SAFE path so maybe!
19:19gfxstrand: HdkR: I hope you realize that you've signed up to review this code. :P
19:20HdkR: I mean, what other madhatter would there be to look at it? :P
19:20gfxstrand: Me, apparently. (-:
19:22HdkR: I do wonder when that emulation got dropped in to the kernel though. Maybe it's been there ever since Samsung messed it up and I just didn't remember it.
21:33gfxstrand: Okay, I think it's about as good as it's going to get.