Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2966723pxb; Mon, 18 Oct 2021 05:45:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIb3XTS1CKreeKxrfW1PqelvD+Tfhgaggc3d7BF6emfvdroT/wRzK8kaaxyLkyBsQzvcdl X-Received: by 2002:a63:f356:: with SMTP id t22mr23485892pgj.18.1634561111618; Mon, 18 Oct 2021 05:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634561111; cv=none; d=google.com; s=arc-20160816; b=GRw6VnRpZ84SP2FTD+uaRm6qm8ejLnZY4dOyvVnUfy1BMelKaA44aNiuWAzfY4bena Fz5uLaD+dgXATOa5QeD2PbjbB7GgSn6Ru+9x4gAVkgPyF6aNKOl2YxWXww4yKvYY47p8 24TJmOvTcl1HMhZBrUvtTCKeNXxzZiMtlmty4dDPOhP5kpE94Z0uCaLuHzKhOsXybxYg 3duC7AKfVf4LUJV7DHlpC1brA6rw0j6FzOiEPvRoMJJvBYtONfSJ4ikkDjrEdmSLk3EO SaqBnqIH2MAZ1C6UFitcnU6/BqJwIye0XfOIuwSe5GJorTTjdSaZWHVgoitpH6bioo2k cPwg== 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=66LoAyEmq4McZJ8nnAu/1jkmuEQpLnHOiHL/1PZ5rBs=; b=cHGCl5KbfMIvqXodipPr3wcxbNZitjXQHn+CkrkjIrVG+osYojNTGvd7F6vEd8z97V Vr2lxzK6FF0bS5IzNERPtPSNnDsfKHTrzwndZOOXjsXLW5Tce94AhItlND30cUpmqpzO bV8YkHa4WIhrmwEaC8sWE/Jt4T7xZEPr7gkqKZPQqh6ot5HjNmqFmBbnCpRMOYeAAOmq EcKyeYGEH+ks972/Wa62VJNAS/Pab/shgz0fiuL6C4uFNMMzq2alBBPDs0tFMTnNx8XD bA3DW1vrFkxwyjGdpgHNZC0esOWBe/qGa84H8gab0tyHwodHcyOMEE+Jhqf5QBZehODJ Uwpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=dM3MuMjJ; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si18302105pjk.36.2021.10.18.05.44.56; Mon, 18 Oct 2021 05:45:11 -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=@alien8.de header.s=dkim header.b=dM3MuMjJ; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbhJRMqE (ORCPT + 99 others); Mon, 18 Oct 2021 08:46:04 -0400 Received: from mail.skyhub.de ([5.9.137.197]:60732 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhJRMqE (ORCPT ); Mon, 18 Oct 2021 08:46:04 -0400 Received: from zn.tnic (p200300ec2f0857009e2a46238f1e0c2c.dip0.t-ipconnect.de [IPv6:2003:ec:2f08:5700:9e2a:4623:8f1e:c2c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B68FA1EC01DF; Mon, 18 Oct 2021 14:43:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1634561031; 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:in-reply-to:in-reply-to: references:references; bh=66LoAyEmq4McZJ8nnAu/1jkmuEQpLnHOiHL/1PZ5rBs=; b=dM3MuMjJxvSlptImN6DDpo3wQrrj8vHzMW9uxb5DBeJb734OW5PqfSnKpJ9yK68DlKRnW4 KHkuFPZQUH+qBxfw4T4w1IXNZr5xN1BBqZHMSVtAdYVAm125i3579eq60ORUZDmi9Ur+7C aUw4wFWZRcRfTWCcGdbliWZcSQWV5W4= Date: Mon, 18 Oct 2021 14:43:55 +0200 From: Borislav Petkov To: JY Ni Cc: Luming Yu , wujinhua , x86 , "zelin.deng" , ak , "luming.yu" , "fan.du" , "artie.ding" , "tony.luck" , tglx , linux-kernel , "pawan.kumar.gupta" , "fenghua.yu" , hpa , "ricardo.neri-calderon" , peterz Subject: Re: =?utf-8?B?5Zue5aSN77yaW1BBVENIXSBwZXJm?= =?utf-8?Q?=3A_optimiz?= =?utf-8?Q?e?= clear page in Intel specified model with movq instruction Message-ID: References: <1631177151-53723-1-git-send-email-wujinhua@linux.alibaba.com> <1cac1499-6b00-3c18-b64c-a22f269a2706@linux.alibaba.com> <7b07f141-12f5-397d-9e45-1d507cacae84@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7b07f141-12f5-397d-9e45-1d507cacae84@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 18, 2021 at 03:43:46PM +0800, JY Ni wrote: > _*Precondition:*__*do tests on a Intel CPX server.*_ CPU information of my > test machine is in backup part._* My machine: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 106 stepping : 4 That's a SKYLAKE_X. I ran ./tools/perf/perf stat --repeat 5 --sync --pre=/root/bin/pre-build-kernel.sh -- make -s -j96 bzImage on -rc6, building allmodconfig each of the 10 times. pre-build-kernel.sh is --- #!/bin/bash make -s clean echo 3 > /proc/sys/vm/drop_caches --- Results are below but to me that's all "in the noise" with around one percent if I can trust the stddev. Which is not even close to 40%. So basically you're wasting your time. 5.15-rc6 -------- # ./tools/perf/perf stat --repeat 5 --sync --pre=/root/bin/pre-build-kernel.sh -- make -s -j96 bzImage Performance counter stats for 'make -s -j96 bzImage' (5 runs): 3,072,392.92 msec task-clock # 51.109 CPUs utilized ( +- 0.05% ) 1,351,534 context-switches # 440.257 /sec ( +- 0.99% ) 224,862 cpu-migrations # 73.248 /sec ( +- 1.39% ) 85,073,723 page-faults # 27.712 K/sec ( +- 0.01% ) 8,743,357,421,495 cycles # 2.848 GHz ( +- 0.06% ) 7,643,946,991,468 instructions # 0.88 insn per cycle ( +- 0.00% ) 1,705,128,638,240 branches # 555.440 M/sec ( +- 0.00% ) 37,637,576,027 branch-misses # 2.21% of all branches ( +- 0.03% ) 22,511,903,971,150 slots # 7.333 G/sec ( +- 0.03% ) 7,377,211,958,188 topdown-retiring # 32.5% retiring ( +- 0.02% ) 3,145,247,374,138 topdown-bad-spec # 13.9% bad speculation ( +- 0.27% ) 8,018,664,899,041 topdown-fe-bound # 35.2% frontend bound ( +- 0.07% ) 4,167,103,609,622 topdown-be-bound # 18.3% backend bound ( +- 0.09% ) 60.114 +- 0.112 seconds time elapsed ( +- 0.19% ) 5.15-rc6 + patch ---------------- Performance counter stats for 'make -s -j96 bzImage' (5 runs): 3,033,250.65 msec task-clock # 51.243 CPUs utilized ( +- 0.05% ) 1,329,033 context-switches # 438.210 /sec ( +- 0.64% ) 225,550 cpu-migrations # 74.369 /sec ( +- 1.36% ) 85,080,938 page-faults # 28.053 K/sec ( +- 0.00% ) 8,629,663,367,477 cycles # 2.845 GHz ( +- 0.05% ) 7,696,237,813,803 instructions # 0.89 insn per cycle ( +- 0.00% ) 1,709,909,494,107 branches # 563.793 M/sec ( +- 0.00% ) 37,719,552,337 branch-misses # 2.21% of all branches ( +- 0.02% ) 22,214,249,023,820 slots # 7.325 G/sec ( +- 0.06% ) 7,412,342,725,008 topdown-retiring # 33.0% retiring ( +- 0.01% ) 3,141,090,408,028 topdown-bad-spec # 14.1% bad speculation ( +- 0.17% ) 7,996,077,873,517 topdown-fe-bound # 35.6% frontend bound ( +- 0.03% ) 3,862,154,886,962 topdown-be-bound # 17.3% backend bound ( +- 0.28% ) 59.193 +- 0.302 seconds time elapsed ( +- 0.51% ) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette