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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6E12C433B4 for ; Tue, 4 May 2021 18:17:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80A5F61008 for ; Tue, 4 May 2021 18:17:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232254AbhEDSSI (ORCPT ); Tue, 4 May 2021 14:18:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232183AbhEDSSH (ORCPT ); Tue, 4 May 2021 14:18:07 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A969C06174A for ; Tue, 4 May 2021 11:17:11 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id x188so6641751pfd.7 for ; Tue, 04 May 2021 11:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=14b7XgnhSuRkX7Ox309zfy7AdpkEzaYxX119We4gjnY=; b=pLnD59w1zG5K84HrnD/SSxkOwRZPxyLv242DpXFHJly55QqhlDdJ1PMllReMOfJEmL cba5bErynjsfVQV6HO8F1MhNdxTkmmo8nMu2NgBzyeL1zC8ZWZIBfAd+62Qwfb2M/c5k bE/4Bcg8gRCNChwxM4cEKidlL2aDXh2DLgsPnvm9W6O2yQddakyBBnJDBdVz659B10YJ Y0tux2aKSJbJci8XBo9GE4+v2tw45KC46kodx/ZaH6SqTbpYk9gSBLU/T577ODC0Hddq ThpeqdJELRHjEVO4sDs3PLOTkilWJmdoxF09ZTutJoHlgV+As8IGt6e5MGZB54R9Ml3P bTXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=14b7XgnhSuRkX7Ox309zfy7AdpkEzaYxX119We4gjnY=; b=YV2ttmnrDuE4E8IDQT7seLhK3aHOBut1HJP7sSrPBRe8v32BQ5QUUIFeeXsho8QRz8 XeLUj5oGtITyonc7wl0272rgGq8mFmV/TehoOpKLxLwkVy9bwo5WizifFjrQ3O76gwDd bJ9tq/bJZ9egNULJMMV+L7c2bVdFu3hAjVNmHuJBKhOFjdHKPTTAEKvH5W0MViZ0FMBx Ox531YuK1uLKIjEOREjoQGJNdmnnpMEWkEPOIEyZfQ6t1dIkEIjmYDujPVzQr9VuyVNa e9MCfKk4gzBb/xGSr2Yj0CnCykLzfMZTz0M07bIRlKgeBLZRtaqPbImaqR9Uvy/oncR5 l2ew== X-Gm-Message-State: AOAM5327JmWj2164uTS0wtd12K45oadnJXpiMuoNnaolWDnxWbPQWJuH Ks36xveV5IEkV/joAptAgqyHOZHpnJTKFQ== X-Google-Smtp-Source: ABdhPJxfvDZm5IlG3fikLP6ejiZTWjCh5Zo2BWDsG6bH3EAtMHHvBGctDXw3Rng1YEbtrLvZBr6NOw== X-Received: by 2002:a17:90a:55c5:: with SMTP id o5mr6051105pjm.169.1620152230643; Tue, 04 May 2021 11:17:10 -0700 (PDT) Received: from google.com (240.111.247.35.bc.googleusercontent.com. [35.247.111.240]) by smtp.gmail.com with ESMTPSA id k14sm15051948pjg.0.2021.05.04.11.17.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 11:17:09 -0700 (PDT) Date: Tue, 4 May 2021 18:17:06 +0000 From: Sean Christopherson To: Ben Gardon Cc: Paolo Bonzini , LKML , kvm , Peter Xu , Peter Shier , Junaid Shahid , Jim Mattson , Yulei Zhang , Wanpeng Li , Vitaly Kuznetsov , Xiao Guangrong Subject: Re: [PATCH v2 0/7] Lazily allocate memslot rmaps Message-ID: References: <20210429211833.3361994-1-bgardon@google.com> <4d27e9d6-42db-3aa1-053a-552e1643f46d@redhat.com> 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 Tue, May 04, 2021, Ben Gardon wrote: > On Tue, May 4, 2021 at 12:21 AM Paolo Bonzini wrote: > > > > On 03/05/21 19:31, Ben Gardon wrote: > > > On Mon, May 3, 2021 at 6:45 AM Paolo Bonzini wrote: > > >> > > >> On 29/04/21 23:18, Ben Gardon wrote: > > >>> This series enables KVM to save memory when using the TDP MMU by waiting > > >>> to allocate memslot rmaps until they are needed. To do this, KVM tracks > > >>> whether or not a shadow root has been allocated. In order to get away > > >>> with not allocating the rmaps, KVM must also be sure to skip operations > > >>> which iterate over the rmaps. If the TDP MMU is in use and we have not > > >>> allocated a shadow root, these operations would essentially be op-ops > > >>> anyway. Skipping the rmap operations has a secondary benefit of avoiding > > >>> acquiring the MMU lock in write mode in many cases, substantially > > >>> reducing MMU lock contention. > > >>> > > >>> This series was tested on an Intel Skylake machine. With the TDP MMU off > > >>> and on, this introduced no new failures on kvm-unit-tests or KVM selftests. > > >> > > >> Thanks, I only reported some technicalities in the ordering of loads > > >> (which matter since the loads happen with SRCU protection only). Apart > > >> from this, this looks fine! > > > > > > Awesome to hear, thank you for the reviews. Should I send a v3 > > > addressing those comments, or did you already make those changes when > > > applying to your tree? > > > > No, I didn't (I wanted some oversight, and this is 5.14 stuff anyway). > > Ah, okay I'll send out a v3 soon, discussion on the other patches settles. I'll look through v2 this afternoon, now that I've mostly dug myself out of RDPID hell.