Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp246039pxb; Wed, 18 Nov 2020 03:31:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbS+VH0H2nM+NOwowGGdX8aXOgJkz4JGIUops08nyF0Dy/f+TkjkrNPlmCHjJt70XO+xYd X-Received: by 2002:a50:a6d0:: with SMTP id f16mr24591572edc.135.1605699113684; Wed, 18 Nov 2020 03:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605699113; cv=none; d=google.com; s=arc-20160816; b=emZq5sp7INtls8kebKN1oZv7IuMLIKlG4APUpQ1CbCYkpSZQ9enf4jguLQAAL6CGM+ vRykHP8f0xEL6KQl84wvc66BObSjc5z1DRH91zhIlt4KJNsP7L5wdzwOJYYBbmAZuyLO OAr1HmGgJTrmwbQuUNXY2z5CmFqL0Fdcfku3xV6NoIUepGJgtn+92kcwq/6ftWwK15wT 1uvlFcSjfIniBLPmEhGxTsHIzUMR6XVsPUKKmHKTSfLOkoSKB3YEf3UhkLNw5cADA+hC bKF35mnQE1itmgS5MUr5tzdlqONH7oELh6cBg5OHTNwt+EHvlz1SXS2/f39Q2pPkJ7+H Hu2w== 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=OgYajlOI1q6yag3exq5oVHdCfPZ2gQ2BbYRUSYh5t/E=; b=0b6WLwyry+/kTs1G9RBrg2dmoGs0Ze7ZLft+mz2GEmvR8JzclvRF82xXNZgBB7two/ cCEPyCsHpobcuC5gEo5N24kmNdLridpwP/MU2BQnOFarQZGXvIpoZ6H8HXCbGo6ZE7Jv +621/2OWWmtzQ69b2OwmOD2zK0F6uvlf7omWuqRbHAK2J+d9llHd/IXxcMWBK3X+lP6k uFhUA8jr4rTXqk7a1t1hTawLM+9sZQSxP3TsG9T/YaE/t3jZL7+aZOhUByfIqkqErMKe uWmF0mmT11yDZd/g1XiVhOgwVTI4u+eyzBKFGe5V2evj7cXt0JO62K4W6+W0mRIRfrqg FDrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=FEpJkJLW; 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 n15si18338712edy.106.2020.11.18.03.31.29; Wed, 18 Nov 2020 03:31:53 -0800 (PST) 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=FEpJkJLW; 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 S1727236AbgKRLaB (ORCPT + 99 others); Wed, 18 Nov 2020 06:30:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727116AbgKRLaB (ORCPT ); Wed, 18 Nov 2020 06:30:01 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ADA0C0613D4 for ; Wed, 18 Nov 2020 03:30:01 -0800 (PST) Received: from zn.tnic (p200300ec2f0caf00530924e6be7c3eae.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:af00:5309:24e6:be7c:3eae]) (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 2E5CC1EC04B9; Wed, 18 Nov 2020 12:29:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1605698999; 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=OgYajlOI1q6yag3exq5oVHdCfPZ2gQ2BbYRUSYh5t/E=; b=FEpJkJLW9XsNhJoekx42Od69miyIVAQrvlSnNEVyuuFZw6xpfg36/WpQXumksBhjpmWxBh 4yqDy4cFD+1pkKAYN8VZDKgvfi4BY+jQZ+b7+pffEK1YMNX+eJRm7iF9YlhCWrft3pYVCb BbBBkH3HF6xWYfOO1x2NDRq8xqr6V5Q= Date: Wed, 18 Nov 2020 12:29:52 +0100 From: Borislav Petkov To: Alexandre Chartre Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, thomas.lendacky@amd.com, jroedel@suse.de, konrad.wilk@oracle.com, jan.setjeeilers@oracle.com, junaids@google.com, oweisse@google.com, rppt@linux.vnet.ibm.com, graf@amazon.de, mgross@linux.intel.com, kuzuno@gmail.com, Mel Gorman Subject: Re: [RFC][PATCH v2 00/21] x86/pti: Defer CR3 switch to C code Message-ID: <20201118112952.GB7472@zn.tnic> References: <20201116144757.1920077-1-alexandre.chartre@oracle.com> <20201116201711.GE1131@zn.tnic> <44a88648-738a-4a4b-9c25-6b70000e037c@oracle.com> <20201117165539.GG5719@zn.tnic> <890f6b7e-a268-2257-edcb-5eacc7db3d8e@oracle.com> <20201117212608.GS5719@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 08:41:42AM +0100, Alexandre Chartre wrote: > Well, it looks like I wrongfully assume that KPTI was a well known performance > overhead since it was introduced (because it adds extra page-table switches), > but you are right I should be presenting my own numbers. Here's one recipe, courtesy of Mel: https://github.com/gormanm/mmtests " ./run-mmtests.sh --no-monitor --config configs/config-workload-poundsyscall test-default # reboot the machine with pti disabled ./run-mmtests.sh --no-monitor --config configs/config-workload-poundsyscall test-nopti poundsyscall just calls getppid() so it's a light-weight syscall and a proxy measure for syscall entry/exit costs. To do the actual compare cd work/log ../../compare-kernels.sh and see what gain there is from disabling pti. If you want to compare the other direction ../../compare-kernels.sh --baseline test-nopti --compare test-default If you get an error about BinarySearch (echo y;echo o conf prerequisites_policy follow;echo o conf commit)|cpan yes | cpan List::BinarySearch Only se the second line if you want to interactively confirm what cpan should download and install." I've CCed him should you have any questions. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette