From: Sudeep Holla <sudeep.holla@arm.com>
To: Jim Quinlan <james.quinlan@broadcom.com>
Cc: linux-kernel@vger.kernel.org, rostedt@goodmis.org,
mingo@redhat.com, lukasz.luba@arm.com,
Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] include: trace: Add SCMI header with trace events
Date: Wed, 18 Dec 2019 12:09:00 +0000 [thread overview]
Message-ID: <20191218120900.GA28599@bogus> (raw)
In-Reply-To: <20191216161650.21844-1-lukasz.luba@arm.com>
On Mon, Dec 16, 2019 at 05:15:54PM -0500, Jim Quinlan wrote:
> From: Lukasz Luba <lukasz.luba@arm.com>
>
> +
> +TRACE_EVENT(scmi_xfer_begin,
> + TP_PROTO(u8 id, u8 protocol_id, u16 seq, bool poll),
> + TP_ARGS(id, protocol_id, seq, poll),
> +
> + TP_STRUCT__entry(
> + __field(u8, id)
> + __field(u8, protocol_id)
> + __field(u16, seq)
> + __field(bool, poll)
> + ),
> +
> + TP_fast_assign(
> + __entry->id = id;
> + __entry->protocol_id = protocol_id;
> + __entry->seq = seq;
> + __entry->poll = poll;
> + ),
> +
> + TP_printk("id=%u protocol_id=%u seq=%u poll=%u", __entry->id,
> + __entry->protocol_id, __entry->seq, __entry->poll)
> +);
> +
> +TRACE_EVENT(scmi_xfer_end,
> + TP_PROTO(u8 id, u8 protocol_id, u16 seq, u32 status),
> + TP_ARGS(id, protocol_id, seq, status),
> +
> + TP_STRUCT__entry(
> + __field(u8, id)
> + __field(u8, protocol_id)
> + __field(u16, seq)
> + __field(u32, status)
> + ),
> +
> + TP_fast_assign(
> + __entry->id = id;
> + __entry->protocol_id = protocol_id;
> + __entry->seq = seq;
> + __entry->status = status;
> + ),
> +
> + TP_printk("id=%u protocol_id=%u seq=%u status=%u", __entry->id,
> + __entry->protocol_id, __entry->seq, __entry->status)
> +);
>
> Hello,
>
> When there are multiple messages in the mbox queue, I've found it
> a chore matching up the 'begin' event with the 'end' event for each
> SCMI msg. The id (command) may not be unique, the proto_id may not be
> unique, and the seq may not be unique.
I agree on id and proto_id part easily and the seq may not be unique
if and only if the previous command has completed.
> The combination of the three may not be unique.
Not 100% sure on that. I remember one of the issue you reported where OS
times out and platform may still be processing it. That's one of the
case where seq id may get re-assigned, but now that's fixed and the
scenario may not happen. I am trying to understand why you think it
is not unique ?
> Would it make sense to assign a monotonically increasing ID to each
> msg so that one can easily match the two events for each msg?
I am not sure if we need to maintain a tracker/counter just for trace
purposes.
> This id could be the result of an atomic increment and
> could be stored in the xfer structure. Of course, it would be one of
> the values printed out in the events.
>
> Also, would you consider a third event, right after the
> scmi_fetch_response() invocation in scmi_rx_callback()? I've found
> this to be insightful in situations where we were debugging a timeout.
>
> I'm fine if you elect not to do the above; I just wanted to post
> this for your consideration.
>
I am interested in the scenario we can make use of this and also help
in testing it if we add this. I am not against it but I don't see the
need for it.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Sudeep Holla <sudeep.holla@arm.com>
To: Jim Quinlan <james.quinlan@broadcom.com>
Cc: lukasz.luba@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, mingo@redhat.com,
rostedt@goodmis.org, Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: [PATCH 1/2] include: trace: Add SCMI header with trace events
Date: Wed, 18 Dec 2019 12:09:00 +0000 [thread overview]
Message-ID: <20191218120900.GA28599@bogus> (raw)
In-Reply-To: <20191216161650.21844-1-lukasz.luba@arm.com>
On Mon, Dec 16, 2019 at 05:15:54PM -0500, Jim Quinlan wrote:
> From: Lukasz Luba <lukasz.luba@arm.com>
>
> +
> +TRACE_EVENT(scmi_xfer_begin,
> + TP_PROTO(u8 id, u8 protocol_id, u16 seq, bool poll),
> + TP_ARGS(id, protocol_id, seq, poll),
> +
> + TP_STRUCT__entry(
> + __field(u8, id)
> + __field(u8, protocol_id)
> + __field(u16, seq)
> + __field(bool, poll)
> + ),
> +
> + TP_fast_assign(
> + __entry->id = id;
> + __entry->protocol_id = protocol_id;
> + __entry->seq = seq;
> + __entry->poll = poll;
> + ),
> +
> + TP_printk("id=%u protocol_id=%u seq=%u poll=%u", __entry->id,
> + __entry->protocol_id, __entry->seq, __entry->poll)
> +);
> +
> +TRACE_EVENT(scmi_xfer_end,
> + TP_PROTO(u8 id, u8 protocol_id, u16 seq, u32 status),
> + TP_ARGS(id, protocol_id, seq, status),
> +
> + TP_STRUCT__entry(
> + __field(u8, id)
> + __field(u8, protocol_id)
> + __field(u16, seq)
> + __field(u32, status)
> + ),
> +
> + TP_fast_assign(
> + __entry->id = id;
> + __entry->protocol_id = protocol_id;
> + __entry->seq = seq;
> + __entry->status = status;
> + ),
> +
> + TP_printk("id=%u protocol_id=%u seq=%u status=%u", __entry->id,
> + __entry->protocol_id, __entry->seq, __entry->status)
> +);
>
> Hello,
>
> When there are multiple messages in the mbox queue, I've found it
> a chore matching up the 'begin' event with the 'end' event for each
> SCMI msg. The id (command) may not be unique, the proto_id may not be
> unique, and the seq may not be unique.
I agree on id and proto_id part easily and the seq may not be unique
if and only if the previous command has completed.
> The combination of the three may not be unique.
Not 100% sure on that. I remember one of the issue you reported where OS
times out and platform may still be processing it. That's one of the
case where seq id may get re-assigned, but now that's fixed and the
scenario may not happen. I am trying to understand why you think it
is not unique ?
> Would it make sense to assign a monotonically increasing ID to each
> msg so that one can easily match the two events for each msg?
I am not sure if we need to maintain a tracker/counter just for trace
purposes.
> This id could be the result of an atomic increment and
> could be stored in the xfer structure. Of course, it would be one of
> the values printed out in the events.
>
> Also, would you consider a third event, right after the
> scmi_fetch_response() invocation in scmi_rx_callback()? I've found
> this to be insightful in situations where we were debugging a timeout.
>
> I'm fine if you elect not to do the above; I just wanted to post
> this for your consideration.
>
I am interested in the scenario we can make use of this and also help
in testing it if we add this. I am not against it but I don't see the
need for it.
--
Regards,
Sudeep
next prev parent reply other threads:[~2019-12-18 12:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 16:16 [PATCH 1/2] include: trace: Add SCMI header with trace events lukasz.luba
2019-12-16 22:15 ` Jim Quinlan
2019-12-16 22:15 ` Jim Quinlan
2019-12-16 16:16 ` lukasz.luba
2019-12-16 16:16 ` [PATCH 2/2] drivers: firmware: scmi: Extend SCMI transport layer by " lukasz.luba
2019-12-16 16:16 ` lukasz.luba
2019-12-17 10:05 ` [PATCH 1/2] include: trace: Add SCMI header with " Lukasz Luba
2019-12-17 10:05 ` Lukasz Luba
2019-12-18 12:09 ` Sudeep Holla [this message]
2019-12-18 12:09 ` Sudeep Holla
2019-12-18 16:37 ` Jim Quinlan
2019-12-18 16:37 ` Jim Quinlan
2019-12-19 16:32 ` Jim Quinlan
2019-12-19 16:32 ` Jim Quinlan
2019-12-20 9:20 ` Lukasz Luba
2019-12-20 9:20 ` Lukasz Luba
2019-12-20 16:24 ` Jim Quinlan
2019-12-20 16:24 ` Jim Quinlan
2019-12-23 15:39 ` Lukasz Luba
2019-12-23 15:39 ` Lukasz Luba
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=20191218120900.GA28599@bogus \
--to=sudeep.holla@arm.com \
--cc=james.quinlan@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.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 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.