Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3851892pxy; Tue, 4 May 2021 11:18:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuQgq20vuBYLRNLvbUreAHVZuZPNqlhOLx433uTA01Ghl7zGxp/SS8SBcy7+IWHCAg73Xx X-Received: by 2002:a17:90a:788b:: with SMTP id x11mr7013799pjk.20.1620152335065; Tue, 04 May 2021 11:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620152335; cv=none; d=google.com; s=arc-20160816; b=bgwX2AsotwjvltrpBv8mnN8UDAnen/kfF+8Ufd699dT7f1fj6Pac5vajcymX7f79Go 5xy1LP/Wee0c+H6vNUkPWV8QUx4fzWE58fJnQwsKuCCP+lDDHZAzzz82uZGRsyohyv4z gE4p3izO4IYCgadNQ8GN6L7O6G7vKdI1gmrga5kN4vg4bcOxrzDw48QK8itHhZOJWLru kQNS6Wfj8ONrmk+L2qmNTKPq5BrOOHsH5iAqCReiEvHRyCniVFlPQbF9S6J2XnM58hOE eWrEG6d3sT9t/ctFxwqgVMI13s6HmNuFvWL9zXP6usJYL4nwLYEOBzVdm23nXfX9p3E/ 9ZIQ== 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=14b7XgnhSuRkX7Ox309zfy7AdpkEzaYxX119We4gjnY=; b=Qxev8zYHpu3eHaB/g4HtTyYdZSc8YjLZ5uhSb6W22iJDveTaLBpFAyJGp3F2d8Pzun TEONRMlgm2kqJUzQDSo+ugHdiFqR0WtZ05peqx78iVNdk6M/Ti/7I4Z8jOHvB3skzR+1 pSpOceOf4kTSJa+IMQAenf4iaJuSt0iE9JAPSoQrU6phWYjggVwWASjgL65oFbLf5rwy /+MGVL/cmMsZOcHj61Lw4eVRX0nY37JmZEFGpp1Q3qwnYdrWuPqn/g6Azy535KpaTIqc 6rVyv3CQkd1LpxZPNLbfsV7Mh0XqpO8sxHr0FQ/kOBCkzZ0hSEE0fvy9hKVdy+8ZaR7s J9lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pLnD59w1; 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 x9si4878541pgp.386.2021.05.04.11.18.41; Tue, 04 May 2021 11:18:55 -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=20161025 header.b=pLnD59w1; 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 S232197AbhEDSSI (ORCPT + 99 others); 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-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.