All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
To: Prarit Bhargava <prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lszubowi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	Matt Fleming
	<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] x86, efi: print debug values in Kib not MB
Date: Wed, 30 Jul 2014 00:29:32 +0200	[thread overview]
Message-ID: <20140729222932.GA17481@pd.tnic> (raw)
In-Reply-To: <1406653761-3884-1-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Tue, Jul 29, 2014 at 01:09:21PM -0400, Prarit Bhargava wrote:
> The current debug print in EFI does
> 
> [    0.000000] efi: mem84: type=3, attr=0xf, range=[0x00000000645b5000-0x00000000645fb000) (0MB)
> 
> and rounds off the size to 0MB and isn't very useful.  We should print this in
> Kib.  After applying this patch we get better info with
> 
> [    0.000000] efi: mem84: type=3, attr=0xf, range=[0x00000000645b5000-0x00000000645fb000) (280kiB)

Turning this into kiB unconditionally won't always work ok:

First of all, there might be something which parses that output so I'd
make sure I'm not breaking that. Maybe fwts... Matt will know.

Then, I have an UEFI region which is > 13G:

[    0.000000] efi: mem42: type=7, attr=0xf, range=[0x0000000100000000-0x0000000450000000) (13568MB)


With your patch it is even worse:

[    0.000000] efi: mem42: type=7, attr=0xf, range=[0x0000000100000000-0x0000000450000000) (13893632kiB)


I'd guess you'll have to go all out and do this properly. :-)

Something like showing the highest unit which is still > 1. In the above
case, this should be (13GB) or maybe even introduce fractions.

Depends on how involved this output should be.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

WARNING: multiple messages have this Message-ID (diff)
From: Borislav Petkov <bp@alien8.de>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org, lszubowi@redhat.com,
	Matt Fleming <matt.fleming@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-efi@vger.kernel.org
Subject: Re: [PATCH] x86, efi: print debug values in Kib not MB
Date: Wed, 30 Jul 2014 00:29:32 +0200	[thread overview]
Message-ID: <20140729222932.GA17481@pd.tnic> (raw)
In-Reply-To: <1406653761-3884-1-git-send-email-prarit@redhat.com>

On Tue, Jul 29, 2014 at 01:09:21PM -0400, Prarit Bhargava wrote:
> The current debug print in EFI does
> 
> [    0.000000] efi: mem84: type=3, attr=0xf, range=[0x00000000645b5000-0x00000000645fb000) (0MB)
> 
> and rounds off the size to 0MB and isn't very useful.  We should print this in
> Kib.  After applying this patch we get better info with
> 
> [    0.000000] efi: mem84: type=3, attr=0xf, range=[0x00000000645b5000-0x00000000645fb000) (280kiB)

Turning this into kiB unconditionally won't always work ok:

First of all, there might be something which parses that output so I'd
make sure I'm not breaking that. Maybe fwts... Matt will know.

Then, I have an UEFI region which is > 13G:

[    0.000000] efi: mem42: type=7, attr=0xf, range=[0x0000000100000000-0x0000000450000000) (13568MB)


With your patch it is even worse:

[    0.000000] efi: mem42: type=7, attr=0xf, range=[0x0000000100000000-0x0000000450000000) (13893632kiB)


I'd guess you'll have to go all out and do this properly. :-)

Something like showing the highest unit which is still > 1. In the above
case, this should be (13GB) or maybe even introduce fractions.

Depends on how involved this output should be.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

  parent reply	other threads:[~2014-07-29 22:29 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29 17:09 [PATCH] x86, efi: print debug values in Kib not MB Prarit Bhargava
2014-07-29 17:09 ` Prarit Bhargava
     [not found] ` <1406653761-3884-1-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-07-29 20:29   ` David Rientjes
2014-07-29 20:29     ` David Rientjes
2014-07-29 22:02     ` Joe Perches
2014-07-29 22:05       ` Prarit Bhargava
2014-07-29 22:05         ` Prarit Bhargava
     [not found]     ` <alpine.DEB.2.02.1407291327450.13073-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2014-07-29 22:05       ` Prarit Bhargava
2014-07-29 22:05         ` Prarit Bhargava
2014-07-29 22:29   ` Borislav Petkov [this message]
2014-07-29 22:29     ` Borislav Petkov
     [not found]     ` <20140729222932.GA17481-fF5Pk5pvG8Y@public.gmane.org>
2014-07-29 22:32       ` Prarit Bhargava
2014-07-29 22:32         ` Prarit Bhargava
     [not found]         ` <53D82118.6090202-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-07-29 22:36           ` Borislav Petkov
2014-07-29 22:36             ` Borislav Petkov
     [not found]             ` <20140729223603.GC17241-fF5Pk5pvG8Y@public.gmane.org>
2014-07-29 22:42               ` David Rientjes
2014-07-29 22:42                 ` David Rientjes
2014-07-29 23:01                 ` Borislav Petkov
     [not found]                   ` <20140729230102.GD17241-fF5Pk5pvG8Y@public.gmane.org>
2014-07-29 23:03                     ` Prarit Bhargava
2014-07-29 23:03                       ` Prarit Bhargava
     [not found]                 ` <alpine.DEB.2.02.1407291541480.20991-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2014-07-29 23:07                   ` Joe Perches
2014-07-29 23:07                     ` Joe Perches
2014-07-29 23:44                     ` David Rientjes
2014-07-29 23:44                       ` David Rientjes
2014-07-29 22:54               ` Prarit Bhargava
2014-07-29 22:54                 ` Prarit Bhargava
     [not found]                 ` <53D82623.4080903-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-07-30  3:25                   ` Steven Noonan
2014-07-30  3:25                     ` Steven Noonan
2014-07-30 14:48       ` Matt Fleming
2014-07-30 14:48         ` Matt Fleming
     [not found]         ` <20140730144803.GB15082-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-30 15:05           ` Colin Ian King
2014-07-30 15:05             ` Colin Ian King
     [not found]             ` <53D909C3.9050205-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-07-30 17:04               ` Prarit Bhargava
2014-07-30 17:04                 ` Prarit Bhargava
2014-07-30 17:10                 ` Randy Dunlap
     [not found]                   ` <53D92700.3040803-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-07-30 17:21                     ` H. Peter Anvin
2014-07-30 17:21                       ` H. Peter Anvin
     [not found]                       ` <53D92996.1050906-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2014-07-30 19:58                         ` Borislav Petkov
2014-07-30 19:58                           ` Borislav Petkov
2014-07-30 20:43                           ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140729222932.GA17481@pd.tnic \
    --to=bp-gina5biwoiwzqb+pc5nmwq@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lszubowi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.