LWN.net Logo

Quotes of the week

Quotes of the week

Posted Dec 1, 2011 17:38 UTC (Thu) by marcH (subscriber, #57642)
Parent article: Quotes of the week

As a driver developer, are you supposed to reboot every time you want to run a new line of code?


(Log in to post comments)

Quotes of the week

Posted Dec 1, 2011 18:27 UTC (Thu) by mlankhorst (subscriber, #52260) [Link]

Erm, linus' point was about modules you don't need, when you are working on a specific module, he never said not to load it as module, just dont build modules you dont use. ;-)

Quotes of the week

Posted Dec 1, 2011 21:08 UTC (Thu) by gidoca (subscriber, #62438) [Link]

Then why does it say: "Modules are evil"?

loadable kernel modules are evil

Posted Dec 2, 2011 19:15 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

Right. In addition to saying not to compile modules you don't use, he said to statically link the ones that you do compile into the base kernel. With the reduced amount, that is practical and it has the benefit that no hacker can change the code.

I'm sure he didn't mean for it to apply to someone developing the module, though.

Also, it seems like a poor idea to test kernel code on a system important enough to care about security. I always use a separate expendable, impotent, minimal test system for that. In fact, it's about as quick and easy to reboot that test system as to reload a module.

loadable kernel modules are evil

Posted Dec 2, 2011 21:52 UTC (Fri) by marcH (subscriber, #57642) [Link]

> I'm sure he didn't mean for it to apply to someone developing the module, though.

What makes you sure? Other quotes?

> In fact, it's about as quick and easy to reboot that test system as to reload a module

How long is that?

loadable kernel modules are evil

Posted Dec 2, 2011 22:41 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

I'm sure he didn't mean for it to apply to someone developing the module, though.
What makes you sure? Other quotes?
Only that I credit Linus with common sense and because Linus, like most people, but more, often makes terse, sweeping generalizations that aren't intended to cover every corner case.
In fact, it's about as quick and easy to reboot that test system as to reload a module
How long is that?

Now that you make me think about it, my own experience doesn't make the point. I use loadable modules, and I'm including in the time to reload the module the time it takes to generate it. If I have to reboot, the system is generally insmod-ready by the time I have the next iteration of the module ready. (On my ancient hardware, it's 20 seconds).

On modern hardware, I suspect I could get a kernel test system up in a few seconds. Maybe that changes the equation to where statically binding your test code into the base kernel is as fast and easy as loading it dynamically.

Quotes of the week

Posted Dec 11, 2011 4:06 UTC (Sun) by joern (subscriber, #22392) [Link]

> As a driver developer, are you supposed to reboot every time you want to run a new line of code?

Mostly you are supposed to write good code. ;)

I personally actually like to reboot every time I want to run a new line of code. With a good setup, it should take on the order of 30s, including compile time, to do so. Reducing this time by using modules may have the drawback of sometimes not working (crashed kernel) and sometimes giving bad results (different performance depending on cache warmth, state from previous tests affecting the current test, etc.).

But if modules work well for you, go for it!

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