Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1143621pxb; Thu, 28 Jan 2021 09:00:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBQ88T7kbBuWUWbXl+4YWDO8U/nQOLR+piOqmyBX7IrzoAvcGnKPDjdDeYd/TBXxMtYibv X-Received: by 2002:a50:c34b:: with SMTP id q11mr499573edb.173.1611853243600; Thu, 28 Jan 2021 09:00:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611853243; cv=none; d=google.com; s=arc-20160816; b=vma5fxholMlMWH3IwigbBonh4snAI6E15a2w7MrvZ4Mg2vNzLfc+7fe9iodkj96wjo BcvEQG2KMgay/5SQ+IsyiqOFQGfd4ztHf7ooLNUeWowXWuTxSrPOSKYLkzch4rXnjv8H Cb78P05FFDn+sZm8pcmSxBNzj8kBe0nnb5KhqLIJ624UMuy9iIldI0OQITO/9Gw33rNj /QpQ3Id+cVPSun9vE8ukH5HX3daxzsiFu6ePVF3tkg3csr9cfSsJwgADbb/3+sqPehMA MYp52aj2Qht/ImwlDIu2K8nr2tyOKyq5F/5FzdbBqHfckrgoh6hyD4R8GjPDttfkMpYs PMLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=TqHTHtpr92THE4RjCQocs8iwlOpyElibdaaOo1NcySU=; b=ANAK8ssGEtC7ofYevllelt8L+61O9Y3rSAPXQpWKoMZ/jPmzuuqneMoQ0BQk+SvRJ0 cvuvAVrN5E9HGWXLKJ6Osrn3m4X7AKuxMJ4STOveZjhN/ISc+Z0IVNx6rDhF8XfCpPBK qCBd/UOeeySX1tsJ9MSjW7iokZ/pC+J8lR63jT0IpgQby/8h4hoXjjCzp80/Xjqs2ZvQ XPVLJQugUxyj4KqDGb93Ta++ES6uRjLs3zeD6de2CBDfF60EAlToTATg50sO/ddEbDwd x4/qkd0+ArdQihL5Awslh10N+Hq4FdU7PoGOheljVASsrX5bz2uizEaFmAoAwiPfUU71 RDRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=FKiel3XQ; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg1si3363977edb.46.2021.01.28.09.00.18; Thu, 28 Jan 2021 09:00:43 -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=@nvidia.com header.s=n1 header.b=FKiel3XQ; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232672AbhA1Q5Q (ORCPT + 99 others); Thu, 28 Jan 2021 11:57:16 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:11482 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbhA1Q4v (ORCPT ); Thu, 28 Jan 2021 11:56:51 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 28 Jan 2021 08:56:09 -0800 Received: from [10.2.82.52] (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 28 Jan 2021 16:56:07 +0000 From: Zi Yan To: Dave Hansen CC: Saravanan D , Xing Zhengjun , , , , , , , , , , , Subject: Re: [PATCH V5] x86/mm: Tracking linear mapping split events Date: Thu, 28 Jan 2021 11:56:05 -0500 X-Mailer: MailMate (1.14r5757) Message-ID: <33B5B608-4D74-4221-AB0F-AEEBA170AF84@nvidia.com> In-Reply-To: <15a29679-ea0b-d1c8-1a1f-698d3db35293@intel.com> References: <20210128045153.GW308988@casper.infradead.org> <20210128104934.2916679-1-saravanand@fb.com> <15a29679-ea0b-d1c8-1a1f-698d3db35293@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_D2AC2C86-6398-4A40-A664-B827FF98A4B6_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1611852969; bh=TqHTHtpr92THE4RjCQocs8iwlOpyElibdaaOo1NcySU=; h=From:To:CC:Subject:Date:X-Mailer:Message-ID:In-Reply-To: References:MIME-Version:Content-Type:X-Originating-IP: X-ClientProxiedBy; b=FKiel3XQq1Kxt1ppXI/o6tWHRIp75XA3+YvmTLCUha+QJtstNeqlSJ+i0FVjCEFg8 6RzA0bzztU1asF0ryVE4A14eRzGqEfNchfa3/gm7rxVaQK4tk8mGqiznHdMbkUsZtc 9pgKbwqdRBzy67qOFur45OqAvGzMdWLMSIPNkcfOqNT0lN24Og8RAU5eB7/CBrstX4 kyGTjtyA6g8p96TbXcKQksLAS5ocar3ce+qqbgCfGcuXOTGwkJ+KRc1iYgLq5m4PQP g4be4l92oaUB5dXlFKrLgzJAdheL38mw+aMSav5CeIEevIBL+wH3FpCNctyQK/MCYe FGykOccYJv+uw== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=_MailMate_D2AC2C86-6398-4A40-A664-B827FF98A4B6_= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 28 Jan 2021, at 11:41, Dave Hansen wrote: > On 1/28/21 8:33 AM, Zi Yan wrote: >>> One of the many lasting (as we don't coalesce back) sources for >>> huge page splits is tracing as the granular page >>> attribute/permission changes would force the kernel to split code >>> segments mapped to huge pages to smaller ones thereby increasing >>> the probability of TLB miss/reload even after tracing has been >>> stopped. >> It is interesting to see this statement saying splitting kernel >> direct mappings causes performance loss, when Zhengjun (cc=E2=80=99d) = from >> Intel recently posted a kernel direct mapping performance report[1] >> saying 1GB mappings are good but not much better than 2MB and 4KB >> mappings. > > No, that's not what the report said. > > *Overall*, there is no clear winner between 4k, 2M and 1G. In other > words, no one page size is best for *ALL* workloads. > > There were *ABSOLUTELY* individual workloads in those tests that saw > significant deltas between the direct map sizes. There are also > real-world workloads that feel the impact here. Yes, it is what I understand from the report. But this patch says =E2=80=9C Maintaining huge direct mapped pages greatly reduces TLB miss pressure. The splintering of huge direct pages into smaller ones does result in a measurable performance hit caused by frequent TLB miss and reloads. =E2=80=9D, indicating large mappings (2MB, 1GB) are generally better. It is different from what the report said, right? The above text could be improved to make sure readers get both sides of the story and not get afraid of performance loss after seeing a lot of direct_map_xxx_splits events. =E2=80=94 Best Regards, Yan Zi --=_MailMate_D2AC2C86-6398-4A40-A664-B827FF98A4B6_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAmAS7KUPHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqKYdMQAKBobb76q21Ixb/TD/fyvGsflD/C65TLw6Sq vEf2JEsBDBhZEJkY3/MeDeeNp6sCYM1qrF9bkvBjZRJN2gP/XF7W0biSY1V2DDYx q2aC6/i8Qo1K3MkEPbKCjx/hmM9Ap2vepsT7nZh58QsZyW830wpUlpOPsIPDziUX f66xKC4OsqSW1X1DcAj3R3Deb6eXwMX/naPAF3uu01KaW5zZYaLRSHi/nJ8bMR4c mx4eFShbKDpCAICr8KEY94PK7WlrJxV4K1kDSjE9ZMk4fkTPa+bqvxNj4fyc/05d vTfwqOXzQZZt1Uesiu4Cq/BoyosqhEhd2kkChFgkspTxBzGaRJ4eyGCmxROwaDWn Yp3JGqvgdozOw/EErB3Y1SSCmQZkuVszDj2+rsAPB2WhqyeH7o5+5RivGPTML6go FHP2UdXY5kcC8rxktoyTmgCkRfZPnD8EHOubdz9xqn+MddZNDCKpb1KpLZx7iDtW LbBbdemC0JdVl9k16LaO1724RzarfbAnoYo1kRXi+pRqBmaMZ2lqYjE8B7DGL4Lc qJxryKnlEnFbVpTX/M1TndhpvCWca67OeJNVioTcgIU/KEf/FfbnCtwQMB5WTcKj zOtC8EGQmW1e/uDxXhRSLrpy+UtsEz8mxQJJqxG2Q6SjL4CRNgsLm2r7mO132GHh GCz+1PqC =iChr -----END PGP SIGNATURE----- --=_MailMate_D2AC2C86-6398-4A40-A664-B827FF98A4B6_=--