Email or username:

Password:

Forgot your password?
Top-level
mawei

@lina The problem is, you can not just rewrite the DRM scheduler and expect all the other drm drivers to just migrate to rust.

To the end users, they do not really care a little, as long as their Intel/AMD/Nvidia GPUs mostly work.

But if one day all those drivers suddenly won't be supported just because they are not written in Rust, then they care a lot.

8 comments
mawei

@lina I have seen the same situation in fs realms too, some "not-so-polite" MM guys want to improve their work and pushing new interfaces to fses.

But the main objective of the maintainer for any fs, is to keep their fs working without regression. So migrating to newer interface is not the priority and will only happen gradually.

mawei

@lina To me, as long as the discussions are still kept constructive, (not some BS like "yeah, this feature is already implemented in XXX several years ago and it's all your fs' fault not to do it", or "XXXfs is definitely better than YYYYfs") some delay of merging is totally acceptable, and if one really needs to fix others' bugs, that's just bonus patches to me.

It may looks frustrating for now to fix both rust and C, but aren't more contribution better?

Asahi Linya (朝日りにゃ〜)

@mawei You're completely misunderstanding what I tried to do... I just tried to fix what arguably are bugs in drm_sched, which didn't change the API at all, they only made it reasonable to use by turning some usages from a crash to handled gracefully. And the maintainer rejected that. Because the only driver he cares about doesn't run into this issue, so he thinks it shouldn't be fixed.

mawei

@lina Then it looks weird, as normally fixing BUG_ON() or whatever to proper error handling should never be questioned.

Asahi Linya (朝日りにゃ〜)

@mawei It wasn't even BUG_ON, it would outright crash and oops... the maintainer said I was using the API wrong, but enforcing using it "right" by his definition without fixing this would require reimplementing half the logic in the scheduler outside of it just to duplicate its functionality enough to track and avoid the problem case. It's nuts. The problem could be easily fixed within the scheduler, it was just a non-intrusive change to one function to correctly handle a particular case.

mawei

@lina Well, that's worse than BUG_ON(). Unhandled error path I guess.

Asahi Linya (朝日りにゃ〜)

@mawei I'm not going to touch the existing DRM scheduler, I'm just going to write my own that is part of the driver. If Nova wants to use it we'll figure out how to make it common Rust code. C drivers can continue to use the broken C one that's already there, and fight the brokenness themselves.

The DRM scheduler is helper code, it's not a core part of the DRM subsystem. You can simply choose not to use it and roll your own. Half of DRM is like this.

(Nova is the new Nvidia driver, and yes, it's written in Rust, so Rust will be mandatory for open source upstream support of new Nvidia GPUs. That's already decided.)

@mawei I'm not going to touch the existing DRM scheduler, I'm just going to write my own that is part of the driver. If Nova wants to use it we'll figure out how to make it common Rust code. C drivers can continue to use the broken C one that's already there, and fight the brokenness themselves.

The DRM scheduler is helper code, it's not a core part of the DRM subsystem. You can simply choose not to use it and roll your own. Half of DRM is like this.

mawei

@lina Well, after some years I'm pretty sure some other guy would jump out and try to extract the helper into a "generic" framework, and some newer driver will need some unique feature, and again non-constructive discussion.

I'm already so tried of handling one MM guy pushing his "superior" infrastructure without acknowledge some missing features.

It's the usual software development shenanigans, just older guys are much harder to handle.

Go Up