Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Harrison <john.c.harrison@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	Julia Filipchuk <julia.filipchuk@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v3 1/1] drm/xe/guc: Fix GuC log/ct output via debugfs
Date: Wed, 8 Jan 2025 12:14:49 -0800	[thread overview]
Message-ID: <ef3c1576-74bf-4fbf-be8b-9ff8d24cc24f@intel.com> (raw)
In-Reply-To: <3god5fzcfbzxwlssqdb6eenzedqkykv2scpktlk5uglgf2ro73@bjuq2knwuweh>

On 1/7/2025 13:10, Lucas De Marchi wrote:
> On Tue, Jan 07, 2025 at 12:22:52PM -0800, Julia Filipchuk wrote:
>> Change to disable asci85 GuC logging only when output to devcoredump
>> (was temporarily disabled for all code paths).
>>
>> v2: Ignore only for devcoredump case (not dmesg output).
>> v3: Rebase to resolve parent tag mismatch.
>>
>> Signed-off-by: Julia Filipchuk <julia.filipchuk@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_devcoredump.c | 8 +++++---
>> include/drm/drm_print.h             | 2 ++
>> 2 files changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c 
>> b/drivers/gpu/drm/xe/xe_devcoredump.c
>> index 6980304c8903..8e5d1f9866a7 100644
>> --- a/drivers/gpu/drm/xe/xe_devcoredump.c
>> +++ b/drivers/gpu/drm/xe/xe_devcoredump.c
>> @@ -424,10 +424,12 @@ void xe_print_blob_ascii85(struct drm_printer 
>> *p, const char *prefix,
>>      * Splitting blobs across multiple lines is not compatible with 
>> the mesa
>>      * debug decoder tool. Note that even dropping the explicit '\n' 
>> below
>>      * doesn't help because the GuC log is so big some underlying 
>> implementation
>> -     * still splits the lines at 512K characters. So just bail 
>> completely for
>> -     * the moment.
>> +     * still splits the lines at 512K characters.
>
> did we investigate where this is done and how we can overcome it? I
Yes. And the comment could be updated as part of this patch to make it 
clearer...


      * Splitting blobs across multiple lines is not compatible with the 
mesa
      * debug decoder tool. Note that even dropping the explicit line 
wrapping
      * below doesn't help because the GuC log can be so big it needs to 
be split
      * into multiple 2MB chunks, each of which must be printed 
individually and
      * therefore will be a separate line.

The dump helper could be updated to never add any line feeds, not even 
at the end. And then the burden would be on the callers to add line 
feeds as appropriate. That seems extremely messy, though. And it will 
break the dmesg output facility. That does need the line wrapping at 
~800 characters which can't be done from outside the helper.

>
> understand having to split it into multiple calls, but not something
> adding a \n. particularly for the functions dealing with seq_file and
> devcoredump.
>
>> +     *
>> +     * Only disable from devcoredump output.
>>      */
>> -    return;
>> +    if (p->coredump)
>
> but we do want the guc log to be inside the devcoredump, so rather than
> adding more workarounds, can we fix it ?
The simplest fix is your suggestion of adding an extra white space 
character at the end of the line in the helper function and updating the 
mesa tool to support multi-line output. That seems like it should be a 
trivial update to the mesa tool and it keeps the KMD side simple and 
consistent across all potential output methods. But Jose seemed 
absolutely dead set against any updates to the mesa tool at all :(.

The more complex fix is Joonas' idea of using an official structured 
output format of some sort - TOML, YAML, JSON or whatever. Something 
that ideally supports binary data and compression natively and has a 
helper library that can be included in the kernel source tree. That will 
then remove any and all confusion over interpretation of the file 
forever more. But it would require updating all userland tools to use 
the appropriate helper library.

John.

>
> Lucas De Marchi


  reply	other threads:[~2025-01-08 20:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 20:22 [PATCH v3 1/1] drm/xe/guc: Fix GuC log/ct output via debugfs Julia Filipchuk
2025-01-07 20:57 ` ✓ CI.Patch_applied: success for series starting with [v3,1/1] " Patchwork
2025-01-07 20:58 ` ✓ CI.checkpatch: " Patchwork
2025-01-07 20:59 ` ✓ CI.KUnit: " Patchwork
2025-01-07 21:10 ` [PATCH v3 1/1] " Lucas De Marchi
2025-01-08 20:14   ` John Harrison [this message]
2025-01-08 22:11     ` Lucas De Marchi
2025-01-08 23:59       ` John Harrison
2025-01-09 15:39         ` Lucas De Marchi
2025-01-09 20:40           ` John Harrison
2025-01-09 22:43             ` Lucas De Marchi
2025-01-22 16:45               ` John Harrison
2025-01-22 16:59                 ` Souza, Jose
2025-01-22 18:29                   ` Souza, Jose
2025-01-22 21:09                     ` John Harrison
2025-01-23 14:02                       ` Souza, Jose
2025-01-23 14:21                         ` Lucas De Marchi
2025-01-07 21:25 ` ✓ CI.Build: success for series starting with [v3,1/1] " Patchwork
2025-01-07 21:28 ` ✓ CI.Hooks: " Patchwork
2025-01-07 21:30 ` ✓ CI.checksparse: " Patchwork
2025-01-07 21:55 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-09 10:47 ` ✗ Xe.CI.Full: failure " Patchwork

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=ef3c1576-74bf-4fbf-be8b-9ff8d24cc24f@intel.com \
    --to=john.c.harrison@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=julia.filipchuk@intel.com \
    --cc=lucas.demarchi@intel.com \
    /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