From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Ciunas Bennett <ciunas@linux.ibm.com>, linux-s390@vger.kernel.org
Cc: frankja@linux.ibm.com, imbrenda@linux.ibm.com, david@kernel.org,
hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com,
svens@linux.ibm.com
Subject: Re: [PATCH v2 2/2] s390/kvm: Add tracepoint for DIAG 9c directed yield operations
Date: Fri, 24 Jul 2026 10:03:07 +0200 [thread overview]
Message-ID: <409ee2c5-d6d6-4d85-aedf-5645fa755680@linux.ibm.com> (raw)
In-Reply-To: <4780639c-c5f1-474d-b51c-df9126ee6a1c@linux.ibm.com>
Am 23.07.26 um 21:56 schrieb Ciunas Bennett:
>
>
> On 23/07/2026 16:28, Christian Borntraeger wrote:
>>
>
> [...]
>
>>> +TRACE_EVENT(kvm_s390_diag_9c,
>>> + TP_PROTO(VCPU_PROTO_COMMON, int target_vcpu, int target_cpu,
>>> + const char *result),
>>> + TP_ARGS(VCPU_ARGS_COMMON, target_vcpu, target_cpu, result),
>>> +
>>> + TP_STRUCT__entry(
>>> + VCPU_FIELD_COMMON
>>> + __field(int, target_vcpu)
>>> + __field(int, target_cpu)
>>> + __field(int, current_cpu)
>>> + __string(result, result)
>>> + ),
>>> +
>>> + TP_fast_assign(
>>> + VCPU_ASSIGN_COMMON
>>> + __entry->target_vcpu = target_vcpu;
>>> + __entry->target_cpu = target_cpu;
>>> + __entry->current_cpu = smp_processor_id();
>>> + __assign_str(result);
>>> + ),
>>> +
>>> + VCPU_TP_PRINTK(
>>> + "diag=9c vcpu=%d pcpu=%d target_vcpu=%d target_pcpu=%d result=%s",
>>> + __entry->id,
>> I think vcpu=%d re-prints __entry->id, which VCPU_TP_PRINTK() already emits as the line prefix; likewise current_cpu/pcpu=%d duplicates ftrace's built-in per-event CPU column.
>> Can you double check?
>
> Yes it is and I was aware that VCPU_TP_PRINTK already includes the vCPU ID
> in the prefix, but I kept it in the message for readability.
> Having all the relevant fields together in a single format string makes
> the output a bit easier to grep and follow visually I find.
> That said, if you'd prefer to keep it consistent with the other
> tracepoints, I'm happy to drop the duplicate vCPU field.
Yes, please drop.>
>>
>>> + __entry->current_cpu,
>>> + __entry->target_vcpu,
>>> + __entry->target_cpu,
>>> + __get_str(result))
>>
>> result is a dynamic __string of three fixed literals — an int plus __print_symbolic() (matching diagnose_codes style in the same file) would also allow splitting "ignored", which currently conflates four distinct causes despite the commit's diagnosability goal.
>> This is not trivial though, due to the VCPU_EVENT which also uses result. So maybe this is not that easy and feel free to ignore that.
>>
> I'm not against changing it to an int plus __print_symbolic() if you
> think that is worth doing?
> The hesitation is of course that VCPU_EVENT() cannot use __print_symbolic()
> directly, so this would also need a small helper to map the result code
> back to a string there. That means a bit more code for fairly limited
> value in this case.
> No issues to change it if you think it is worthwhile, but otherwise
> I'd prefer to keep the current version and avoid the extra helper.
Keep it as is.
Thank you for doing this.
next prev parent reply other threads:[~2026-07-24 8:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 13:16 [PATCH v2 0/2] Improve DIAG 9c observability Ciunas Bennett
2026-06-25 13:16 ` [PATCH v2 1/2] s390/kvm: Refactor __diag_time_slice_end_directed for single exit point Ciunas Bennett
2026-06-25 13:16 ` [PATCH v2 2/2] s390/kvm: Add tracepoint for DIAG 9c directed yield operations Ciunas Bennett
2026-07-23 15:28 ` Christian Borntraeger
2026-07-23 19:56 ` Ciunas Bennett
2026-07-24 6:58 ` Sven Schnelle
2026-07-24 8:03 ` Christian Borntraeger [this message]
2026-07-24 9:00 ` Ciunas Bennett
2026-07-24 9:57 ` Christian Borntraeger
2026-06-25 13:52 ` [PATCH v2 0/2] Improve DIAG 9c observability Mete Durlu
2026-06-25 16:02 ` Claudio Imbrenda
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=409ee2c5-d6d6-4d85-aedf-5645fa755680@linux.ibm.com \
--to=borntraeger@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=ciunas@linux.ibm.com \
--cc=david@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=svens@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.