From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1EAC0780091 for ; Fri, 1 Mar 2024 18:59:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=swW1mquLW4igF257VaQ/bWSCKx/OvmSoMjAU/WR9EyA=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1709319546; v=1; b=KHzlh1wbMo3Lp+ekwV7x8WH/uZ/UbaefDVfZ7QeI/C9xqq2HHPePc7Ft5ZAZSejaYzD7aR/1 rI8ndWnqVBAEYtnD7LrhIShzjfrJ8Wh0oowgu1cWuIPPxIhu2x85NMIxhJUAejtTZa3RwLJCnDu gdeTAJuOAVB5MXcst6nUvvP8= X-Received: by 127.0.0.2 with SMTP id Z0brYY7687511x1U6Z4ZNMCH; Fri, 01 Mar 2024 10:59:06 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.32090.1709319545956616281 for ; Fri, 01 Mar 2024 10:59:06 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-170-jvjYzhrMPFyKutSXy-jsKg-1; Fri, 01 Mar 2024 13:59:03 -0500 X-MC-Unique: jvjYzhrMPFyKutSXy-jsKg-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 29B80881C99; Fri, 1 Mar 2024 18:59:03 +0000 (UTC) X-Received: from [10.39.194.215] (unknown [10.39.194.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 065E02166B33; Fri, 1 Mar 2024 18:59:01 +0000 (UTC) Message-ID: <2106da15-f540-f663-6daa-d5dc53fe3c1c@redhat.com> Date: Fri, 1 Mar 2024 19:59:01 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v1] MdeModulePkg/Core/Pei: Improve the copy performance To: devel@edk2.groups.io, zhihao.li@intel.com Cc: Liming Gao , Michael Kubacki References: <20240301071147.519-1-zhihao.li@intel.com> From: "Laszlo Ersek" In-Reply-To: <20240301071147.519-1-zhihao.li@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: tqX7IyBcUwNl9tebnePMjBu1x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=KHzlh1wb; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 3/1/24 08:11, Li, Zhihao wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4697 >=20 > EvacuateTempRam function will copy the temporary memory context to the re= based > pages and the raw pages. Migrations of rebased PEIMs is from cache to mem= ory, > while raw PEIMs is from memory to memory. So the migrations of raw PEIMs > is slower than rebased PEIMs. Experimental data indicates that changing t= he source > address of raw PEIMs migration will improve performance by 35%. >=20 > Cc: Liming Gao > Signed-off-by: Zhihao Li > --- > MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg= /Core/Pei/Dispatcher/Dispatcher.c > index 4cd8c843cd..ca37bde482 100644 > --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c > +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c > @@ -1,7 +1,7 @@ > /** @file > EFI PEI Core dispatch services > =20 > -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
> (C) Copyright 2016 Hewlett Packard Enterprise Development LP
> SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @@ -1305,7 +1305,7 @@ EvacuateTempRam ( > ); > ASSERT_EFI_ERROR (Status); > RawDataFvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FvHeade= rAddress; > - CopyMem (RawDataFvHeader, MigratedFvHeader, (UINTN)FvHeader->FvL= ength); > + CopyMem (RawDataFvHeader, FvHeader, (UINTN)FvHeader->FvLength); > MigratedFvInfo.FvDataBase =3D (UINT32)(UINTN)RawDataFvHeader; > } > =20 Merged as 7 371940932d29 MdeModulePkg/Core/Pei: Improve the copy performance via . Laszlo -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116283): https://edk2.groups.io/g/devel/message/116283 Mute This Topic: https://groups.io/mt/104659917/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-