From mboxrd@z Thu Jan 1 00:00:00 1970 From: milton@krutt.org (Milton Krutt) Date: Tue, 21 Apr 2015 02:16:49 +0200 Subject: How do _you_ read the linux source? In-Reply-To: <20150420145154.GC7261@kroah.com> References: <20150420145154.GC7261@kroah.com> Message-ID: <20150421001649.GA4766@debian> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org > On Sun, Apr 19, 2015 at 06:57:49PM -0700, r00nk at simplecpu.com wrote: > > The problem a lot of newbies are having is in 'separating the trunk > > from the leaves.' So my question is this: Experienced kernel developers, how > > do _you_ read source code? How do you separate the trunk from the leaves? > > What do you do when you read code you're not familiar with? How do you learn? > > What's your algorithm? Maybe it could help to firstly focus on data structures/types rather than functions; and I would discourage to read code like a book, I mean from left to right and from top to bottom. And, take a subsystem/part (even if it's very small) of interest and just focus on it. For instance, I guess there is plenty of documentation on how linux boots up: read it, and search through the source where what you have read is done. compile your own kernel, if you haven't done it yet! HTH