|
|
Log in / Subscribe / Register

Tools for porting drivers

Tools for porting drivers

Posted Nov 30, 2017 7:51 UTC (Thu) by ThinkRob (guest, #64513)
In reply to: Tools for porting drivers by nix
Parent article: Tools for porting drivers

> (Why can't these be generated on the fly? *Can* they, so this can be used for projects other than the Linux kernel? the fact that the generator has Julia's homedir hardwired into it is not especially reassuring.)

My guess -- with no benchmarking whatsoever to support it -- is that the cost of indexing each time is such that it breaks (or at least seriously impedes) the workflow where you start with $(portion of foo) and gradually refine to $foo. That's a lot of wasted work that gets done each time, and for that use case it's easier to simply generate AoT than burn CPU each time the search is fired. Ideally the user would get a choice, which is always a good way to cut off the "my workflow!" argument at the knees... but I can understand if they don't want to roll that out on day 0. It is an increase in complexity, after all. [insert usual lecture on complexity, bugs, etc. here]

Besides, this being FOSS. I give it two, three days until someone's got a patchset to do just that. ;-)


to post comments

Tools for porting drivers

Posted Nov 30, 2017 7:54 UTC (Thu) by ThinkRob (guest, #64513) [Link] (1 responses)

To add on to this (as I think about it more) there probably is a cut-off point where AoT would have been a win, but it is at this point that LKML twinges and hops over to this discussion to point why heuristics are bad and rarely the answer, etc.

And you know, in this case, I would tend to agree with them. I'd rather burn a predictable amount of CPU and disk IO than have opaque "no more CPU/disk" cliffs to fall off of. AoT is still an option though, and hey you could add it to the rpm/deb setup packages for the kernel source (with a nice README for the tool for people writing against mainline.) Not perfect, but possibly more efficient than just spinning every time you invoke.

Then again, this is way the hell out of my wheelhouse, so I could be dead wrong. :D

Tools for porting drivers

Posted Nov 30, 2017 13:02 UTC (Thu) by nix (subscriber, #2304) [Link]

It does look really expensive: it does git shows of everything in history (arbitrarily restricted to v3.0..v4.6), and of all lines adding anything, and of all lines removing anything... and has Julia's homedir wired into it as well as the path to the Linux dir and the v3.0..v4.6 restriction... oh and most of the code to generate the indexes is commented out.

This bit of the system looks like something that has never really been meant for others' use :)

(hm, if linux_idutils_U0.index is no longer useful, as suggested by the commit comment in 268c28a1a27c0fe160877ac74381d41cfb8a4645, why is it still in the git repo, given that it's one of the largest indexes? Why does the code still reference it? Oh and why does the next commit touching the indexer (cb0ea76886dbb450dd401ffb59430103c0b496eb) not only add a word index but also comment out the code to generate all the other indexes, even though the code still references those too? I get the impression that this is *really* not meant for others' use, which is a shame because I wanted to run it on Linux > 4.6 but it's hard to figure out even which indexes are needed, let alone how to regenerate them.)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds