tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: General device properties API
> On Aug 16, 2021, at 9:11 AM, Michael van Elst <mlelstv%serpens.de@localhost> wrote:
>
> On Mon, Aug 16, 2021 at 06:46:17AM -0700, Jason Thorpe wrote:
>>
>>> On Aug 16, 2021, at 2:31 AM, Michael van Elst <mlelstv%serpens.de@localhost> wrote:
>>> Isn't that what we do today? Have a common name and value format,
>>> copied/translated from various sources and stored in the MI device
>>> dictionary.
>>
>> We sort of have it, and it?s a dumpster fire which is why I want to get away from that. It doesn?t scale (a new driver that needs a new property suddenly needs a new hook in MD code? Yiuck?), and it?s wasteful in terms of memory consumed.
>
>
> I'd say querying all possible MD sources in each driver scales less
> and it gets worse when you want to report such properties in some
> coherent way.
Luckily for us, that isn't necessary because (a) an operating system way more popular than NetBSD has already defined the standard for recent and future hardware, (b) other firmware platforms have essentially embraced that standard due to that juggernaut, and (c) for legacy systems, the new standard maps pretty easily to the old conventions with only a few minor variances that can be handled on a case-by-case basis.
So, and please bear with my radical idea here, maybe we could just roll with that standard and have the ability to interact with it in a more-or-less native way (and without additional memory consumption) rather than insisting on a translation layer that gratuitously changes the spellings of the property names and requires us to know about each one ante tempus?
-- thorpej
Home |
Main Index |
Thread Index |
Old Index