linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lersek@redhat.com (Laszlo Ersek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/5] beautify EFI memmap logs
Date: Wed, 03 Sep 2014 15:24:49 +0200	[thread overview]
Message-ID: <540716A1.7040905@redhat.com> (raw)
In-Reply-To: <CAKv+Gu_Yk-q0gf+EHc3EYQ=obLT2nj6Kj6qPTk678ASFEW+ZFQ@mail.gmail.com>

On 09/03/14 15:01, Ard Biesheuvel wrote:
> On 3 September 2014 13:32, Laszlo Ersek <lersek@redhat.com> wrote:
>> changes in v2:
>> - explain with examples how the log's appearance changes, in patches 3-5
>>   [Ingo]
>>
>> v1 blurb:
>>
>>> It's a pain to analyze EFI memmap logs while debugging, especially to
>>> verify the memory types (an enum) and the memory attributes (a
>>> bitmap). This series renders those columns human-readable, and unifies
>>> their formatting between x86, ia64 and arm64.
>>
> 
> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> (on arm64 only)
> 
> +1 for aligning between architectures
> +1 for cleaning up the output to make it more readable
> 
> The only thing I am not entirely convinced about is printing all those
> memory attributes: is it really so interesting to know that region X
> /can/ be configured as writeback, write through, write combining etc
> etc, as most regions seem to support most attributes, yet it tells you
> nothing about what the kernel ends up doing with that information. In
> the arm64 case, for instance, all MEMORY_WB ranges are mapped
> writeback cached, and everything else is mapped uncached.

You don't need these attributes spelled out when you're not debugging.
In that case, either build without CONFIG_EFI_DEBUG (on x86 and ia64),
or don't pass uefi_debug=1 (on arm64).

When you're debugging however, you need every bit of info you can get.
For example, assume a tricky bug in exactly that part of the arm64 code
that you just described above. You'll be flip-flopping between the
kernel source and the original, pristine memory map dump. It's much
easier to ignore a few words / columns in the log (even: cut it out with
a script or interactively) than to read bitmaps in hex (or to decode
them in a script). I know because I grew to hate these hex-encoded
attributes and dec-encoded enum constants when I was developing S3 for
OVMF, and fighting the memmap.

A good analogue is ACPI debugging in the kernel. The ACPI subsystem
comes with a very elaborate heap of switches, facility bitmaps, log
levels, and so on. The end result is that it is faster to add printks to
your suspect location(s) in ACPI, rebuild, retest, repeat, than to learn
to use the acpi debug flags. (And I did the former when I was recently
fixing a bug in the RHEL-6 kernel, in the intersection of ACPI and EFI.)

So yes, I think that this detailed format is preferable.

Thanks,
Laszlo

  parent reply	other threads:[~2014-09-03 13:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 11:32 [PATCH v2 0/5] beautify EFI memmap logs Laszlo Ersek
2014-09-03 11:32 ` [PATCH v2 1/5] efi: add macro for EFI_MEMORY_UCE memory attribute Laszlo Ersek
2014-09-03 11:32 ` [PATCH v2 2/5] efi: introduce efi_md_typeattr_format() Laszlo Ersek
2014-09-03 11:32 ` [PATCH v2 3/5] x86: efi: format EFI memory type & attrs with efi_md_typeattr_format() Laszlo Ersek
2014-09-03 11:32 ` [PATCH v2 4/5] ia64: " Laszlo Ersek
2014-09-03 11:32 ` [PATCH v2 5/5] arm64: " Laszlo Ersek
2014-09-03 13:01 ` [PATCH v2 0/5] beautify EFI memmap logs Ard Biesheuvel
2014-09-03 13:18   ` Matt Fleming
2014-09-03 13:25     ` Laszlo Ersek
2014-09-03 13:24   ` Laszlo Ersek [this message]
2014-09-03 13:27     ` Ard Biesheuvel
2014-09-03 13:35 ` Matt Fleming

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=540716A1.7040905@redhat.com \
    --to=lersek@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).