Skip to contentSkip to conversation

sched: remove the redundant 'success' in the sched tracepoint

PATCH In review Ed Tsai 3 participants 7 messages Apr 22, 2021 – Apr 26, 2021 Tracing

lore
Share & tools
lore

Ed Tsai

author
#0 lore raw

PATCH 1/1 sched: remove the redundant 'success' in the sched tracepoint

'success' is left here for a long time and also it is meaningless for the upper user. Just remove it.

---
 include/trace/events/sched.h | 2 --
 1 file changed, 2 deletions(-)
include/trace/events/sched.h +0 -2
index cbe3e152d24c..720204539e0b 100644
@@ -148,7 +148,6 @@ DECLARE_EVENT_CLASS(sched_wakeup_template,
 		__array(	char,	comm,	TASK_COMM_LEN	)
 		__field(	pid_t,	pid			)
 		__field(	int,	prio			)
-		__field(	int,	success			)
 		__field(	int,	target_cpu		)
 	),
 
@@ -156,7 +155,6 @@ DECLARE_EVENT_CLASS(sched_wakeup_template,
 		memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
 		__entry->pid		= p->pid;
 		__entry->prio		= p->prio; /* XXX SCHED_DEADLINE */
-		__entry->success	= 1; /* rudiment, kill when possible */
 		__entry->target_cpu	= task_cpu(p);
 	),
 
Signature · 1 line
2.18.0
maintainer
#1 lore raw
Quoted 2 lines · On Thu, 22 Apr 2021 20:22:26 +0800 Ed Tsai <[email protected]> wrote:

'success' is left here for a long time and also it is meaningless for the upper user. Just remove it.

Have you tested all userspace code that might use this?

This is the "poster boy" example of why Peter Zijlstra hates trace events ;-)

I know I've updated trace-cmd to check to see if this field exits before depending on it, but there may be some other tools that may not. Perhaps nothing will break.

I'm all for this change, but be ware, it might be reverted if there's some tool out that that expects it to exist. This is why it hasn't been removed.

-- Steve

author
#2 lore raw
Quoted 17 lines · Steven Rostedt
Quoted 2 lines · On Thu, 22 Apr 2021 20:22:26 +0800 Ed Tsai <[email protected]> wrote:

'success' is left here for a long time and also it is meaningless for the upper user. Just remove it.

Have you tested all userspace code that might use this?

This is the "poster boy" example of why Peter Zijlstra hates trace events ;-)

I know I've updated trace-cmd to check to see if this field exits before
depending on it, but there may be some other tools that may not. Perhaps
nothing will break.

Quoted 6 lines

I'm all for this change, but be ware, it might be reverted if there's some
tool out that that expects it to exist. This is why it hasn't been removed.

-- Steve

It is left here over 5 years. Old userspace code need this entry and also someone may use it for a new tool. I hate this but it is a problem should be resolved for the kernel or ignore just fine.

maintainer
#3 lore raw
Quoted 23 lines · On Fri, 23 Apr 2021 08:38:22 +0800 Ed Tsai <[email protected]> wrote:
Quoted 22 lines · Steven Rostedt
Quoted 2 lines · On Thu, 22 Apr 2021 20:22:26 +0800 Ed Tsai <[email protected]> wrote:

'success' is left here for a long time and also it is meaningless for the upper user. Just remove it.

Have you tested all userspace code that might use this?

This is the "poster boy" example of why Peter Zijlstra hates trace events ;-)

I know I've updated trace-cmd to check to see if this field exits before
depending on it, but there may be some other tools that may not. Perhaps
nothing will break.

I'm all for this change, but be ware, it might be reverted if there's some
tool out that that expects it to exist. This is why it hasn't been removed.

Quoted 6 lines
Quoted 1 line

-- Steve

It is left here over 5 years. Old userspace code need this entry and also someone may use it for a new tool. I hate this but it is a problem should be resolved for the kernel or ignore just fine.

I'm willing to take this, with a note that if anyone complains, it may be reverted. But as it goes with Linus's rule about breaking user space. If you break user space, and nobody notices, you didn't really break it!

-- Steve

author
#4 lore raw
Quoted 39 lines · Steven Rostedt
Quoted 27 lines · On Fri, 23 Apr 2021 08:38:22 +0800 Ed Tsai <[email protected]> wrote:
Quoted 26 lines · Steven Rostedt
Quoted 3 lines · On Thu, 22 Apr 2021 20:22:26 +0800 Ed Tsai <[email protected]> wrote:

'success' is left here for a long time and also it is meaningless
for the upper user. Just remove it.

Have you tested all userspace code that might use this?

This is the "poster boy" example of why Peter Zijlstra hates trace
events ;-)

I know I've updated trace-cmd to check to see if this field exits before
depending on it, but there may be some other tools that may not. Perhaps
nothing will break.

I'm all for this change, but be ware, it might be reverted if there's
some
tool out that that expects it to exist. This is why it hasn't been
removed.

Quoted 8 lines
Quoted 1 line

-- Steve

It is left here over 5 years. Old userspace code need this entry and
also someone may use it for a new tool. I hate this but it is a problem
should be resolved for the kernel or ignore just fine.

Quoted 9 lines

I'm willing to take this, with a note that if anyone complains, it may
be reverted. But as it goes with Linus's rule about breaking user space. If you break user space, and nobody notices, you didn't really break it!

-- Steve

Thx Steve, this change work fine to me on the trace-cmd and systrace. It's a simple patch to clean code. Revert it if break user experience.

maintainer
#5 lore raw
Quoted 2 lines · On Mon, 26 Apr 2021 14:18:31 +0800 Ed Tsai <[email protected]> wrote:

Thx Steve, this change work fine to me on the trace-cmd and systrace. It's a simple patch to clean code. Revert it if break user experience.

I'll take it for the next merge window. I don't want to introduce a possible regression during the current merge window.

-- Steve

#6 lore raw
In reply to Steven Rostedt
Quoted 33 lines · Steven Rostedt
Quoted 23 lines · On Fri, 23 Apr 2021 08:38:22 +0800 Ed Tsai <[email protected]> wrote:
Quoted 22 lines · Steven Rostedt
Quoted 2 lines · On Thu, 22 Apr 2021 20:22:26 +0800 Ed Tsai <[email protected]> wrote:

'success' is left here for a long time and also it is meaningless for the upper user. Just remove it.

Have you tested all userspace code that might use this?

This is the "poster boy" example of why Peter Zijlstra hates trace events ;-)

I know I've updated trace-cmd to check to see if this field exits before
depending on it, but there may be some other tools that may not. Perhaps
nothing will break.

I'm all for this change, but be ware, it might be reverted if there's some
tool out that that expects it to exist. This is why it hasn't been removed.

Quoted 6 lines
Quoted 1 line

-- Steve

It is left here over 5 years. Old userspace code need this entry and also someone may use it for a new tool. I hate this but it is a problem should be resolved for the kernel or ignore just fine.

Quoted 4 lines

I'm willing to take this, with a note that if anyone complains, it may be reverted. But as it goes with Linus's rule about breaking user space. If you break user space, and nobody notices, you didn't really break it!

LatencyTop was I think the offender at the time, but I can't really remember. Anyway, glad to be rid of it, if we get away with it that is ;-)