What do the terms "in-tree" and "out-of-tree" exactly mean? Also, does "source tree" specifically refer to the official kernel released from / maintained at kernel.org or is it a more general term which can refer to any (modified) Linux kernel source?


"source tree" is not a term specific to kernel source development, so it has to be a more general term and its meaning with regards to kernel source is context dependent.

I have not come across "in-tree" and "out-of-tree" outside of the Linux kernel source development and then only for working with modules. All modules start out as "out-of-tree" developments, that can be compiled using the context of a source-tree. Once a module gets accepted to be included, it becomes an in-tree module. A I have not come across an official definition for both terms though, maybe that was never necessary as it was clear to those working with modules what was meant.

E.g. while Reiserfs module was still an out-of-tree module I did the RPM package generation for SuSE, once it became in-tree there was no longer need for that.

  • 1
    Thanks! So basically in-tree means a module that comes as a part of the source tree and out-of-tree that does not?
    – Lavya
    Jun 10 '15 at 7:26
  • 1
    @Lavya Yes, that is the only way I have seen it used. But as I indicated, I have not come across a formal definition.
    – Anthon
    Jun 10 '15 at 9:44
  • "in-tree" and "out-of-tree" are actually generic software development terms. It refers to where the resulting build output/artifacts are placed during a compile, either "in-tree", right next to the files they come from, or "out-of-tree", in a separate root directory that separates the build output from the source files. The kernel overloads these terms when talking about modules though, as you've described in your response.
    – mtalexan
    Jul 3 '18 at 15:31
  • @mtalexan Some references that support your claim would be useful. The only one I found so far is that autosetup has at some point (they didn't when I first used it), started to use out-of-tree the way you describe, but they use in-place instead of in-tree in their doc.
    – Anthon
    Jul 3 '18 at 16:43
  • @Anthon in-tree and in-place are synonyms for the same term in my experience. I don't really have references for it, it's been something I've picked up working in the industry across a number of companies and sub-fields for the last ~15 years rather than something I read in a book. I was just pointing out that in terms of technical jargon it's something you're likely to come across in other contexts with slightly different meanings. I wasn't critiquing either, just adding some additional context for future readers.
    – mtalexan
    Aug 2 '18 at 1:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.