Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2657115imn; Tue, 2 Aug 2022 10:59:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR4EDJ7WPCuw8OwsAgitzHxHbNoH4+3mEtGhMuqp2VDHarwMZ8G4sq7PepNn5BnXt6XtDCjE X-Received: by 2002:a17:90b:1bc6:b0:1f5:313a:de4b with SMTP id oa6-20020a17090b1bc600b001f5313ade4bmr696141pjb.4.1659463154365; Tue, 02 Aug 2022 10:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659463154; cv=none; d=google.com; s=arc-20160816; b=JW9geITxIBqfVKv7r3tQ1b2FB6WOYwh3JXYeOtn1WKksWyJzkAZVbRsj5B4ZmTmGKs hqz+HNLZvLFl+oP7+TVwHxxn6xFufarqIy6TVbGBi1KlgRon4JZfwHWGHWC4G5P+w6gD zcxwO931VU7hFpW5avj9opXAmEHOZQwDz9xGu5JTVhBhKl6As1juu+5FYBwt3zqxw9QG 5LTR2B3OcA+2vv33JqBCFDbTZgfnpST7OrWjmTgMvjHdMvyCGAUr08KMD1/emR6h7MKo dK2cFRMYxJWyFgxBv/3NjRvQsZtahmQoEh15Dk7dAWgKyrQdID1qUVlrSm3VBA2Pr9F1 74Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=9SK7bFw/0R7/hTM55OR2c83JALu5NeuiKS9q8ZWkjFk=; b=zs40JztLfu6l0/QedEeXK7+n6yWWBN8efZYfd7zmrvZg7mLPUt5I+IEvbfUUVM9U5P 4x4xFByvve02wLEfH6R12Kebfj9xfMgnmmDONrNaPN0ASjCQxqzIYUY4wOTP+h9RUJN+ o3eJr/qbIi2TGc0w7oMlnZceM0O8JS8EttaWSSQyyJrz8uPPjEDvIR/iVCIH8R96qiWU iaR5TVV3CkzgAn5a0fqhUjzgz3M3YdwlYzUzQdbhgF+x6P1T5NXr5bdzNYgQYgA2lZTC obGXsFGAt1ae4QiGHgZsnQPQgmLca7FAhIHft2KYC2D9JeD++/hAO4IQc3iZtM0AJ6EZ Qu+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W+39XnN8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a17090302c500b0016a71a4d774si16363340plk.257.2022.08.02.10.59.00; Tue, 02 Aug 2022 10:59:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W+39XnN8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233551AbiHBRnA (ORCPT + 99 others); Tue, 2 Aug 2022 13:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233661AbiHBRm4 (ORCPT ); Tue, 2 Aug 2022 13:42:56 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5E05C4D17B for ; Tue, 2 Aug 2022 10:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659462174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9SK7bFw/0R7/hTM55OR2c83JALu5NeuiKS9q8ZWkjFk=; b=W+39XnN8KdD5LpmWa9r2t4tdEwyYsq9SNOxF7/wyhTRuck22bzd1vgSEoDO2JzYgaFVzbx z6ZMGuHalIhTf9C4eTS2GtVsJ0AqfPm6OaYuMQG8+H38Fn9k2Eq9kxa5dt6+c1Z7LO4/ER Ta4IqfKhNYSKl9srDsG5fTAe3e8hLOc= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-359-d1N3iltMN1iGaekgqWq16A-1; Tue, 02 Aug 2022 13:42:53 -0400 X-MC-Unique: d1N3iltMN1iGaekgqWq16A-1 Received: by mail-wr1-f72.google.com with SMTP id w17-20020adfbad1000000b0021f0acd5398so3583055wrg.1 for ; Tue, 02 Aug 2022 10:42:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=9SK7bFw/0R7/hTM55OR2c83JALu5NeuiKS9q8ZWkjFk=; b=pntrjVYj1U8jXRYn7to59h6RHt6jojRfqxAs1EbfKjtp+ldmP+8QBh7j+IPHmiK9cz i+MAcoY9+aUEeyJesmT2Vf5ccZn4DNSRF5daWDBxV4k1u+aDCssasSUiW6k1tKjTVC2m 25Ngi4yUzWOQE/77XlsvFyTCxWXQ1NHsEjyMZbB7T/ndNBn7kvwjsPHB/G+DvRcxpalh dSSugCULs8O62SYme0cLr0di2K86vRUM+drO6n8vcPm6BWWK9DtVFpO2GgEPIBs+cl32 5XgaIFIF/IUutNbEnpZtu5z3397w4Ku+jGoFt7sqMsjrTaonoCDvP+0b5b1TTNEysn0c GfAg== X-Gm-Message-State: ACgBeo1cZ3wGIFWrLE84GFFq9FG7W/Q2F4jehcH10Il2XxS1t5CGWwcR eRrNIh/fd00OPZUeRU6ht4IxII3ORNhzAw9aq/XaV2su7Hz3SQuZNWtKkJ8OCpI8fkZ4LKv3bEz VozT8IuOGNGRlKNrAX2qF4d13 X-Received: by 2002:a1c:f718:0:b0:3a3:2416:634d with SMTP id v24-20020a1cf718000000b003a32416634dmr352843wmh.83.1659462172005; Tue, 02 Aug 2022 10:42:52 -0700 (PDT) X-Received: by 2002:a1c:f718:0:b0:3a3:2416:634d with SMTP id v24-20020a1cf718000000b003a32416634dmr352835wmh.83.1659462171743; Tue, 02 Aug 2022 10:42:51 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id a1-20020adfe5c1000000b0021e491fd250sm9673171wrn.89.2022.08.02.10.42.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Aug 2022 10:42:51 -0700 (PDT) Message-ID: <4ccbafb5-9157-ec73-c751-ec71164f8688@redhat.com> Date: Tue, 2 Aug 2022 19:42:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: Sean Christopherson , David Matlack Cc: Vipin Sharma , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220801151928.270380-1-vipinsh@google.com> From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86/mmu: Make page tables for eager page splitting NUMA aware In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/2/22 19:22, Sean Christopherson wrote: > Userspace can already force the ideal setup for eager page splitting by configuring > vNUMA-aware memslots and using a task with appropriate policy to toggle dirty > logging. And userspace really should be encouraged to do that, because otherwise > walking the page tables in software to do the split is going to be constantly > accessing remote memory. Yes, it's possible to locate the page tables on the node that holds the memory they're mapping by enable dirty logging from different tasks for different memslots, but that seems a bit weird. Walking the page tables in software is going to do several remote memory accesses, but it will do that in a thread that probably is devoted to background tasks anyway. The relative impact of remote memory accesses in the thread that enables dirty logging vs. in the vCPU thread should also be visible in the overall performance of dirty_log_perf_test. So I agree with Vipin's patch and would even extend it to all page table allocations, however dirty_log_perf_test should be run with fixed CPU mappings to measure accurately the impact of the remote memory accesses. Paolo