From mboxrd@z Thu Jan 1 00:00:00 1970 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 B095EC433EF for ; Fri, 24 Jun 2022 17:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231542AbiFXRkY (ORCPT ); Fri, 24 Jun 2022 13:40:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232441AbiFXRjo (ORCPT ); Fri, 24 Jun 2022 13:39:44 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADD8442EEF for ; Fri, 24 Jun 2022 10:39:36 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 9so3032123pgd.7 for ; Fri, 24 Jun 2022 10:39:36 -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=3ar/1+mLh6qwduTPDwnjCk+kxbN2oEHXoDxML/EcSVY=; b=tcm+JEo5h7ZP8844prP/5Eix8WGaHF02okroX9C2zMhuonNOxD9/QsJ8wQuQn9k6Xa AhuQxb1zIqms+uifDfo0h3BsqkDOHF0G1Qtce9E0EyHcPBIcUP3Jc6VKG1akTgw18Y0V EvR5qpeCVeVFSoEpTmceZuKK1+HPTs1xDMuZnH1ZSP0v/Ch25bMD/av/T/wz/pKZE/yY ZWhBMlLBG2nWojl8WqklNmq+oygQj4OU6PCi09vYmmDrwjLc6QUisbEB8qqrbT/lHWBN pRjfRIzG+1ITpQzaRkaqfPbUX7kYX6+szr8+Nq63cRHmoonjK2J5tZomCx1hrrpG77im 5AWQ== 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=3ar/1+mLh6qwduTPDwnjCk+kxbN2oEHXoDxML/EcSVY=; b=eG/5ix/+PIVEGyRbypbFmtOqmQtj9ytHRzHcBvdHS+b1uEe/9rpe8lr/lfpv19q6ve p4LFDwNCqtXJwGfG4chH+b2IM/8bnEVTCCD62zyC5s+Fa5KFoCTCV8rERmoafvBQEmBH GzC1y+d/yZGo4pqB86ukuQ4C3aeOiZIFKnk4Dc5sMpQBB9df1ZqAzTJ6wYO8osuEWdpk lJr1UMNrO22rncUmepqmNtnEyjCJhUu8E8PMoinc4EIKtYwKQyWfFp94vDZRRaeWtxPC w/PfnVvkGXPDh5hu7IYSc5Mz7xvEm3607fA9NxP3v436X7LUMvovWgTQM4s4UAJ0h52Z F3/g== X-Gm-Message-State: AJIora8+fsLP2/wI5ixq8wzql461AI0gXnX+gfvvzsIxf1/ICY50w3fN 22+ca2EeU8cSyb+l0vGqKNO03nQfBmDi2A== X-Google-Smtp-Source: AGRyM1vAYyA7QxGT8j8Ts1o26PFmFwdcra8ehtzV59gyWJSY9IqKpep++KGtW4PhKpcIVvmAhKGGBw== X-Received: by 2002:a63:ae4a:0:b0:40c:2d48:5fda with SMTP id e10-20020a63ae4a000000b0040c2d485fdamr14027pgp.434.1656092376024; Fri, 24 Jun 2022 10:39:36 -0700 (PDT) Received: from google.com (223.103.125.34.bc.googleusercontent.com. [34.125.103.223]) by smtp.gmail.com with ESMTPSA id s15-20020a17090a764f00b001df4b919937sm4193027pjl.16.2022.06.24.10.39.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 10:39:34 -0700 (PDT) Date: Fri, 24 Jun 2022 17:39:30 +0000 From: David Matlack To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] KVM: x86/mmu: Buffer nested MMU split_desc_cache only by default capacity Message-ID: References: <20220624171808.2845941-1-seanjc@google.com> <20220624171808.2845941-4-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220624171808.2845941-4-seanjc@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 24, 2022 at 05:18:08PM +0000, Sean Christopherson wrote: > Buffer split_desc_cache, the cache used to allcoate rmap list entries, > only by the default cache capacity (currently 40), not by doubling the > minimum (513). Aliasing L2 GPAs to L1 GPAs is uncommon, thus eager page > splitting is unlikely to need 500+ entries. And because each object is a > non-trivial 128 bytes (see struct pte_list_desc), those extra ~500 > entries means KVM is in all likelihood wasting ~64kb of memory per VM. > > Link: https://lore.kernel.org/all/YrTDcrsn0%2F+alpzf@google.com > Cc: David Matlack > Signed-off-by: Sean Christopherson Thanks for the cleanups! Reviewed-by: David Matlack