Re: My overview of the kernel --> do I have it correct ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11-07-08 17:56, William Case wrote:

1. I still have the suspicion, that experienced kernel programers
   have a mental map, construct, or guide posts -- call it what you
   will -- that you use, to locate within kernel code, the place,
   function, line, or whatever, to start trouble shooting, fixing
   or creating a piece of the kernel.

Just as one additional comment, the creating bit is again driven by the afore mentioned non-linear nature of the kernel; you start at the point where you need to arrange to actually be called.

This often consists of a registration interface and that is certainly one of the more pervasive patterns in the kernel. You register functionality with a subsystem and then just sit there untill the subsystem channels specific request through to you. Single "units of functionality" (say, a driver) can and will generally have more than one such subsystem dependency even.

If you're a driver for a PCI soundcard, say, you register at the highest levvel with the PCI subsystem through the pci_register_driver() call and arange to hook into the sound infrastructure through snd_card_register() inside the methods that you just told the PCI subsystem you provide and which it calls for you.

Ofcourse, when you WRITE the subsystem instead of the driver you don't call into it but in that case, your driving force is _providing_ these interfaces to your users -- you're still at that same point.

Trouble shooting is largely experience driven. Linux, although it's getting to be less true than it used to be, isn't always as neatly compartimentalized as conventional design practices might suggest it could be (*) and you do often just need a bit of feel for the interaction of things. And fixing anything depends on the trouble shooting...

I hope you'll take my harping on the word "pragmatic" for what it's supposed to be; not a personal pet peeve but rather fundamental to Linux. The design is driven by demand and the implementation by efficiency.

(*) I am particularly proud of this sentence.

Perhaps, all that I am looking for is a subway map.

Or perhaps better still... an idea of where you want to go.

Rene.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux