1*4454d382SJakub Kicinski.. SPDX-License-Identifier: GPL-2.0 2*4454d382SJakub Kicinski 3*4454d382SJakub Kicinski============================== 4*4454d382SJakub KicinskiFeature and driver maintainers 5*4454d382SJakub Kicinski============================== 6*4454d382SJakub Kicinski 7*4454d382SJakub KicinskiThe term "maintainer" spans a very wide range of levels of engagement 8*4454d382SJakub Kicinskifrom people handling patches and pull requests as almost a full time job 9*4454d382SJakub Kicinskito people responsible for a small feature or a driver. 10*4454d382SJakub Kicinski 11*4454d382SJakub KicinskiUnlike most of the chapter, this section is meant for the latter (more 12*4454d382SJakub Kicinskipopulous) group. It provides tips and describes the expectations and 13*4454d382SJakub Kicinskiresponsibilities of maintainers of a small(ish) section of the code. 14*4454d382SJakub Kicinski 15*4454d382SJakub KicinskiDrivers and alike most often do not have their own mailing lists and 16*4454d382SJakub Kicinskigit trees but instead send and review patches on the list of a larger 17*4454d382SJakub Kicinskisubsystem. 18*4454d382SJakub Kicinski 19*4454d382SJakub KicinskiResponsibilities 20*4454d382SJakub Kicinski================ 21*4454d382SJakub Kicinski 22*4454d382SJakub KicinskiThe amount of maintenance work is usually proportional to the size 23*4454d382SJakub Kicinskiand popularity of the code base. Small features and drivers should 24*4454d382SJakub Kicinskirequire relatively small amount of care and feeding. Nonetheless 25*4454d382SJakub Kicinskiwhen the work does arrive (in form of patches which need review, 26*4454d382SJakub Kicinskiuser bug reports etc.) it has to be acted upon promptly. 27*4454d382SJakub KicinskiEven when a particular driver only sees one patch a month, or a quarter, 28*4454d382SJakub Kicinskia subsystem could well have a hundred such drivers. Subsystem 29*4454d382SJakub Kicinskimaintainers cannot afford to wait a long time to hear from reviewers. 30*4454d382SJakub Kicinski 31*4454d382SJakub KicinskiThe exact expectations on the response time will vary by subsystem. 32*4454d382SJakub KicinskiThe patch review SLA the subsystem had set for itself can sometimes 33*4454d382SJakub Kicinskibe found in the subsystem documentation. Failing that as a rule of thumb 34*4454d382SJakub Kicinskireviewers should try to respond quicker than what is the usual patch 35*4454d382SJakub Kicinskireview delay of the subsystem maintainer. The resulting expectations 36*4454d382SJakub Kicinskimay range from two working days for fast-paced subsystems (e.g. networking) 37*4454d382SJakub Kicinskito as long as a few weeks in slower moving parts of the kernel. 38*4454d382SJakub Kicinski 39*4454d382SJakub KicinskiMailing list participation 40*4454d382SJakub Kicinski-------------------------- 41*4454d382SJakub Kicinski 42*4454d382SJakub KicinskiLinux kernel uses mailing lists as the primary form of communication. 43*4454d382SJakub KicinskiMaintainers must be subscribed and follow the appropriate subsystem-wide 44*4454d382SJakub Kicinskimailing list. Either by subscribing to the whole list or using more 45*4454d382SJakub Kicinskimodern, selective setup like 46*4454d382SJakub Kicinski`lei <https://people.kernel.org/monsieuricon/lore-lei-part-1-getting-started>`_. 47*4454d382SJakub Kicinski 48*4454d382SJakub KicinskiMaintainers must know how to communicate on the list (plain text, no invasive 49*4454d382SJakub Kicinskilegal footers, no top posting, etc.) 50*4454d382SJakub Kicinski 51*4454d382SJakub KicinskiReviews 52*4454d382SJakub Kicinski------- 53*4454d382SJakub Kicinski 54*4454d382SJakub KicinskiMaintainers must review *all* patches touching exclusively their drivers, 55*4454d382SJakub Kicinskino matter how trivial. If the patch is a tree wide change and modifies 56*4454d382SJakub Kicinskimultiple drivers - whether to provide a review is left to the maintainer. 57*4454d382SJakub Kicinski 58*4454d382SJakub KicinskiWhen there are multiple maintainers for a piece of code an ``Acked-by`` 59*4454d382SJakub Kicinskior ``Reviewed-by`` tag (or review comments) from a single maintainer is 60*4454d382SJakub Kicinskienough to satisfy this requirement. 61*4454d382SJakub Kicinski 62*4454d382SJakub KicinskiIf the review process or validation for a particular change will take longer 63*4454d382SJakub Kicinskithan the expected review timeline for the subsystem, maintainer should 64*4454d382SJakub Kicinskireply to the submission indicating that the work is being done, and when 65*4454d382SJakub Kicinskito expect full results. 66*4454d382SJakub Kicinski 67*4454d382SJakub KicinskiRefactoring and core changes 68*4454d382SJakub Kicinski---------------------------- 69*4454d382SJakub Kicinski 70*4454d382SJakub KicinskiOccasionally core code needs to be changed to improve the maintainability 71*4454d382SJakub Kicinskiof the kernel as a whole. Maintainers are expected to be present and 72*4454d382SJakub Kicinskihelp guide and test changes to their code to fit the new infrastructure. 73*4454d382SJakub Kicinski 74*4454d382SJakub KicinskiBug reports 75*4454d382SJakub Kicinski----------- 76*4454d382SJakub Kicinski 77*4454d382SJakub KicinskiMaintainers must ensure severe problems in their code reported to them 78*4454d382SJakub Kicinskiare resolved in a timely manner: regressions, kernel crashes, kernel warnings, 79*4454d382SJakub Kicinskicompilation errors, lockups, data loss, and other bugs of similar scope. 80*4454d382SJakub Kicinski 81*4454d382SJakub KicinskiMaintainers furthermore should respond to reports about other kinds of 82*4454d382SJakub Kicinskibugs as well, if the report is of reasonable quality or indicates a 83*4454d382SJakub Kicinskiproblem that might be severe -- especially if they have *Supported* 84*4454d382SJakub Kicinskistatus of the codebase in the MAINTAINERS file. 85*4454d382SJakub Kicinski 86*4454d382SJakub KicinskiSelecting the maintainer 87*4454d382SJakub Kicinski======================== 88*4454d382SJakub Kicinski 89*4454d382SJakub KicinskiThe previous section described the expectations of the maintainer, 90*4454d382SJakub Kicinskithis section provides guidance on selecting one and describes common 91*4454d382SJakub Kicinskimisconceptions. 92*4454d382SJakub Kicinski 93*4454d382SJakub KicinskiThe author 94*4454d382SJakub Kicinski---------- 95*4454d382SJakub Kicinski 96*4454d382SJakub KicinskiMost natural and common choice of a maintainer is the author of the code. 97*4454d382SJakub KicinskiThe author is intimately familiar with the code, so it is the best person 98*4454d382SJakub Kicinskito take care of it on an ongoing basis. 99*4454d382SJakub Kicinski 100*4454d382SJakub KicinskiThat said, being a maintainer is an active role. The MAINTAINERS file 101*4454d382SJakub Kicinskiis not a list of credits (in fact a separate CREDITS file exists), 102*4454d382SJakub Kicinskiit is a list of those who will actively help with the code. 103*4454d382SJakub KicinskiIf the author does not have the time, interest or ability to maintain 104*4454d382SJakub Kicinskithe code, a different maintainer must be selected. 105*4454d382SJakub Kicinski 106*4454d382SJakub KicinskiMultiple maintainers 107*4454d382SJakub Kicinski-------------------- 108*4454d382SJakub Kicinski 109*4454d382SJakub KicinskiModern best practices dictate that there should be at least two maintainers 110*4454d382SJakub Kicinskifor any piece of code, no matter how trivial. It spreads the burden, helps 111*4454d382SJakub Kicinskipeople take vacations and prevents burnout, trains new members of 112*4454d382SJakub Kicinskithe community etc. etc. Even when there is clearly one perfect candidate, 113*4454d382SJakub Kicinskianother maintainer should be found. 114*4454d382SJakub Kicinski 115*4454d382SJakub KicinskiMaintainers must be human, therefore, it is not acceptable to add a mailing 116*4454d382SJakub Kicinskilist or a group email as a maintainer. Trust and understanding are the 117*4454d382SJakub Kicinskifoundation of kernel maintenance and one cannot build trust with a mailing 118*4454d382SJakub Kicinskilist. Having a mailing list *in addition* to humans is perfectly fine. 119*4454d382SJakub Kicinski 120*4454d382SJakub KicinskiCorporate structures 121*4454d382SJakub Kicinski-------------------- 122*4454d382SJakub Kicinski 123*4454d382SJakub KicinskiTo an outsider the Linux kernel may resemble a hierarchical organization 124*4454d382SJakub Kicinskiwith Linus as the CEO. While the code flows in a hierarchical fashion, 125*4454d382SJakub Kicinskithe corporate template does not apply here. Linux is an anarchy held 126*4454d382SJakub Kicinskitogether by (rarely expressed) mutual respect, trust and convenience. 127*4454d382SJakub Kicinski 128*4454d382SJakub KicinskiAll that is to say that managers almost never make good maintainers. 129*4454d382SJakub KicinskiThe maintainer position more closely matches an on-call rotation 130*4454d382SJakub Kicinskithan a position of power. 131*4454d382SJakub Kicinski 132*4454d382SJakub KicinskiThe following characteristics of a person selected as a maintainer 133*4454d382SJakub Kicinskiare clear red flags: 134*4454d382SJakub Kicinski 135*4454d382SJakub Kicinski - unknown to the community, never sent an email to the list before 136*4454d382SJakub Kicinski - did not author any of the code 137*4454d382SJakub Kicinski - (when development is contracted) works for a company which paid 138*4454d382SJakub Kicinski for the development rather than the company which did the work 139*4454d382SJakub Kicinski 140*4454d382SJakub KicinskiNon compliance 141*4454d382SJakub Kicinski============== 142*4454d382SJakub Kicinski 143*4454d382SJakub KicinskiSubsystem maintainers may remove inactive maintainers from the MAINTAINERS 144*4454d382SJakub Kicinskifile. If the maintainer was a significant author or played an important 145*4454d382SJakub Kicinskirole in the development of the code, they should be moved to the CREDITS file. 146*4454d382SJakub Kicinski 147*4454d382SJakub KicinskiRemoving an inactive maintainer should not be seen as a punitive action. 148*4454d382SJakub KicinskiHaving an inactive maintainer has a real cost as all developers have 149*4454d382SJakub Kicinskito remember to include the maintainers in discussions and subsystem 150*4454d382SJakub Kicinskimaintainers spend brain power figuring out how to solicit feedback. 151*4454d382SJakub Kicinski 152*4454d382SJakub KicinskiSubsystem maintainers may remove code for lacking maintenance. 153*4454d382SJakub Kicinski 154*4454d382SJakub KicinskiSubsystem maintainers may refuse accepting code from companies 155*4454d382SJakub Kicinskiwhich repeatedly neglected their maintainership duties. 156