Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp199727rwe; Fri, 26 Aug 2022 03:32:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4rnI9T/xlZ37gbPGn1UkpDIt1L5KMdCwnOxFF1CuzOEl1oDe2UwtbGnuV8QWzqRhERWv2M X-Received: by 2002:a17:906:8a77:b0:73d:deef:8f76 with SMTP id hy23-20020a1709068a7700b0073ddeef8f76mr2639291ejc.765.1661509938328; Fri, 26 Aug 2022 03:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661509938; cv=none; d=google.com; s=arc-20160816; b=kBweVAhf+jQ18sBFxb8rROJdZubFLPTLMc48nvTfIi9BYVZAMtwx6lp9VJUrdVZ1+u /eeBUx3DJf60erASMnpaNNYQkdPwbHfVrz4gKf1eHwDi4RIY1zhiYgkwEloPItbkvF9M cboU1AwwoSI1MB7npIgvd1CATu0SxdpapS4Sq5gW3Tiv90/+mevriMVpgCzJlUyPqije jUb65qaHMo4FOhSFxAm9HgLqwCSpmQ9XRG5kfUdNG/BBwsRtCmKBH//bMs2ZXe0sZSz0 46iwmRNSUqu2+9kwrnjwir9tST5nfV4W2OKBF/O9LNbH2Lwg5tqUmiObTVxygQQaYA8q 1B4A== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kLsMpZl6pKYr7WS0pD17GyZwc7LDBjeF1ao0OHp8dGw=; b=UZpCtH8w0E+ZV3c/lDTpXxNWLo9hw6EO7ZkiXnUof3V56R3IcTkAIyM3/G8P0jNLUS BTDLs8pGoE9RiqJcJ684btxa/jqJDkncDwuQ4eVFj8PKOrvIM1b/znbQqBdlukcePrOL qzx6Kf+sdHjYYGH61B8pvBmef0dgg9qrsAON5ZWiGRj95+aDqyhUbilaZo8M4g3CT2ZN ZpLAlvOoo3NgW+lcQNG63IkuSTcNoru+8Q7HlojLPMG6SxpU9inVn43TJssHHn90Mx8y coeI83YSBlIK3q4IK8VkvWXRD1tp3UG0iowvktKAEjq9NyibXXmniCp2HFLnGeVNci0O qWXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="G07r7/YH"; 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 b15-20020a056402084f00b004468ec0d67csi1198772edz.565.2022.08.26.03.31.48; Fri, 26 Aug 2022 03:32:18 -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="G07r7/YH"; 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 S245499AbiHZKOh (ORCPT + 99 others); Fri, 26 Aug 2022 06:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242826AbiHZKOf (ORCPT ); Fri, 26 Aug 2022 06:14:35 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42686AFAC1 for ; Fri, 26 Aug 2022 03:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661508873; 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=kLsMpZl6pKYr7WS0pD17GyZwc7LDBjeF1ao0OHp8dGw=; b=G07r7/YHW3nBIG60Qkk/Cht9OvqIIOu8yYodiEOBN1eH+ipr8w15bqqu0cWgxm9Twl8c8E KI1KUBm9lqZskzlYjdlv12gs8129OJRyutElffPMGfsFkTFJ/ZUOasLHoZah7ihKvKLhLR pgIbGSIPxwHPsA3mKIB0t1ElRLuPB58= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-654-1ufTwsxLMTSQiFb28-_sig-1; Fri, 26 Aug 2022 06:14:32 -0400 X-MC-Unique: 1ufTwsxLMTSQiFb28-_sig-1 Received: by mail-ed1-f69.google.com with SMTP id b13-20020a056402350d00b0043dfc84c533so856925edd.5 for ; Fri, 26 Aug 2022 03:14:32 -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:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=kLsMpZl6pKYr7WS0pD17GyZwc7LDBjeF1ao0OHp8dGw=; b=KsgOZRopBuhDDMOeQzbQ5AkBM8uGUrwQOul9pEO3UHDBPe1RxyjQdweXiW5Cb+QKfv +JbsVGf9cknBjOBdS1uyVb3tJdIKzUtjWWUT4CCK3bItCCIQ1V4smKK/nLPVMAyQRku1 1Vao44W5Z4zQZ4Icl5YC+ZvSmzFzee8kAIcNW1DMgAXg4kmQgl+135MFKIWUjdLVmXn5 Zh9X5GaZq43YYLuwBs1gyj5ItHs30rzGEHoll65UU7OkwLh66asgnTHlaAUdLhHkoT3C 5F46bpQaBLNdaTxkW+rKvTKY5WEKBqRpl08+3RChIShPqBpkj9Sl9wyxqLNnoiKcsSYT ztcQ== X-Gm-Message-State: ACgBeo2MDZ+MUqT9d+ZsGf/6wVOi4okbDgAmpLRLqUsroakuxRIe92fK qHq/kLiuqOuq8QWEsVUyma/WajJ/7JI7bXt28NTzugtsJVqZ7BBmU5xvx75Dn1MWuv1gB4EpUol BNj6HAAFfgzu+9IdXtxBR0eqF X-Received: by 2002:a05:6402:3596:b0:447:11ea:362d with SMTP id y22-20020a056402359600b0044711ea362dmr6348252edc.117.1661508871303; Fri, 26 Aug 2022 03:14:31 -0700 (PDT) X-Received: by 2002:a05:6402:3596:b0:447:11ea:362d with SMTP id y22-20020a056402359600b0044711ea362dmr6348242edc.117.1661508871105; Fri, 26 Aug 2022 03:14:31 -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 kw2-20020a170907770200b0073872f367cesm716150ejc.112.2022.08.26.03.14.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Aug 2022 03:14:30 -0700 (PDT) Message-ID: <7558c548-7866-9176-34a2-056f4a72a483@redhat.com> Date: Fri, 26 Aug 2022 12:14:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] KVM: x86: use TPAUSE to replace PAUSE in halt polling Content-Language: en-US To: "Mi, Dapeng1" , "Christopherson,, Sean" Cc: "rafael@kernel.org" , "daniel.lezcano@linaro.org" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "zhenyuw@linux.intel.com" References: <20220824091117.767363-1-dapeng1.mi@intel.com> From: Paolo Bonzini In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 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_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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/25/22 13:31, Mi, Dapeng1 wrote: >> I say "if", because I think this needs to come with performance numbers to show >> the impact on guest latency so that KVM and its users can make an informed >> decision. >> And if it's unlikely that anyone will ever want to enable TPAUSE for halt polling, >> then it's not worth the extra complexity in KVM. > I ever run two scheduling related benchmarks, hackbench and schbench, I didn't see there are obvious performance impact. > > Here are the hackbench and schbench data on Intel ADL platform. Can you confirm (using debugfs for example) that halt polling is used while hackbench is running, and not used while it is not running? In particular, I think you need to run the server and client on different VMs, for example using netperf's UDP_RR test. With hackbench the ping-pong is simply between two tasks on the same CPU, and the hypervisor is not exercised at all. Paolo