From patchwork Fri Nov 26 20:33:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 519696 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp2768838imj; Fri, 26 Nov 2021 12:34:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVuDJ8D12MjwMibHUFWzjyYz6/UlWw5evFomxlrBbVH3M1Hw7dN2DxT2ajcEFFEQxpVxI4 X-Received: by 2002:a05:622a:1207:: with SMTP id y7mr17575162qtx.592.1637958860812; Fri, 26 Nov 2021 12:34:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637958860; cv=none; d=google.com; s=arc-20160816; b=I01/Bwb657PZxXITcOx6EW8dbvFhcKfxbvHPbEAKprkGM0xiIsDFfyyqRGK85ltVNT qBSZ8Y5pSuEn71zA/DcR/w2lnRC8E9KdwAvXpETlALnIZ90WxSYmT9u70XpVzsfJ40vQ oXUboy2zrGMG1XP/dlnHo3Wri8sPp0d7USiSbG+D6jvazpdR78vIPEJ9hKEvhLljqDjT svkDUVF8A66nNDZA6SX6bvspOZGbp/+34E2rmGq4dXxhuJJYdTeU/gARbnF0vw1j48GA CkRquC6iHjOrIgBaqFqAzyOxi06nodVMVIY6pdnXci9Pk0CNqoE6pIrjwvLOIGnj3ahK 1rrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=ekmDm+D3liMVqm/vNaJDG9rINo8SFnexRabdDZVVm6Q=; b=auyGeY1Y5SPta/iEHgM/sLTTe/F2nlWz1+XQ/qNm2hKLjwqRSAIC1zbY/0waWfPUxw j7NtmS0wQLCidsUk2LuLbrmcsXs0JXK0DxLYNuIff4hJudIkjEMgWtG246FhHyNqJTGl TnMWuM0KHcmT1yYSfa7Ioa7dp/AckLKeO/5AfJSFaXa26PvDuHqlQPhQf5omrtd0Ph/N XeXKP8kRD6mr81YD4E0LrtoysYlDcoq0Er/3mKgOTkmDU7BNGjd25ByxAbOnnFKCgJJj 9qfL1BE7a97+HteFSVYtP3bNR8QxR+Ll59qNIFUpXpAi1XzI+bIrvbK2KWt4sozyO3Jw CgKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TXFtZmZb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p68si7388208qke.189.2021.11.26.12.34.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Nov 2021 12:34:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TXFtZmZb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqhvI-0007v0-8U for patch@linaro.org; Fri, 26 Nov 2021 15:34:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqhuY-0007ur-SW for qemu-devel@nongnu.org; Fri, 26 Nov 2021 15:33:34 -0500 Received: from [2a00:1450:4864:20::335] (port=38881 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqhuW-0000Uy-Ns for qemu-devel@nongnu.org; Fri, 26 Nov 2021 15:33:34 -0500 Received: by mail-wm1-x335.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso11506406wms.3 for ; Fri, 26 Nov 2021 12:33:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ekmDm+D3liMVqm/vNaJDG9rINo8SFnexRabdDZVVm6Q=; b=TXFtZmZbssziEVTQacoG5brjlrjkWWoX957CzVEWchzQ23pNzS4pmcw9MvjtJEORc3 P2tA35n92oqqUK2IdU2HO56lq8XEH1THBZYyEPi63YmBhlGMalY4dNuyuTMasW0Hx8ZO aAKnsQJCjkEzEECf2Qcem7Ja+z69YrI4jMxeDFEqun1o09CiEtJTBaL5zUFbSgN5iia4 yEtkYMLXPqriNXr9DwHPFOy7EpgKeicrJsrBwqQzDujUIC5pS7K00Q3aXJqs9t9r1tH+ d07mmX63EWkIYKXvdrx4WWzXWcUiTW8bawjltsaiyfR5QpbkEUJhlXU85F+jla8/Kd2S xlRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ekmDm+D3liMVqm/vNaJDG9rINo8SFnexRabdDZVVm6Q=; b=8IorhxloIsjcoOofCrb6YwyHiECk9uPjoslbSfCh1iSMESF2b6Kr8YKff9Ayt1LD9j Strd9cy7tgJRHbSzo4nl1rTD1hy5TtpgXb5zxjewovHK26gobg74xe5uEGd8DtdM1Y5g 7DabmvRl0bfzhaplcOmOudHRxb8YUKyD45IG6JX2RoPqLjbgkWgYG8dy0vpyf0fbE4/6 pMyorbi2VvU+r1+6Vs4OcS3U9tiZiv3xjNhiuBWqD9BZAEGf0f+ShSqJLeZxAo4FwMrb 1SpRFY9ctEBrQ6r8VwEP3Ac0zRhA+ozccz62ujaHQlE/TOvF0DpiDKKvRgVWdBJjdsxm gA1w== X-Gm-Message-State: AOAM5302B+ZrC3/YJSmAlZM0Rj/SEX56pF1gdblaDjO0u6cbegPJFFxo Hm4hhdImnrM9c6BiXlbJ0RFLFA== X-Received: by 2002:a05:600c:1d0e:: with SMTP id l14mr17866887wms.64.1637958810377; Fri, 26 Nov 2021 12:33:30 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y7sm6327624wrw.55.2021.11.26.12.33.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 12:33:29 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3C5281FF96; Fri, 26 Nov 2021 20:33:28 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [RFC PATCH] blog post: how to get your new feature up-streamed Date: Fri, 26 Nov 2021 20:33:19 +0000 Message-Id: <20211126203319.3298089-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, thuth@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Experience has shown that getting new functionality up-streamed can be a somewhat painful process. Lets see if we can collect some of our community knowledge into a blog post describing some best practices for getting code accepted. [AJB: obviously RFC for now, need material for the end] Signed-off-by: Alex Bennée --- ...26-so-you-want-to-add-something-to-qemu.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 _posts/2021-11-26-so-you-want-to-add-something-to-qemu.md diff --git a/_posts/2021-11-26-so-you-want-to-add-something-to-qemu.md b/_posts/2021-11-26-so-you-want-to-add-something-to-qemu.md new file mode 100644 index 0000000..d38c0ca --- /dev/null +++ b/_posts/2021-11-26-so-you-want-to-add-something-to-qemu.md @@ -0,0 +1,100 @@ +--- +layout: post +title: "So you want to add a sub-system/device/architecture to QEMU?" +date: 2021-11-26 19:43:45 +author: Alex Bennée +categories: [blog, process, development] +--- + +From time to time I hear of frustrations from potential new +contributors who have tried to get new features up-streamed into the +QEMU repository. After having read [our patch +guidelines](https://qemu.readthedocs.io/en/latest/devel/submitting-a-patch.html) +they post them to [qemu-devel](https://lore.kernel.org/qemu-devel/). +Often the patches sit there seemingly unread and unloved. The +developer is left wandering if they missed out the secret hand shake +required to move the process forward. My hope is that this blog post +will help. + + +New features != Fixing a bug +============================ + +Adding a new feature is not the same as fixing a bug. For an area of +code that is supported for Odd Fixes or above there will be a +someone listed in the +[MAINTAINERS](https://gitlab.com/qemu-project/qemu/-/blob/master/MAINTAINERS) +file. A properly configured `git-send-email` will even automatically +add them to the patches as they are sent out. The maintainer will +review the code and if no changes are requested they ensure the +patch flows through the appropriate trees and eventually makes it into +the master branch. + +This doesn't usually happen for new code unless your patches happen to +touch a directory that is marked as maintained. Without a maintainer +to look at and apply your patches how will it ever get merged? + +Adding new code to a project is not a free activity. Code that isn't +actively maintained has a tendency to [bit +rot](http://www.catb.org/jargon/html/B/bit-rot.html) and become a drag +on the rest of the code base. The QEMU code base is quite large and +none of the developers are knowledgeable about the all of it. If +features aren't +[documented](https://qemu.readthedocs.io/en/latest/devel/submitting-a-patch.html) +they tend to remain unused as users struggle to enable them. If an +unused feature becomes a drag on the rest of the code base by preventing +re-factoring and other clean ups it is likely to be deprecated. +Eventually deprecated code gets removed from the code base never to be +seen again. + +Fortunately there is a way to avoid the ignominy of ignored new features +and that is to become a maintainer of your own code! + +The maintainers path +==================== + +There is perhaps an unfortunate stereotype in the open source world of +maintainers being grumpy old experts who spend their time dismissively +rejecting the patches of new contributors. Having done their time in +the metaphorical trenches of the project they must ingest the email +archive to prove their encyclopedic mastery. Eventually they then +ascend to the status of maintainer having completed the dark key +signing ritual. + +In reality the process is much more prosaic - you simply need to send +a patch to the MAINTAINERS file with your email address, the areas you +are going to cover and the level of support you expect to give. + +I won't pretend there isn't some commitment required when becoming a +maintainer. However if you were motivated enough to write the code for +a new feature you should be up to keeping it running smoothly in the +upstream. The level of effort required is also proportional to the +popularity of the feature - there is a world of difference between +maintaining an individual device and a core subsystem. If the feature + +Practically you will probably want to get yourself a +[GitLab](https://gitlab.com/qemu-project/qemu/-/blob/master/MAINTAINERS) +account so you can run the CI tests on your pull requests. While +membership of `qemu-devel` is recommended no one is expecting you to +read every message sent to it as long as you look at those where you +are explicitly Cc'd. + +Now if you are convinced to become a maintainer for your new feature +lets discuss how you can improve the chances of getting it merged. + +A practically perfect set of patches +==================================== + +I don't want to repeat all the valuable information from the +submitting patches document but I do want to emphasise the importance +of responding to comments and collecting review and testing tags. + +While it usual to expect a maintainer `Reviewed-by` or `Acked-by` tags for any +patches that touches another sub-system there is still the problem of +getting reviews for your brand new code. Fortunately there is no +approved reviewer list for QEMU. The purpose of review is to show that +someone else has at least applied the patches and run the code. Even +if they are not confident in reviewing the source a `Tested-by` tag +gives confidence that the code works. + +