From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9F8053858D38 for ; Mon, 11 Sep 2023 16:26:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F8053858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694449563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i0iVxfhde4YLoRX4wcW4Si82Ca6lyW26F1gY8MTH/QI=; b=biItGRQcvZ2SxnUk1gGMBB8uIaHqUDM4r6GoD9ay03JOe8VxSQPfVQQ5IkyYYgS+0e9tzX CZVaCBfWJKNPe8NVwjTPCsDOUYlWz0mLrU64/mS1RmZbHUpI8vKs6kRvTiMujANfaD91ZB C082Iiv7j0UVJIEiTL2aP1wNkCXKwTg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-151-0WMlrVP0ODOXZm4n7_pAPw-1; Mon, 11 Sep 2023 12:26:02 -0400 X-MC-Unique: 0WMlrVP0ODOXZm4n7_pAPw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A43C929ABA39; Mon, 11 Sep 2023 16:26:01 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F06344029; Mon, 11 Sep 2023 16:26:01 +0000 (UTC) From: Florian Weimer To: Noah Goldstein Cc: libc-alpha@sourceware.org Subject: Re: [PATCH 2/2] x86: Add generic CPUID data dumper to ld.so --list-diagnostics References: <4a77d6294e0023338a8115fad9a3d549c47cae87.1694203757.git.fweimer@redhat.com> <871qf549sa.fsf@oldenburg.str.redhat.com> Date: Mon, 11 Sep 2023 18:25:59 +0200 In-Reply-To: (Noah Goldstein's message of "Mon, 11 Sep 2023 11:16:33 -0500") Message-ID: <87il8gptgo.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Noah Goldstein: > On Sun, Sep 10, 2023 at 11:24=E2=80=AFPM Florian Weimer wrote: >> >> * Noah Goldstein: >> >> > On Fri, Sep 8, 2023 at 3:10=E2=80=AFPM Florian Weimer 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 inform= ation >> > 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 m= ore >> > 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. Thanks, Florian