Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A01CEC433EF for ; Wed, 1 Dec 2021 16:23:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350352AbhLAQ1C (ORCPT ); Wed, 1 Dec 2021 11:27:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350227AbhLAQ07 (ORCPT ); Wed, 1 Dec 2021 11:26:59 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8EFAC061748 for ; Wed, 1 Dec 2021 08:23:38 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id r130so25079063pfc.1 for ; Wed, 01 Dec 2021 08:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KXlDbDHfm6MPpsIvUexZXkH+Oo9wCHRMsnEAQA6kjIo=; b=lcqV50x1HrgXfVhXY5D5JKXgkYr1FUZYfbMRQflyIJQE6UrA7g56VucLgGn3xsZ7hO 1FClIo5U/3GH4H8hNd60p8EvXmi2onk+efUkewDJwg0oVb6VI7bUd/ls0K68IrZrvAIf SOomzc9JPnD5ctRRIVkE78U1LmXDuNbHnb3c1uzg3EWgTnooY0r4GKeisD7TVl1gSDEF TqOPrLHgUdUEpdF4f+7xpaQwjerOvCcODZDNMyc0kDjpa7k6i4Ne4MdxBxzBUGmJz77m Jm0tC/jVtT3DTvfpP6i5nxQ9vim+iDOOCw/52v+uYK8TYwF/dY/jSV4wtXprG8PRm8nj 4uXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KXlDbDHfm6MPpsIvUexZXkH+Oo9wCHRMsnEAQA6kjIo=; b=oXWY8nX0HGu8xuV8Cigx6dWLSA7Qn58sb0Jt1zA3DgeDs4/HTwKHUJwF8lKToXjPaH UeF+LRC41HQnLiutR8J1Hgy9UWvyWFOf98gtmRDqZkC9ODqZ7RaDDT+mL5V6w6J9+Lat FUo6c2x+mlJcPnBduGT6kzhgs+KNVnrgzmp+OSOTwW+2ZuWQBtNJ3cwHZ2+xo5zFPUBc zkHg1Vc/Zo64jlJhmG2Tra1pck3sZepulmJ8qcMnfxut22V5eExEi8N3vLISLpZdsKmv X9O+dnVZ/7Vw9kIJmrxm4Ei2QcgOiOfVhkHYb6nQ8wjFLHyDPXGawn1e7P3L0dEGnthT +xKQ== X-Gm-Message-State: AOAM533LVbZIbrAF1gNW/MEZcO1mDX/4w7E5ZT6e4FR0C4PDmKEZ4mgU 6YHeTXYHyPmy01hciG6q+ePMWg== X-Google-Smtp-Source: ABdhPJyBL07bl8kieStSK+Wj6FYYCzBo3wL7q1LXnaEGhsvYbQVXbGT/IEE+Can6YtJ9beFrHU6X0g== X-Received: by 2002:a05:6a00:84c:b0:494:6d40:ed76 with SMTP id q12-20020a056a00084c00b004946d40ed76mr6940144pfk.65.1638375817560; Wed, 01 Dec 2021 08:23:37 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id a3sm192787pgj.2.2021.12.01.08.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 08:23:36 -0800 (PST) Date: Wed, 1 Dec 2021 16:23:33 +0000 From: Sean Christopherson To: "Maciej S. Szmigiero" Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Igor Mammedov , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandru Elisei , Atish Patra , Ben Gardon , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 21/29] KVM: Resolve memslot ID via a hash table instead of via a static array Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 01, 2021, Maciej S. Szmigiero wrote: > On 01.12.2021 03:54, Sean Christopherson wrote: > > On Tue, Nov 30, 2021, Maciej S. Szmigiero wrote: > > > From: "Maciej S. Szmigiero" > > > > > > Memslot ID to the corresponding memslot mappings are currently kept as > > > indices in static id_to_index array. > > > The size of this array depends on the maximum allowed memslot count > > > (regardless of the number of memslots actually in use). > > > > > > This has become especially problematic recently, when memslot count cap was > > > removed, so the maximum count is now full 32k memslots - the maximum > > > allowed by the current KVM API. > > > > > > Keeping these IDs in a hash table (instead of an array) avoids this > > > problem. > > > > > > Resolving a memslot ID to the actual memslot (instead of its index) will > > > also enable transitioning away from an array-based implementation of the > > > whole memslots structure in a later commit. > > > > > > Signed-off-by: Maciej S. Szmigiero > > > Co-developed-by: Sean Christopherson > > > Signed-off-by: Sean Christopherson > > > > Nit, your SoB should come last since you were the last person to handle the patch. > > > > Thought that my SoB should come first as coming from the author of this > patch. > > Documentation/process/submitting-patches.rst says that: > > Any further SoBs (Signed-off-by:'s) following the author's SoB are from > > people handling and transporting the patch, but were not involved in its > > development. SoB chains should reflect the **real** route a patch took > > as it was propagated to the maintainers and ultimately to Linus, with > > the first SoB entry signalling primary authorship of a single author. > > So "further SoBs follow[] the author's SoB" and "the first SoB entry > signal[s] primary authorship". > But at the same time "SoB chains should reflect the **real** route a > patch took" - these rules contradict each other in our case. Yeah, this is a unusual case. If we wanted to be super strict, for patches written by you without a Co-developed-by, the SoB chain should be: Signed-off-by: Maciej S. Szmigiero Signed-off-by: Sean Christopherson Signed-off-by: Maciej S. Szmigiero but that's a bit ridiculous and probably unnecessary since my changes were little more than code review feedback, which is why I think it's ok to just drop my SoB for patches authored solely by you. Co-developed-by is a slightly different case. Because patches with multiple authors are likely handed back and forth multiple times, as was the case here, and because each author needs a SoB anyways, the normal rules are tweaked slightly to require that the person submitting the patch is always last to capture that they were the person that did the actual submission. There's another "When to use Acked-by:, Cc:, and Co-developed-by:" section in submitting-patches.rst that covers this: Co-developed-by: states that the patch was co-created by multiple developers; it is used to give attribution to co-authors (in addition to the author attributed by the From: tag) when several people work on a single patch. Since Co-developed-by: denotes authorship, every Co-developed-by: must be immediately followed by a Signed-off-by: of the associated co-author. Standard sign-off procedure applies, i.e. the ordering of Signed-off-by: tags should reflect the chronological history of the patch insofar as possible, regardless of whether the author is attributed via From: or Co-developed-by:. Notably, the last Signed-off-by: must always be that of the developer submitting the patch. Note, the From: tag is optional when the From: author is also the person (and email) listed in the From: line of the email header. Example of a patch submitted by the From: author:: Co-developed-by: First Co-Author Signed-off-by: First Co-Author Co-developed-by: Second Co-Author Signed-off-by: Second Co-Author Signed-off-by: From Author Example of a patch submitted by a Co-developed-by: author:: From: From Author Co-developed-by: Random Co-Author Signed-off-by: Random Co-Author Signed-off-by: From Author Co-developed-by: Submitting Co-Author Signed-off-by: Submitting Co-Author