public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message
@ 2018-08-29  3:21 Jian J Wang
  2018-08-29  3:27 ` Dong, Eric
  2018-08-29 13:53 ` Laszlo Ersek
  0 siblings, 2 replies; 4+ messages in thread
From: Jian J Wang @ 2018-08-29  3:21 UTC (permalink / raw)
  To: edk2-devel; +Cc: Eric Dong, Laszlo Ersek

It's reported the debug message in CpuDxe driver is quite annoying in
boot and shell, and slow down the boot process. To solve this issue,
this patch changes the DEBUG_INFO to DEBUG_VERBOSE. On a typical Intel
real platform, at least 16s boot time can be saved.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
---
 UefiCpuPkg/CpuDxe/CpuDxe.c       | 2 +-
 UefiCpuPkg/CpuDxe/CpuPageTable.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
index cfd4c415ae..76661cbcd9 100644
--- a/UefiCpuPkg/CpuDxe/CpuDxe.c
+++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
@@ -404,7 +404,7 @@ CpuSetMemoryAttributes (
   // to avoid unnecessary computing.
   //
   if (mIsFlushingGCD) {
-    DEBUG((DEBUG_INFO, "  Flushing GCD\n"));
+    DEBUG((DEBUG_VERBOSE, "  Flushing GCD\n"));
     return EFI_SUCCESS;
   }
 
diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c
index df021798c0..609df58e3a 100644
--- a/UefiCpuPkg/CpuDxe/CpuPageTable.c
+++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c
@@ -528,7 +528,7 @@ SplitPage (
     ASSERT (SplitAttribute == Page4K);
     if (SplitAttribute == Page4K) {
       NewPageEntry = AllocatePagesFunc (1);
-      DEBUG ((DEBUG_INFO, "Split - 0x%x\n", NewPageEntry));
+      DEBUG ((DEBUG_VERBOSE, "Split - 0x%x\n", NewPageEntry));
       if (NewPageEntry == NULL) {
         return RETURN_OUT_OF_RESOURCES;
       }
@@ -549,7 +549,7 @@ SplitPage (
     ASSERT (SplitAttribute == Page2M || SplitAttribute == Page4K);
     if ((SplitAttribute == Page2M || SplitAttribute == Page4K)) {
       NewPageEntry = AllocatePagesFunc (1);
-      DEBUG ((DEBUG_INFO, "Split - 0x%x\n", NewPageEntry));
+      DEBUG ((DEBUG_VERBOSE, "Split - 0x%x\n", NewPageEntry));
       if (NewPageEntry == NULL) {
         return RETURN_OUT_OF_RESOURCES;
       }
-- 
2.16.2.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message
  2018-08-29  3:21 [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message Jian J Wang
@ 2018-08-29  3:27 ` Dong, Eric
  2018-08-29 13:53 ` Laszlo Ersek
  1 sibling, 0 replies; 4+ messages in thread
From: Dong, Eric @ 2018-08-29  3:27 UTC (permalink / raw)
  To: Wang, Jian J, edk2-devel@lists.01.org; +Cc: Laszlo Ersek

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: Wang, Jian J
> Sent: Wednesday, August 29, 2018 11:22 AM
> To: edk2-devel@lists.01.org
> Cc: Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message
> 
> It's reported the debug message in CpuDxe driver is quite annoying in boot
> and shell, and slow down the boot process. To solve this issue, this patch
> changes the DEBUG_INFO to DEBUG_VERBOSE. On a typical Intel real
> platform, at least 16s boot time can be saved.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> ---
>  UefiCpuPkg/CpuDxe/CpuDxe.c       | 2 +-
>  UefiCpuPkg/CpuDxe/CpuPageTable.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
> index cfd4c415ae..76661cbcd9 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.c
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
> @@ -404,7 +404,7 @@ CpuSetMemoryAttributes (
>    // to avoid unnecessary computing.
>    //
>    if (mIsFlushingGCD) {
> -    DEBUG((DEBUG_INFO, "  Flushing GCD\n"));
> +    DEBUG((DEBUG_VERBOSE, "  Flushing GCD\n"));
>      return EFI_SUCCESS;
>    }
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c
> b/UefiCpuPkg/CpuDxe/CpuPageTable.c
> index df021798c0..609df58e3a 100644
> --- a/UefiCpuPkg/CpuDxe/CpuPageTable.c
> +++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c
> @@ -528,7 +528,7 @@ SplitPage (
>      ASSERT (SplitAttribute == Page4K);
>      if (SplitAttribute == Page4K) {
>        NewPageEntry = AllocatePagesFunc (1);
> -      DEBUG ((DEBUG_INFO, "Split - 0x%x\n", NewPageEntry));
> +      DEBUG ((DEBUG_VERBOSE, "Split - 0x%x\n", NewPageEntry));
>        if (NewPageEntry == NULL) {
>          return RETURN_OUT_OF_RESOURCES;
>        }
> @@ -549,7 +549,7 @@ SplitPage (
>      ASSERT (SplitAttribute == Page2M || SplitAttribute == Page4K);
>      if ((SplitAttribute == Page2M || SplitAttribute == Page4K)) {
>        NewPageEntry = AllocatePagesFunc (1);
> -      DEBUG ((DEBUG_INFO, "Split - 0x%x\n", NewPageEntry));
> +      DEBUG ((DEBUG_VERBOSE, "Split - 0x%x\n", NewPageEntry));
>        if (NewPageEntry == NULL) {
>          return RETURN_OUT_OF_RESOURCES;
>        }
> --
> 2.16.2.windows.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message
  2018-08-29  3:21 [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message Jian J Wang
  2018-08-29  3:27 ` Dong, Eric
@ 2018-08-29 13:53 ` Laszlo Ersek
  2018-08-29 22:36   ` Wang, Jian J
  1 sibling, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2018-08-29 13:53 UTC (permalink / raw)
  To: Jian J Wang, edk2-devel; +Cc: Eric Dong

On 08/29/18 05:21, Jian J Wang wrote:
> It's reported the debug message in CpuDxe driver is quite annoying in
> boot and shell, and slow down the boot process. To solve this issue,
> this patch changes the DEBUG_INFO to DEBUG_VERBOSE. On a typical Intel
> real platform, at least 16s boot time can be saved.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> ---
>  UefiCpuPkg/CpuDxe/CpuDxe.c       | 2 +-
>  UefiCpuPkg/CpuDxe/CpuPageTable.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
> index cfd4c415ae..76661cbcd9 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.c
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
> @@ -404,7 +404,7 @@ CpuSetMemoryAttributes (
>    // to avoid unnecessary computing.
>    //
>    if (mIsFlushingGCD) {
> -    DEBUG((DEBUG_INFO, "  Flushing GCD\n"));
> +    DEBUG((DEBUG_VERBOSE, "  Flushing GCD\n"));
>      return EFI_SUCCESS;
>    }
>  
> diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c
> index df021798c0..609df58e3a 100644
> --- a/UefiCpuPkg/CpuDxe/CpuPageTable.c
> +++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c
> @@ -528,7 +528,7 @@ SplitPage (
>      ASSERT (SplitAttribute == Page4K);
>      if (SplitAttribute == Page4K) {
>        NewPageEntry = AllocatePagesFunc (1);
> -      DEBUG ((DEBUG_INFO, "Split - 0x%x\n", NewPageEntry));
> +      DEBUG ((DEBUG_VERBOSE, "Split - 0x%x\n", NewPageEntry));
>        if (NewPageEntry == NULL) {
>          return RETURN_OUT_OF_RESOURCES;
>        }
> @@ -549,7 +549,7 @@ SplitPage (
>      ASSERT (SplitAttribute == Page2M || SplitAttribute == Page4K);
>      if ((SplitAttribute == Page2M || SplitAttribute == Page4K)) {
>        NewPageEntry = AllocatePagesFunc (1);
> -      DEBUG ((DEBUG_INFO, "Split - 0x%x\n", NewPageEntry));
> +      DEBUG ((DEBUG_VERBOSE, "Split - 0x%x\n", NewPageEntry));
>        if (NewPageEntry == NULL) {
>          return RETURN_OUT_OF_RESOURCES;
>        }
> 

Before you push this patch, please add a reference to

  https://bugzilla.tianocore.org/show_bug.cgi?id=1127

in the commit message.

With that:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message
  2018-08-29 13:53 ` Laszlo Ersek
@ 2018-08-29 22:36   ` Wang, Jian J
  0 siblings, 0 replies; 4+ messages in thread
From: Wang, Jian J @ 2018-08-29 22:36 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel@lists.01.org; +Cc: Dong, Eric

Laszlo,

Thanks for the comment. I’ll add the info.

Regards,
Jian

From: Laszlo Ersek [mailto:lersek@redhat.com]
Sent: Wednesday, August 29, 2018 9:54 PM
To: Wang, Jian J <jian.j.wang@intel.com>; edk2-devel@lists.01.org
Cc: Dong, Eric <eric.dong@intel.com>
Subject: Re: [edk2] [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message

On 08/29/18 05:21, Jian J Wang wrote:
> It's reported the debug message in CpuDxe driver is quite annoying in
> boot and shell, and slow down the boot process. To solve this issue,
> this patch changes the DEBUG_INFO to DEBUG_VERBOSE. On a typical Intel
> real platform, at least 16s boot time can be saved.
>
> Cc: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>
> Cc: Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>
> ---
>  UefiCpuPkg/CpuDxe/CpuDxe.c       | 2 +-
>  UefiCpuPkg/CpuDxe/CpuPageTable.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
> index cfd4c415ae..76661cbcd9 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.c
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
> @@ -404,7 +404,7 @@ CpuSetMemoryAttributes (
>    // to avoid unnecessary computing.
>    //
>    if (mIsFlushingGCD) {
> -    DEBUG((DEBUG_INFO, "  Flushing GCD\n"));
> +    DEBUG((DEBUG_VERBOSE, "  Flushing GCD\n"));
>      return EFI_SUCCESS;
>    }
>
> diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c
> index df021798c0..609df58e3a 100644
> --- a/UefiCpuPkg/CpuDxe/CpuPageTable.c
> +++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c
> @@ -528,7 +528,7 @@ SplitPage (
>      ASSERT (SplitAttribute == Page4K);
>      if (SplitAttribute == Page4K) {
>        NewPageEntry = AllocatePagesFunc (1);
> -      DEBUG ((DEBUG_INFO, "Split - 0x%x\n", NewPageEntry));
> +      DEBUG ((DEBUG_VERBOSE, "Split - 0x%x\n", NewPageEntry));
>        if (NewPageEntry == NULL) {
>          return RETURN_OUT_OF_RESOURCES;
>        }
> @@ -549,7 +549,7 @@ SplitPage (
>      ASSERT (SplitAttribute == Page2M || SplitAttribute == Page4K);
>      if ((SplitAttribute == Page2M || SplitAttribute == Page4K)) {
>        NewPageEntry = AllocatePagesFunc (1);
> -      DEBUG ((DEBUG_INFO, "Split - 0x%x\n", NewPageEntry));
> +      DEBUG ((DEBUG_VERBOSE, "Split - 0x%x\n", NewPageEntry));
>        if (NewPageEntry == NULL) {
>          return RETURN_OUT_OF_RESOURCES;
>        }
>

Before you push this patch, please add a reference to

  https://bugzilla.tianocore.org/show_bug.cgi?id=1127

in the commit message.

With that:

Reviewed-by: Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>>

Thanks
Laszlo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-29 22:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-29  3:21 [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message Jian J Wang
2018-08-29  3:27 ` Dong, Eric
2018-08-29 13:53 ` Laszlo Ersek
2018-08-29 22:36   ` Wang, Jian J

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox