Skip to contentSkip to conversation

A development process document, V2

PATCH In review Jonathan Corbet 8 participants 11 messages Jul 31, 2008 – Aug 8, 2008 Documentation

lore
Share & tools
lore

Jonathan Corbet

author maintainer
#0 lore raw

PATCH 1/1 A development process document, V2

Here is an updated version of the development process document; hopefully I've done a reasonable job of addressing everybody's comments. Please let me know if you find anything else in need of attention.

I'll send a diff from the first version as a reply.

Thanks,

jon

Add a document describing the kernel development process.

Documentation/00-INDEX +3 -0
index 6de7130..247510b 100644
@@ -21,6 +21,9 @@ Changes
 	- list of changes that break older software packages.
 CodingStyle
 	- how the boss likes the C code in the kernel to look.
+development-process/
+	- An extended tutorial on how to work with the kernel development
+	  process.
 DMA-API.txt
 	- DMA API, pci_ API & extensions for non-consistent memory machines.
 DMA-ISA-LPC.txt
Documentation/development-process/1.Intro new file +225 -0

225 lines not on this page · raw message

Documentation/development-process/2.Process new file +459 -0

459 lines not on this page · raw message

Documentation/development-process/3.Early-stage new file +195 -0

195 lines not on this page · raw message

Documentation/development-process/4.Coding new file +384 -0

384 lines not on this page · raw message

Documentation/development-process/5.Posting new file +278 -0

278 lines not on this page · raw message

Documentation/development-process/6.Followthrough new file +202 -0

202 lines not on this page · raw message

Documentation/development-process/7.AdvancedTopics new file +177 -0

177 lines not on this page · raw message

Documentation/development-process/8.Conclusion new file +73 -0

73 lines not on this page · raw message

author maintainer
#1 lore raw

Re: [PATCH] A development process document, V2 (diff from V1)

Here are the changes from the first posted version of the development process document.

jon

Quoted 1 line

From b7d9843de29afe63da93c1c4f0c7067963c6585d Mon Sep 17 00:00:00 2001

From: Jonathan Corbet <[email protected]>
Date: Thu, 31 Jul 2008 11:00:35 -0600
Subject: [PATCH] Various improvements in response to reviewer comments.

---
 Documentation/development-process/1.Intro          |   19 +++++++--
 Documentation/development-process/2.Process        |   15 ++++++-
 Documentation/development-process/3.Early-stage    |   13 ++++--
 Documentation/development-process/4.Coding         |   19 +++++++--
 Documentation/development-process/5.Posting        |   40 ++++++++++++++------
 Documentation/development-process/6.Followthrough  |   16 ++++++-
 Documentation/development-process/7.AdvancedTopics |   21 +++++-----
 7 files changed, 101 insertions(+), 42 deletions(-)
Documentation/development-process/1.Intro +14 -5
index 0bbf4d7..d6c948b 100644
@@ -9,7 +9,7 @@ there is some technical material here, this is very much a process-oriented
 discussion which does not require a deep knowledge of kernel programming to
 understand.
 
-The Linux kernel, at over 6 million lines of code and 2000 active
+The Linux kernel, at over 6 million lines of code and well over 1000 active
 contributors, is one of the largest and most active free software projects
 in existence.  Since its humble beginning in 1991, this kernel has evolved
 into a best-of-breed operating system component which runs on pocket-sized
@@ -32,8 +32,8 @@ One of the most compelling features of Linux is that it is accessible to
 these developers; anybody with the requisite skills can improve Linux and
 influence the direction of its development.  Proprietary products cannot
 offer this kind of openness, which is a characteristic of the free software
-process.  But, if anything, the kernel is open even than most other free
-software projects.  A typical three-month kernel development cycle can
+process.  But, if anything, the kernel is even more open than most other
+free software projects.  A typical three-month kernel development cycle can
 involve over 1000 developers working for more than 100 different companies
 (or for no company at all).
 
@@ -65,8 +65,9 @@ join our community.
 1.1: CREDITS
 
 This document was written by Jonathan Corbet, [email protected].  It has been
-improved by comments from Randy Dunlap, Jake Edge, Matt Mackall, and Amanda
-McPherson.
+improved by comments from Alex Chiang, Roland Dreier, Randy Dunlap, Jake
+Edge, Jiri Kosina, Matt Mackall, Amanda McPherson, Andrew Morton, and
+Jochen Voß.
 
 This work was supported by the Linux Foundation; thanks especially to
 Amanda McPherson, who saw the value of this effort and made it all happen.
@@ -124,6 +125,14 @@ discussed in greater detail later in this document.  Consider:
   are heard, but active developers have a stronger voice - and the ability
   to implement changes which make the kernel work better for their needs.
 
+- When code is maintained separately, the possibility that a third party
+  will contribute a different implementation of a similar feature always
+  exists.  Should that happen, getting your code merged will become much
+  harder - to the point of impossibility.  Then you will be faced with the
+  unpleasant alternatives of either (1) maintaining a nonstandard feature
+  out of tree indefinitely, or (2) abandoning your code and migrating your
+  users over to the in-tree version.
+
 - Contribution of code is the fundamental action which makes the whole
   process work.  By contributing your code you can add new functionality to
   the kernel and provide capabilities and examples which are of use to
Documentation/development-process/2.Process +12 -3
index ff0cd34..c9492ff 100644
@@ -55,7 +55,10 @@ submitted to the mainline.  On occasion a more significant change will be
 allowed, but such occasions are rare; developers who try to merge new
 features outside of the merge window tend to get an unfriendly reception.
 As a general rule, if you miss the merge window for a given feature, the
-best thing to do is to wait for the next development cycle.
+best thing to do is to wait for the next development cycle.  (An occasional
+exception is made for drivers for previously-unsupported hardware; if they
+touch no in-tree code, they cannot cause regressions and should be safe to
+add at any time).
 
 As fixes make their way into the mainline, the patch rate will slow over
 time.  Linus releases new -rc kernels about once a week; a normal series
@@ -95,7 +98,7 @@ larger, creating even more regressions the next time around.  So most 2.6.x
 kernels go out with a handful of known regressions though, hopefully, none
 of them are serious.
 
-Once a stable release is made, its ongoing maintenance is passed of to the
+Once a stable release is made, its ongoing maintenance is passed off to the
 "stable team," currently comprised of Greg Kroah-Hartman and Chris Wright.
 The stable team will release occasional updates to the stable release using
 the 2.6.x.y numbering scheme.  To be considered for an update release, a
@@ -389,12 +392,18 @@ There are a few hints which can help with linux-kernel survival:
 - When responding to linux-kernel email (or that on other lists) preserve
   the Cc: header for all involved.  In the absence of a strong reason (such
   as an explicit request), you should never remove recipients.  Always make
-  sure that the person you are responding to is in the Cc: list.
+  sure that the person you are responding to is in the Cc: list.  This
+  convention also makes it unnecessary to explicitly ask to be copied on
+  replies to your postings.
 
 - Search the list archives (and the net as a whole) before asking
   questions.  Some developers can get impatient with people who clearly
   have not done their homework.
 
+- Avoid top-posting (the practice of putting your answer above the quoted
+  text you are responding to).  It makes your response harder to read and
+  makes a poor impression.
+
 - Ask on the correct mailing list.  Linux-kernel may be the general meeting
   point, but it is not the best place to find developers from all
   subsystems.
Documentation/development-process/3.Early-stage +9 -4
index 23a353f..207c8e7 100644
@@ -42,6 +42,8 @@ and posted this:
 	to communicate user requirements to these people is a waste of
 	time. They are much too "intelligent" to listen to lesser mortals.
 
+(http://lwn.net/Articles/131776/).
+
 The reality of the situation was different; the kernel developers were far
 more concerned about system stability, long-term maintenance, and finding
 the right solution to the problem than they were with a specific module.
@@ -85,7 +87,7 @@ communication can save time and trouble in a number of ways:
    problem; they may have ideas for a better solution, and may be willing
    to help in the creation of that solution.
 
-Years of experience with the kernel development community has taught a
+Years of experience with the kernel development community have taught a
 clear lesson: kernel code which is designed and developed behind closed
 doors invariably has problems which are only revealed when the code is
 released into the community.  Sometimes these problems are severe,
@@ -99,9 +101,9 @@ the kernel community's standards.  Some examples include:
    of this code (now called mac80211) was delayed for over a year.
 
  - The Reiser4 filesystem included a number of capabilities which, in the
-   core developers' opinion, should have been implemented in the virtual
-   filesystem layer instead.  It also included features which could not
-   easily be implemented without exposing the system to user-caused
+   core kernel developers' opinion, should have been implemented in the
+   virtual filesystem layer instead.  It also included features which could
+   not easily be implemented without exposing the system to user-caused
    deadlocks.  The late revelation of these problems - and refusal to
    address some of them - has caused Reiser4 to stay out of the mainline
    kernel.
@@ -136,6 +138,9 @@ patches, and who, if anybody, is attaching Signed-off-by lines to those
 patches.  Those are the people who be best placed to help with a new
 development project.
 
+If all else fails, talking to Andrew Morton can be an effective way to
+track down a maintainer for a specific piece of code.
+
 
 3.4: WHEN TO POST?
 
Documentation/development-process/4.Coding +14 -5
index 86a00a9..c1443bc 100644
@@ -185,6 +185,8 @@ breaks?  The best answer to this question was expressed by Linus in July,
 	progress at all. Is it two steps forwards, one step back, or one
 	step forward and two steps back?
 
+(http://lwn.net/Articles/243460/).
+
 An especially unwelcome type of regression is any sort of change to the
 user-space ABI.  Once an interface has been exported to user space, it must
 be supported indefinitely.  This fact makes the creation of user-space
@@ -280,13 +282,13 @@ user-space and kernel-space addresses, mixture of big-endian and
 small-endian quantities, the passing of integer values where a set of bit
 flags is expected, and so on.  Sparse must be installed separately (it can
 be found at http://www.kernel.org/pub/software/devel/sparse/ if your
-distributor does not package it); it can then be run on the code using the
-C=1 flag to make.
+distributor does not package it); it can then be run on the code by adding
+"C=1" to your make command.
 
 Other kinds of portability errors are best found by compiling your code for
 other architectures.  If you do not happen to have an S/390 system or a
 Blackfin development board handy, you can still perform the compilation
-step.  A full set of cross compilers for x86 systems can be found at 
+step.  A large set of cross compilers for x86 systems can be found at 
 
 	http://www.kernel.org/pub/tools/crosstool/
 
@@ -302,6 +304,12 @@ of new code into the kernel, make life easier for other developers, and
 will be helpful for your users.  In many cases, the addition of
 documentation has become essentially mandatory.
 
+The first piece of documentation for any patch is its associated
+changelog.  Log entries should describe the problem being solved, the form
+of the solution, the people who worked on the patch, any relevant
+effects on performance, and anything else that might be needed to
+understand the patch.
+
 Any code which adds a new user-space interface - including new sysfs or
 /proc files - should include documentation of that interface which enables
 user-space developers to know what they are working with.  See
@@ -321,9 +329,10 @@ in a number of ways by the "kernel-doc" script.  If you are working within
 a subsystem which has kerneldoc comments, you should maintain them and add
 them, as appropriate, for externally-available functions.  Even in areas
 which have not been so documented, there is no harm in adding kerneldoc
-comments for the future.  The format of these comments, along with some
+comments for the future; indeed, this can be a useful activity for
+beginning kernel developers.  The format of these comments, along with some
 information on how to create kerneldoc templates can be found in the file
-Documentation/kernel-doc-nano-HOWTO.txt. 
+Documentation/kernel-doc-nano-HOWTO.txt.
 
 Anybody who reads through a significant amount of existing kernel code will
 note that, often, comments are most notable by their absence.  Once again,
Documentation/development-process/5.Posting +28 -12
index 5443d7a..c6ac6ba 100644
@@ -170,8 +170,8 @@ The tags in common use are:
  - Signed-off-by: this is a developer's certification that he or she has
    the right to submit the patch for inclusion into the kernel.  It is an
    agreement to the Developer's Certificate of Origin, the full text of
-   which can be found in SubmittingPatches.  Code without a proper signoff
-   cannot be merged into the mainline.
+   which can be found in Documentation/SubmittingPatches.  Code without a
+   proper signoff cannot be merged into the mainline.
 
  - Acked-by: indicates an agreement by another developer (often a
    maintainer of the relevant code) that the patch is appropriate for
@@ -181,7 +181,8 @@ The tags in common use are:
    it to work.
 
  - Reviewed-by: the named developer has reviewed the patch for correctness;
-   see the reviewer's statement in SubmittingPatches for more detail.
+   see the reviewer's statement in Documentation/SubmittingPatches for more
+   detail.
 
  - Reported-by: names a user who reported a problem which is fixed by this
    patch; this tag is used to give credit to the (often underappreciated)
@@ -216,6 +217,11 @@ take care of:
    look like, is not smarter than you.  If fixing a checkpatch.pl complaint
    would make the code worse, don't do it.
 
+Patches should always be sent as plain text.  Please do not send them as
+attachments; that makes it much harder for reviewers to quote sections of
+the patch in their replies.  Instead, just put the patch directly into your
+message.
+
 When mailing patches, it is important to send copies to anybody who might
 be interested in it.  Unlike some other projects, the kernel encourages
 people to err on the side of sending too many copies; don't assume that the
@@ -229,12 +235,18 @@ copies should go to:
    those who might be working there now.  Using git to see who else has
    modified the files you are working on can be helpful.
 
- - If you are responding to a bug report or a feature request, copy those
-   people as well.
+ - If you are responding to a bug report or a feature request, copy the
+   original poster as well.
 
  - Send a copy to the relevant mailing list, or, if nothing else applies,
    the linux-kernel list.
 
+ - If you are fixing a bug, think about whether the fix should go into the
+   next stable update.  If so, [email protected] should get a copy of the
+   patch.  Also add a "Cc: [email protected]" to the tags within the patch
+   itself; that will cause the stable team to get a notification when your
+   fix goes into the mainline.
+
 When selecting recipients for a patch, it is good to have an idea of who
 you think will eventually accept the patch and get it merged.  While it
 *is* possible to send patches directly to Linus Torvalds and have him merge
@@ -253,10 +265,14 @@ patches in the series, and "subsys" is the name of the affected subsystem.
 Clearly, nn/mm can be omitted for a single, standalone patch.  
 
 If you have a significant series of patches, it is customary to send an
-introductory description as part zero.  In general, the second and
-following parts of a multi-part patch should be sent as a reply to the
-first part so that they all thread together at the receiving end.  Tools
-like git and quilt have commands to mail out a set of patches with the
-proper threading.  If you have a long series, though, and are using git,
-please provide the --no-chain-reply-to option to avoid creating
-exceptionally deep nesting.
+introductory description as part zero.  This convention is not universally
+followed though; if you use it, remember that information in the
+introduction does not make it into the kernel changelogs.  So please ensure
+that the patches, themselves, have complete changelog information.
+
+In general, the second and following parts of a multi-part patch should be
+sent as a reply to the first part so that they all thread together at the
+receiving end.  Tools like git and quilt have commands to mail out a set of
+patches with the proper threading.  If you have a long series, though, and
+are using git, please provide the --no-chain-reply-to option to avoid
+creating exceptionally deep nesting.
Documentation/development-process/6.Followthrough +13 -3
index 27d1006..2815f88 100644
@@ -20,7 +20,7 @@ prevent the inclusion of your patches into the mainline.
 
 A patch of any significance will result in a number of comments from other
 developers as they review the code.  Working with reviewers can be, for
-many developers, the most indimidating part of the kernel development
+many developers, the most intimidating part of the kernel development
 process.  Life can be made much easier, though, if you keep a few things in
 mind:
 
@@ -71,6 +71,15 @@ go away.  They will not go away.  If you repost code without having
 responded to the comments you got the time before, you're likely to find
 that your patches go nowhere.
 
+Speaking of reposting code: please bear in mind that reviewers are not
+going to remember all the details of the code you posted the last time
+around.  So it is always a good idea to remind reviewers of previously
+raised issues and how you dealt with them; the patch changelog is a good
+place for this kind of information.  Reviewers should not have to search
+through list archives to familiarize themselves with what was said last
+time; if you help them get a running start, they will be in a better mood
+when they revisit your code.
+
 What if you've tried to do everything right and things still aren't going
 anywhere?  Most technical disagreements can be resolved through discussion,
 but there are times when somebody simply has to make a decision.  If you
@@ -119,8 +128,9 @@ Now they can be resolved at leisure, before the merge window opens.
 
 Some day, if all goes well, you'll log on and see that your patch has been
 merged into the mainline kernel.  Congratulations!  Once the celebration is
-complete, though, it is worth remembering an important little fact: the job
-still is not done.  Merging into the mainline brings its own challenges.
+complete (and you have added yourself to the MAINTAINERS file), though, it
+is worth remembering an important little fact: the job still is not done.
+Merging into the mainline brings its own challenges.
 
 To begin with, the visibility of your patch has increased yet again.  There
 may be a new round of comments from developers who had not been aware of
Documentation/development-process/7.AdvancedTopics +11 -10
index 840c440..2cd6d49 100644
@@ -83,9 +83,9 @@ turning a tested (hopefully) kernel tree into an untested one.  But, beyond
 that, developers cannot easily collaborate if they do not have a shared
 view of the project history; if you rewrite history which other developers
 have pulled into their repositories, you will make life much more difficult
-for those developers going forward.  So a simple rule of thumb applies
-here: history which has been exported to others should generally be seen as
-immutable thereafter.
+for those developers.  So a simple rule of thumb applies here: history
+which has been exported to others should generally be seen as immutable
+thereafter.
 
 So, once you push a set of changes to your publicly-available server, those
 changes should not be rewritten.  Git will attempt to enforce this rule if
@@ -123,13 +123,14 @@ can affect your ability to get trees pulled in the future.  Quoting Linus:
 	to trust things *without* then having to go and check every
 	individual change by hand.
 
-(http://lwn.net/Articles/224135/).  To avoid this kind of situation, ensure
-that all patches within a given branch stick closely to the associated
-topic; a "driver fixes" branch should not be making changes to the core
-memory management code.  And, most importantly, do not use a git tree to
-bypass the review process.  Post an occasional summary of the tree to the
-relevant list, and, when the time is right, request that the tree be
-included in linux-next.
+(http://lwn.net/Articles/224135/).  
+
+To avoid this kind of situation, ensure that all patches within a given
+branch stick closely to the associated topic; a "driver fixes" branch
+should not be making changes to the core memory management code.  And, most
+importantly, do not use a git tree to bypass the review process.  Post an
+occasional summary of the tree to the relevant list, and, when the time is
+right, request that the tree be included in linux-next.
 
 If and when others start to send patches for inclusion into your tree,
 don't forget to review them.  Also ensure that you maintain the correct
Signature · 1 line
1.5.6.4
#2 lore raw

Re: [PATCH] A development process document, V2 (diff from V1)

Quoted 2 lines · Jonathan Corbet
Documentation/development-process/5.Posting +0 -0

...

Quoted 1 line
Documentation/development-process/5.Posting +0 -0
@@ -229,12 +235,18 @@ copies should go to:

...

Documentation/development-process/5.Posting copies should go to: · line 246

Quoted 6 lines

- Send a copy to the relevant mailing list, or, if nothing else applies, the linux-kernel list.

+ - If you are fixing a bug, think about whether the fix should go into the

Documentation/development-process/5.Posting +2 -0
+   next stable update.  If so, [email protected] should get a copy of the
+   patch.  Also add a "Cc: [email protected]" to the tags within the patch

...patch after it or an equivalent was committed to Linus's tree. Quote the commit ID in your stable submission. Alternatively, add a "Cc:
stable@...

Documentation/development-process/5.Posting copies should go to: · line 248

Quoted 2 lines
Documentation/development-process/5.Posting +2 -0
+   itself; that will cause the stable team to get a notification when your
+   fix goes into the mainline.

Or IMO preferable:

- If you are fixing a bug, think about whether the fix should go into
the next stable update. If so, read ../stable_kernel_rules.txt.

(I missed the part of the thread where the addition of the -stable bullet point was suggested, hence I may be saying something redundant here...)

Signature · 3 lines
Stefan Richter
-=====-==--- =--- ----=
http://arcgraph.de/sr/
#3 lore raw
In reply to Jonathan Corbet
Quoted 4 lines · Jonathan Corbet

Here is an updated version of the development process document; hopefully I've done a reasonable job of addressing everybody's comments. Please let me know if you find anything else in need of attention.

In the documentation section, you might add a link to "http://kernel.org/doc/" since it isn't linked from the main kernel.org page.

Chris

author maintainer
#4 lore raw
Quoted 3 lines · On Thu, 31 Jul 2008 14:25:09 -0600 "Chris Friesen" <[email protected]> wrote:

In the documentation section, you might add a link to "http://kernel.org/doc/" since it isn't linked from the main kernel.org page.

I had thought about that. But the revision log for that page
(http://landley.net/hg/kdocs) suggests that the last substantive changes were made in 2007; it appears to be unmaintained at this point. So I hesitate to add a link to it. Rob, do you have any plans for this page?

Thanks,

jon

#5 lore raw
Quoted 7 lines · On Monday 04 August 2008 17:45:13 Jonathan Corbet wrote:

On Thu, 31 Jul 2008 14:25:09 -0600

Quoted 3 lines · Chris Friesen

In the documentation section, you might add a link to "http://kernel.org/doc/" since it isn't linked from the main kernel.org page.

Quoted 5 lines

I had thought about that. But the revision log for that page
(http://landley.net/hg/kdocs) suggests that the last substantive changes were made in 2007; it appears to be unmaintained at this point. So I hesitate to add a link to it. Rob, do you have any plans for this page?

Plans? Yes, plenty. Time? Not so far.

I just gave a presentation about how and why I did it at OLS. (First paper in the second volume of 2008 proceedings, which should soon go up at
http://kernel.org/doc/ols/2008/ols2008v2-pages-7-18.pdf ). I'm guessing that's how Chris found out about it/remembered it?

I meant to make some time to give that site a good once over before my talk, but life happened. (And then I was offline from friday at OLS through yesterday. Plus a server crash while I was out of town. Fun.)

I'm actually banging on the site a bit right now, I just split up the OLS 2008 papers, but my "rebuild the website" script is once again dying on the fact that "make xmldocs" in the current -git tree dies with some random build break du jour. (Hmmm, revert the kernel it's generating docs from to 2.6.26 and fix it properly later...)

I would be thrilled to hand the whole thing (mercurial repository and all) off to somebody else who could make it #1 on their project list instead of #6 (at best) on mine. Off the top of my head:

1) I'm about to do another Firmware Linux release (as in later today), so embedded Linux developers no longer have to cross compile stuff.

2) I'm poking at a new project to build various distros (ubuntu, fedora, gentoo, etc) from source, starting from a Linux From Scratch style environment (so document what all their incestuous "I only ever compile under myself" dependencies actually _are_ and how to provide them). That's the sequel to FWL; use the native development environment to build Ubuntu for sh4 and so on.

3) I have a dozen things queued up for Toybox.

4) I need to dig up my tinycc fork and extend it to build an unmodified Linux kernel. (Or get llvm+clang to do it, or get the new pcc to do it. Some option other than gcc, and no Intel's closed source x86-only icc doesn't count.)

5) I'd like to create a "hello world" Linux kernel that executes the appropriate setup code to start running C, and uses the early_printk stuff to say hello world out to a serial port, then halt. (Serious embedded developers don't start from a full distro and strip it down, they start from an empty directory and add stuff until they have what they want. Taking the "start with everything and strip it down" approach to the Linux kernel doesn't really make _sense_ anymore, we need to start with nothing and add what we want.)

6) Finish kernel.org/doc. I have at least a year's worth of work queued up to apply to that right now, but working on that isn't my day job anymore, and as a hobby it's a bit down the list.

I'll cut a chunk of time out now and try to get it to a good stopping point. What it really _needs_ at this point is just cross-referencing all the stuff I've already located. (I was working on doing that with the OLS papers with the Linux Foundation pulled the plug.)

(If somebody else wanted to help out with an eye towards taking the whole thing over full-time, I'm interested. But so far, nobody's volunteered...)

Quoted 3 lines

Thanks,

jon

Rob

Signature · 2 lines
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.
#6 lore raw
In reply to Jonathan Corbet

Documentation/development-process/4.Coding line 22

Quoted 8 lines · Jonathan Corbet

+4.1: PITFALLS

Documentation/development-process/4.Coding new file +7 -0
+
+Coding style
+
+The kernel has long had a standard coding style, described in
+Documentation/CodingStyle.  For much of that time, the policies described
+in that file were taken as being, at most, advisory.  As a result, there is
+a substantial amount of code in the kernel which does not meed the coding

meed -> meet

Signature · 1 line
Simon Arlott
#7 lore raw
In reply to Jonathan Corbet
Quoted 4 lines · Jonathan Corbet

Here is an updated version of the development process document; hopefully I've done a reasonable job of addressing everybody's comments. Please let me know if you find anything else in need of attention.

Documentation/HOWTO roughly aimed at the same.

What's the intended relation between the two documents?

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
author maintainer
#8 lore raw
Quoted 3 lines · On Mon, 4 Aug 2008 16:17:39 +0300 Adrian Bunk <[email protected]> wrote:

Documentation/HOWTO roughly aimed at the same.

What's the intended relation between the two documents?

Documentation/HOWTO is a terse collection of useful tips. It's a great reference for people who have an idea of what they are doing and need to come quickly up to speed.

This document is intended to be a much more comprehensive introduction accessible to new developers and managers. It is, I hope, something we will be able to hand to companies which are trying to figure out how to join in. I don't expect it to replace Documentation/HOWTO, but I do hope it will be more useful for a lot of the folks who most need this kind of information.

Thanks,

jon

#9 lore raw
In reply to Jonathan Corbet

* Jonathan Corbet <[email protected]>:

Quoted 4 lines

Here is an updated version of the development process document; hopefully I've done a reasonable job of addressing everybody's comments. Please let me know if you find anything else in need of attention.

Hi Jon,

Here are a few more suggestions, mostly around clarity (and a very few brevity suggestions).

I didn't re-wrap any of the paragraphs to make the diff easier to read.

Again, feel free to accept/disregard what you like. Hope some of this was helpful.

cheers,

/ac

Documentation/development-process/1.Intro +13 -13
index 5f88a1c..1972e04 100644
@@ -32,7 +32,7 @@ One of the most compelling features of Linux is that it is accessible to
 these developers; anybody with the requisite skills can improve Linux and
 influence the direction of its development.  Proprietary products cannot
 offer this kind of openness, which is a characteristic of the free software
-process.  But, if anything, the kernel is even more open than most other
+process.  If anything, the kernel is even more open than most other
 free software projects.  A typical three-month kernel development cycle can
 involve over 1000 developers working for more than 100 different companies
 (or for no company at all).
@@ -105,7 +105,7 @@ discussed in greater detail later in this document.  Consider:
 
   Code which is in the mainline, instead, does not require this work as the
   result of a simple rule requiring developers to fix any code which breaks
-  as the result of an API change.  So code which has been merged into the
+  as the result of an API change.  Code which has been merged into the
   mainline has significantly lower maintenance costs.
 
 - Beyond that, code which is in the kernel will often be improved by other
@@ -134,7 +134,7 @@ discussed in greater detail later in this document.  Consider:
   users over to the in-tree version.
 
 - Contribution of code is the fundamental action which makes the whole
-  process work.  By contributing your code you can add new functionality to
+  process work.  Your contribution can add new functionality to
   the kernel and provide capabilities and examples which are of use to
   other kernel developers.  If you have developed code for Linux (or are
   thinking about doing so), you clearly have an interest in the continued
@@ -147,20 +147,20 @@ There are, however, additional factors which should be taken into account
 before considering any sort of binary-only kernel code distribution.  These
 include:
 
-- The legal issues around the distribution of proprietary kernel modules
+- The legal issues regarding the distribution of proprietary kernel modules
   are cloudy at best; quite a few kernel copyright holders believe that
   most binary-only modules are derived products of the kernel and that, as
   a result, their distribution is a violation of the GNU General Public
-  license (about which more will be said below).  Your author is not a
+  License (discussed further below).  Your author is not a
   lawyer, and nothing in this document can possibly be considered to be
   legal advice.  The true legal status of closed-source modules can only be
   determined by the courts.  But the uncertainty which haunts those modules
-  is there regardless.
+  exists regardless.
 
 - Binary modules greatly increase the difficulty of debugging kernel
-  problems, to the point that most kernel developers will not even try.  So
-  the distribution of binary-only modules will make support harder for
-  those who use them.
+  problems, to the point that most kernel developers will not even try.
+  The distribution of binary-only modules makes support harder for your
+  users.
 
 - Support is also harder for distributors of binary-only modules, who must
   provide a version of the module for every distribution and every kernel
@@ -175,14 +175,14 @@ include:
   problems. 
 
 Makers of embedded systems, in particular, may be tempted to disregard much
-of what has been said in this section in the belief that they are shipping
-a self-contained product which uses a frozen kernel version and requires no
+of the advice in this section in the belief that they are shipping
+a self-contained product which uses a frozen kernel version that requires no
 more development after its release.  This argument misses the value of
 widespread code review and the value of allowing your users to add
 capabilities to your product.  But these products, too, have a limited
 commercial life, after which a new version must be released.  At that
-point, venders whose code is in the mainline and well maintained will be
-much better positioned to get the new product ready for market quickly.
+point, vendors whose code is in the mainline and well maintained will enjoy
+a much shorter time-to-market development cycle.
 
 
 1.3: LICENSING
Documentation/development-process/2.Process +8 -8
index c9492ff..e863ebe 100644
@@ -2,7 +2,7 @@
 
 Linux kernel development in the early 1990's was a pretty loose affair,
 with relatively small numbers of users and developers involved.  With a
-user base in the millions and with some 2,000 developers involved of the
+user base in the millions and with some 2,000 developers involved in the
 course of one year, the kernel has since had to evolve a number of
 processes to keep development happening smoothly.  A solid understanding of
 how the process works is required in order to be an effective part of it.
@@ -107,8 +107,8 @@ mainline for the next development kernel.  Continuing our 2.6.25 example,
 the history (as of this writing) is:
 
 	May 1		2.6.25.1
-	May 6		2.6.25.2 
-	May 9		2.6.25.3 
+	May 6		2.6.25.2
+	May 9		2.6.25.3
 	May 15		2.6.25.4
 	June 7		2.6.25.5
 	June 9		2.6.25.6
@@ -311,10 +311,10 @@ pointers.
 By far the dominant source code management system used by the kernel
 community is git.  Git is one of a number of distributed version control
 systems being developed in the free software community.  It is well tuned
-for kernel development, in that it performs quite well when dealing with
+for kernel development, as it performs quite well when dealing with
 large repositories and large numbers of patches.  It also has a reputation
 for being difficult to learn and use, though it has gotten better over
-time.  Some sort of familiarity with git is almost a requirement for kernel
+time.  Some familiarity with git is almost a requirement for kernel
 developers; even if they do not use it for their own work, they'll need git
 to keep up with what other developers (and the mainline) are doing.
 
@@ -367,12 +367,12 @@ There are lists hosted elsewhere, though; a number of them are at
 lists.redhat.com.
 
 The core mailing list for kernel development is, of course, linux-kernel.
-This list is an intimidating place to be; volume can reach 500 messages per
+This list can be intimidating; volume can reach 500 messages per
 day, the amount of noise is high, the conversation can be severely
 technical, and participants are not always concerned with showing a high
 degree of politeness.  But there is no other place where the kernel
-development community comes together as a whole; developers will avoid this
-list at the risk of missing important information.
+development community comes together as a whole; developers who avoid this
+list risk missing important information.
 
 There are a few hints which can help with linux-kernel survival:
 
Documentation/development-process/3.Early-stage +7 -8
index 207c8e7..abced84 100644
@@ -105,8 +105,7 @@ the kernel community's standards.  Some examples include:
    virtual filesystem layer instead.  It also included features which could
    not easily be implemented without exposing the system to user-caused
    deadlocks.  The late revelation of these problems - and refusal to
-   address some of them - has caused Reiser4 to stay out of the mainline
-   kernel.
+   address some of them - has kept Reiser4 out of the mainline kernel.
 
  - The AppArmor security module made use of internal virtual filesystem
    data structures in ways which were considered to be unsafe and
@@ -128,14 +127,14 @@ linux-kernel; you are more likely to reach developers with expertise in the
 relevant subsystem and the environment may be more supportive.
 
 Finding maintainers can be a bit harder.  Again, the MAINTAINERS file is
-the place to start.  That file tends to not always be up to date, though,
+the place to start.  That file tends to be out of date, though,
 and not all subsystems are represented there.  The person listed in the
 MAINTAINERS file may, in fact, not be the person who is actually acting in
-that role currently.  So, when there is doubt about who to contact, a
+that role currently.  If there is doubt about who to contact, a
 useful trick is to use git (and "git log" in particular) to see who is
 currently active within the subsystem of interest.  Look at who is writing
 patches, and who, if anybody, is attaching Signed-off-by lines to those
-patches.  Those are the people who be best placed to help with a new
+patches.  Those are the people best placed to help with a new
 development project.
 
 If all else fails, talking to Andrew Morton can be an effective way to
@@ -145,8 +144,8 @@ track down a maintainer for a specific piece of code.
 3.4: WHEN TO POST?
 
 If possible, posting your plans during the early stages can only be
-helpful.  Describe the problem being solved and any plans that have been
-made on how the implementation will be done.  Any information you can
+helpful.  Describe the problem being solved and any plans you have
+for the implementation.  Any information you can
 provide can help the development community provide useful input on the
 project.
 
@@ -175,7 +174,7 @@ of a kernel development project, the better off everybody involved will be.
 Some readers may be thinking at this point that their kernel work is
 intended to support a product which does not yet have an officially
 acknowledged existence.  Revealing their employer's plans on a public
-mailing list may not be a viable option.  In cases like this, it is worth
+mailing list may not be a viable option.  In these cases, it is worth
 considering whether the secrecy is really necessary; there is often no real
 need to keep development plans behind closed doors.
 
Documentation/development-process/4.Coding +9 -9
index c1443bc..c9e7965 100644
@@ -18,14 +18,14 @@ Coding style
 
 The kernel has long had a standard coding style, described in
 Documentation/CodingStyle.  For much of that time, the policies described
-in that file were taken as being, at most, advisory.  As a result, there is
+in that file were considered, at most, advisory.  As a result, there is
 a substantial amount of code in the kernel which does not meed the coding
 style guidelines.  The presence of that code leads to two independent
 hazards for kernel developers.
 
-The first of these is to believe that the kernel coding standards do not
+The first hazard is to believe that the kernel coding standards do not
 matter and are not enforced.  The truth of the matter is that adding new
-code to the kernel is very difficult if that code is not coded according to
+code to the kernel is very difficult if that code is not written according to
 the standard; many developers will request that the code be reformatted
 before they will even review it.  A code base as large as the kernel
 requires some uniformity of code to make it possible for developers to
@@ -33,12 +33,12 @@ quickly understand any part of it.  So there is no longer room for
 strangely-formatted code.
 
 Occasionally, the kernel's coding style will run into conflict with an
-employer's mandated style.  In such cases, the kernel's style will have to
-win before the code can be merged.  Putting code into the kernel means
+employer's mandated style.  In such cases, the kernel's style takes
+precedence.  Putting code into the kernel means
 giving up a degree of control in a number of ways - including control over
 how the code is formatted.
 
-The other trap is to assume that code which is already in the kernel is
+The other trap is to assume that existing, non-conforming mainline code is
 urgently in need of coding style fixes.  Developers may start to generate
 reformatting patches as a way of gaining familiarity with the process, or
 as a way of getting their name into the kernel changelogs - or both.  But
@@ -150,7 +150,7 @@ retrofitted onto it.
 
 Once upon a time, Linux kernel code could be developed without thinking
 about the concurrency issues presented by multiprocessor systems.  Now,
-however, this document is being written on a dual-core laptop.  Even on
+however, even multiprocessor laptops (like the one used to write this document) are common.  And on
 single-processor systems, work being done to improve responsiveness will
 raise the level of concurrency within the kernel.  The days when kernel
 code could be written without thinking about locking are long past.
@@ -353,8 +353,8 @@ out.  Anything which might tempt a code janitor to make an incorrect
 4.4: INTERNAL API CHANGES
 
 The binary interface provided by the kernel to user space cannot be broken
-except under the most severe circumstances.  The kernel's internal
-programming interfaces, instead, are highly fluid and can be changed when
+except under the most severe circumstances.  But the kernel's internal
+programming interfaces are highly fluid and can be changed when
 the need arises.  If you find yourself having to work around a kernel API,
 or simply not using a specific functionality because it does not meet your
 needs, that may be a sign that the API needs to change.  As a kernel
Documentation/development-process/7.AdvancedTopics +1 -1
index 2cd6d49..d43ebaf 100644
@@ -98,7 +98,7 @@ of the reasons why development should be done in private branches (which
 can be rewritten if necessary) and only moved into public branches when
 it's in a reasonably advanced state.
 
-As the mainline (or other tree upon which a set of changes is based)
+As the mainline (or any other tree upon which a set of changes is based)
 advances, it is tempting to merge with that tree to stay on the leading
 edge.  For a private branch, rebasing can be an easy way to keep up with
 another tree, but rebasing is not an option once a tree is exported to the
#10 lore raw
In reply to Jonathan Corbet
Quoted 4 lines · Jonathan Corbet

Here is an updated version of the development process document; hopefully I've done a reasonable job of addressing everybody's comments. Please let me know if you find anything else in need of attention.

FWIW I wrote a paper/presentation for this years OLS with many similar recommendations. The main focus was on strategies for getting difficult patches in, but it also covered many basics.

http://halobates.de/on-submitting-patches.pdf
http://halobates.de/on-submitting-patches-pres.pdf

If there's interest material from the paper could be reused or put into Documentation.

-Andi