public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Noah Goldstein <goldstein.w.n@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 2/2] x86: Add generic CPUID data dumper to ld.so --list-diagnostics
Date: Mon, 11 Sep 2023 11:28:54 -0500	[thread overview]
Message-ID: <CAFUsyfKyS3FA=m-dRY3o3d=oPc-e5=9zPDrCM72ou=4K4uk91Q@mail.gmail.com> (raw)
In-Reply-To: <87il8gptgo.fsf@oldenburg.str.redhat.com>

On Mon, Sep 11, 2023 at 11:26 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Noah Goldstein:
>
> > On Sun, Sep 10, 2023 at 11:24 PM Florian Weimer <fweimer@redhat.com> wrote:
> >>
> >> * Noah Goldstein:
> >>
> >> > On Fri, Sep 8, 2023 at 3:10 PM Florian Weimer <fweimer@redhat.com> wrote:
> >> >>
> >> >> This is surprisingly difficult to implement if the goal is to produce
> >> >> reasonably sized output.  With the current approaches to output
> >> >> compression (suppressing zeros and repeated results between CPUs,
> >> >> folding ranges of identical subleaves, dealing with the %ecx
> >> >> reflection issue), the output is less than 600 KiB even for systems
> >> >> with 256 threads.
> >> >>
> >> > Maybe should just output a complete json?
> >>
> >> JSON cannot directly represent 64-bit integers, so it would need some
> >> custom transformation for other parts of the --list-diagnostics output.
> >>
> >> > Then users can pretty easily write scripts to extract the exact information
> >> > they are after. Or or the dumper can be extended in the future to let
> >> > the user specify fields/values to dump so it can be configured to be more
> >> > reasonable?
> >>
> >> I'm not sure what is unreasonable about the current implementation?  I
> >> complained about how hard it is getting the data and distilling it into
> >> something that is not a gigantic data blob.
> >>
> >> To be clear, without only trivial zero-values suppression, brute-force
> >> enumeration (cutting off at 512 subleaves) results in roughly 8 KiB of
> >> raw data per *CPU*.  It's even larger for recent CPUs which have more of
> >> the funny ECX behavior (where unsupported subleaves do not come back as
> >> zero).
> >
> > Maybe I misunderstand but the commit message is saying a 256 core system
> > dumps 600KB?
>
> For all CPUs, after hex encoding.  So that's more like 1,000 bytes of
> data per CPU (and the 8 KiB number was just an estimate, for two ECX
> runaways, if you have more of those the number grows quickly).
>
> > If so, that seems like a lot for a person to just grok hence why I'd
> > favor a standardized format.
>
> Sure, this calls out for automated processing.  We have Python parsing
> code in the testsuite, which could be repurposed.
>
> > If JSON isn't really feasible for technical reasons, however, so be it.
>
> There is that 53 bit problem, and we'd still have to use string keys for
> the objects.

We can't find meaningful names for the information? If not do we even
want to dump it?

Although I'm probably trivializing the problem, a quick glance at:
https://github.com/google/cpu_features
and there json dump skips everything but feature flags.
>
> Thanks,
> Florian
>

  reply	other threads:[~2023-09-11 16:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 20:09 [PATCH 1/2] elf: Wire up _dl_diagnostics_cpu_kernel Florian Weimer
2023-09-08 20:10 ` [PATCH 2/2] x86: Add generic CPUID data dumper to ld.so --list-diagnostics Florian Weimer
2023-09-10 19:56   ` Noah Goldstein
2023-09-11  4:24     ` Florian Weimer
2023-09-11 16:16       ` Noah Goldstein
2023-09-11 16:25         ` Florian Weimer
2023-09-11 16:28           ` Noah Goldstein [this message]
2023-09-11 16:31             ` Noah Goldstein
2023-09-11 17:48             ` Florian Weimer
2023-09-11 18:35               ` Noah Goldstein
2023-09-11 16:08   ` Adhemerval Zanella Netto
2023-09-11 16:19     ` Florian Weimer
2023-09-11 16:41       ` Adhemerval Zanella Netto
2024-02-09 19:08 [PATCH 0/2] Enhanced x86 CPU diagnostics Florian Weimer
2024-02-09 19:08 ` [PATCH 2/2] x86: Add generic CPUID data dumper to ld.so --list-diagnostics Florian Weimer
2024-02-09 19:34   ` H.J. Lu
2024-02-10  0:44     ` H.J. Lu

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='CAFUsyfKyS3FA=m-dRY3o3d=oPc-e5=9zPDrCM72ou=4K4uk91Q@mail.gmail.com' \
    --to=goldstein.w.n@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).