Should be a recent design change then, because in my Ubuntu 9.04 (kernel 2.6.28.?), the HDA module codecs are still assembled all together (well, dependending on kernel config, that is) within a single module. It’s kinda hard to keep in touch with Linux sound system change, as there’s several. And chasing multiple targets is not that fun.
Anyway, that’s a nice move indeed, and our own HDA driver will be better if non-standard codec was indeed moved into separated kernel modules so only used one are kept loaded.
[quote=NoHaikuForMe]
[quote=phoudoin]
Well, the pages of code for these Realtek workaround will never be actually loaded because the HDA driver code itself will never trigger a (code) page fault to execute it.
Only a span of virtual memory pages is actually wasted, not physical memory.[/quote]
It would actually be possible (although fraught with danger) to do this, but Haiku doesn’t. Instead you can see
length = _kern_read(fd, programHeaders[i].p_offset,
(void *)(region->start + (programHeaders[i].p_vaddr % B_PAGE_SIZE)),
programHeaders[i].p_filesz);
The Haiku module loader routine simply reads the ELF sections into reserved kernel RAM.
So all the realtek code (and everything else) is read from disk into RAM by this call. There is code to map an ELF image from a disk file into virtual addresses such that subsequent page faults bring it into RAM but so far as I was able to confirm that’s only used for userspace programs, not Haiku’s kernel add ons.[/quote]
Well, the code above is not the culprid one for that but the B_FULL_LOCK requested for the area to host the read data. Anyway, you are right: the whole HDA driver code is loaded in memory. I dunno why I though we had a lazy load also for kernel add-ons with some hack to lock the ones installing interrupt handlers. Maybe it was once proposed but never made it into code.
So, I stand corrected : our HDA driver is bloated.
[quote]
Of course, many of the things Haiku lacks are a result of your limited resources. But it does no good for people to insist that Haiku does this, or has that capability, when in fact it does not “for lack of resources”.[/quote]
Yes, braging about capabilities Haiku has not actually does no good.
One thing that could do good to Haiku is that people spending time to fight against Haiku community’s pointless arguments will instead contribute the missing parts in Haiku.
After all, Linux is twice as old as Haiku, and had more than just twice its horsepower.
And no debate, flame, counter-argument or defense against whatever our community propaganda will improve Haiku more than, well, code contribution.
Everyone is free to spent his time as he want. But only time spent in doing actual contribution could change Haiku into a better Haiku…
One could simply start by filing en enhancement ticket in our Trac system, asking to split HDA codecs into submodules in order to reduce the code bloat loaded in kernel by the very commonly found and so used hda driver. That would be a good mark of willingness, too.