RE: [PATCH 14/14] x86/efi: Print size in binary units in efi_print_memmap

From: Elliott, Robert (Persistent Memory)
Date: Wed Feb 03 2016 - 10:25:54 EST



> -----Original Message-----
> From: Matt Fleming [mailto:matt@xxxxxxxxxxxxxxxxxxx]
> Sent: Wednesday, February 3, 2016 5:28 AM
> To: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Laszlo Ersek <lersek@xxxxxxxxxx>; H . Peter Anvin <hpa@xxxxxxxxx>;
> Thomas Gleixner <tglx@xxxxxxxxxxxxx>; linux-efi@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Elliott, Robert (Persistent Memory)
> <elliott@xxxxxxx>; Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>;
> Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>; Taku Izumi
> <izumi.taku@xxxxxxxxxxxxxx>; Linus Torvalds <torvalds@linux-
> foundation.org>; Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Subject: Re: [PATCH 14/14] x86/efi: Print size in binary units in
> efi_print_memmap
...
> OK, this patch has caused enough headaches. Let's drop it from this
> series.
>
> Robert, Andy, feel free to resubmit it after you've addressed
> everyone's concerns and we can discuss it in isolation.

We could just delete the size print altogether - better to print
nothing than a silently rounded number. The end address already
communicates the size - it's just not as readable.

The e820 table prints don't bother with a size print.

That would also shorten these extremely wide prints to 116
characters (131 if printk time is enabled).

[ 0.000000] BIOS-e820: [mem 0x0000001880000000-0x000000207fffffff] reserved
vs.
[ 0.000000] efi: mem62: [Reserved | | |NV| | | | | |WB|WT|WC|UC] range=[0x0000001880000000-0x000000207fffffff] (32 GiB)

---
Robert Elliott, HPE Persistent Memory