Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp508656pxb; Wed, 3 Nov 2021 07:50:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyu9slzHz8bd6VLVvRkJ80znrfN+zVyNrkzC6Njyv9wGbiT3yMHTRGhwoWYtgBbEvwCVa18 X-Received: by 2002:a92:c8c6:: with SMTP id c6mr21559072ilq.54.1635951006196; Wed, 03 Nov 2021 07:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635951006; cv=none; d=google.com; s=arc-20160816; b=Aaa3Ct3HJvZKYFCn8jj+odiGpNGoDA6xsMbYrRJuAySTsT2MR//+S0gUQSfnxdxu2P gTOtmeQUy1utjE3FyVRKU7kGlJDKdlR6rqv10bq+NBbXVKR1iVqMKYRtu/KEvMt39sRj ufhe87m+jg1K8NcFSlLgCnC9FYvCHr0gnXQqrNnEH085tVd5yQziLZBwEHWBTVwu7YbP LVkTrIQ24X39iF7ekwc1iTnrIRzb9cuQQyVj7GuGX5nczmAnYsQOL1LaXjInSOi9Waj3 glVKjXX7W2nXAJxN3ZaEP8nXKgJpQHT5Jb/g5ubn/mG31CSoF3ECCQMbAysSugt8DwL4 Ih3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=C0wf2K0rKG8C1RSWcaFIUVVK/MmFwAdNj5eu/GP5eZg=; b=O5sl7+xRLCkXyIkgfTk6RY6iFT/mSK8T1aC87bojxfkXE3BEc8gnDTAZ2l1yF+tV9V 74Pk4R6jS8iXUkTJU1BEriZmzZnNMEkI4Z5xKl6suXbxasLhgqzed5Ed5oZNmVcOg4W1 Wel/+SHdgJzejvmCEH1p20gpX/n2ayu9M9bza8/nog//6Vne7Bbroucfeex47hqmTZEq mpkL5P/9/n8cV+fXikkTNt8Iq+jHZa/i82LocFkhoxHmrUIvnpBQojlct2ZOnI2iyEB0 1fmsyPiOpfIZ5KKczJrLYARwre0Lmqd8Ai8Nb5bFK3vOB9qDCp1eVs/LIOR/hpMh/Y+H bZjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B9VpNWux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si4147481ilv.107.2021.11.03.07.49.51; Wed, 03 Nov 2021 07:50:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B9VpNWux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231510AbhKCOuc (ORCPT + 99 others); Wed, 3 Nov 2021 10:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbhKCOuc (ORCPT ); Wed, 3 Nov 2021 10:50:32 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D085AC061714 for ; Wed, 3 Nov 2021 07:47:55 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id f5so2550279pgc.12 for ; Wed, 03 Nov 2021 07:47:55 -0700 (PDT) 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=C0wf2K0rKG8C1RSWcaFIUVVK/MmFwAdNj5eu/GP5eZg=; b=B9VpNWuxUqohM9ynGgVOtGz8t7EVldEXvn3TpJhPxTpkMNfKclNBrxgJdXzCq0J3Ep uWL792cWDfDzfIAEEqij34sAHWOzPFONgEN5oY3XdM3Z9T90FapJZn8rOwaJFelsuFXR GNNBiMkKbp7bWV0FyPlxCmbbFyFs/FJC6AOWaqUo89Vce/oTS/6ZKuvmPV8J3HtPVW7j de88q1nuq/CKP2qgl14Xr/dB72CqhnsXK7AcNa9DCMkHKx9I6wDsnCIGDHnDfpyaSmON l3onlOy36NkkWlhejiCAwar3Jx/gMyH+GKDuHmP9AbS9gcqx/shdiJUH1yBB4AFvHC98 VjIQ== 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=C0wf2K0rKG8C1RSWcaFIUVVK/MmFwAdNj5eu/GP5eZg=; b=JdqRBTsufd8cU/kuaCcMlhFeDGWMPquD3uWbCo2sP1x3pu4Lfsjsv0do7KdQH12oNj 0MedBEjiim6cJsc4wMBTTnLOpH1aSBRD87oCbtDaiKLL3aNx9qmrWt/zssA/z9H8lw7T JfSVo1Gpj9hxDdRXt8U58vKIiRkc9vJeLYT2u6Tl7892cD9opLVctdHD4gsuXLoDRXfA DHUSAGtYGQW+rJm9lltB6o4Giyi3swKkS//sKfwKJ0+p/Mg7H5EROfDsOTPNkDRYfulj Bx80PSOCEqMlcUOhongdB6cggwRscBm6sYvBGwISNmcYKh1ry882huSgsDgrjO2GVVRf BYsQ== X-Gm-Message-State: AOAM532WpTj9YQis+Lne6JtPFUav1Vg1oIYXt5MFwNdNVW3DC5IfiTZd HFvtp9XAwTh1cIIWtS79r23o6w== X-Received: by 2002:a63:556:: with SMTP id 83mr22917640pgf.222.1635950874972; Wed, 03 Nov 2021 07:47:54 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id e24sm2586994pfn.8.2021.11.03.07.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 07:47:54 -0700 (PDT) Date: Wed, 3 Nov 2021 14:47:50 +0000 From: Sean Christopherson To: "Maciej S. Szmigiero" Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , 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 , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 01/13] KVM: x86: Cache total page count to avoid traversing the memslot array Message-ID: References: <8017cf9d-2b03-0c27-b78a-41b3d03c308b@maciej.szmigiero.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8017cf9d-2b03-0c27-b78a-41b3d03c308b@maciej.szmigiero.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 03, 2021, Maciej S. Szmigiero wrote: > Capping total n_memslots_pages makes sense to me to avoid the (existing) > nr_mmu_pages wraparound issue, will update the next patchset version > accordingly. No need to do it yourself. I have a reworked version of the series with a bunch of cleanups before and after the meat of your series, as well non-functional changes (hopefully) to the "Resolve memslot ID via a hash table" and "Keep memslots in tree-based structures" to avoid all the swap() behavior and to provide better continuity between the aforementioned patches. Unless something goes sideways in the last few touchups, I'll get it posted today.