Skip to content

(Was: Q: tracing: can we change trace_signal_generate() signature?)

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tracing: let trace_signal_generate() report more info, kill overflow_fail/lose_infoinclude/trace/events/signal.h kernel/signal.c+36 -713 replies
1/2tracing: let trace_signal_generate() report more info, kill overflow_fail/lose_infoinclude/trace/events/signal.h kernel/signal.c+36 -710 replies
2/2tracing: send_sigqueue() needs trace_signal_generate() tookernel/signal.c+5 -11 reply
2/2tracing: send_sigqueue() needs trace_signal_generate() tookernel/signal.c+5 -10 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSeiji AguchiSteven Rostedt
SeriesA-b
1/2R-b R-b A-b
1/2R-b R-b A-b
2/2R-b R-b A-b
2/2R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] (Was: Q: tracing: can we change trace_signal_generate() signature?)
Quoted 11 lines · Steven Rostedt
Quoted 4 lines · Oleg Nesterov

Heh. How can I do this? The only thing I can do is: send the patch to the maintainer - you ;)

OK. I'll send the patch "officially" tomorrow, let's see who nacks it.

I only maintain the tracing infrastructure. The tracepoint users are maintained by the subsystem they are used in. Who's the signal maintainer? ;)

You are trolling me ;)

Quoted 20 lines
Quoted 20 lines
Quoted 19 lines
Quoted 6 lines
(quoted diff) +0 -2
@@ -1095,14 +1106,15 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
 			 * signal was rt and sent by user using something
 			 * other than kill().
 			 */
-			trace_signal_overflow_fail(sig, group, info);
-			return -EAGAIN;

Review static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, · line 1117

Quoted 10 lines
(quoted diff) +4 -1
+			result = TRACE_SIGNAL_OVERFLOW_FAIL;
+			ret = -EAGAIN;
+			goto ret;
 		} else {
 			/*
 			 * This is a silent loss of information.  We still
 			 * send the signal, but the *info bits are lost.
 			 */
-			trace_signal_lose_info(sig, group, info);
+			result = TRACE_SIGNAL_LOSE_INFO;

Hmm, all this result manipulation added for tracing that doesn't occur in 99.99% of all machines?

Quoted 7 lines
Quoted 1 line

Not sure I understand...

Is "result" used for anything but tracepoints? When tracing is disabled, the tracepoints should be just nops (when jump_label is enabled). Thus tracing is very light. But if we are constantly calculating "result", this is unused by those that don't use the tracing infrastructure, which is 99.99% of all users. This is what I meant.

Ah I see. I thought you dislike OVERFLOW_FAIL/LOSE_INFO namely.

Of course, you are right. OTOH, this patch shaves 1058 bytes from .text. And without CONFIG_TRACE* gcc doesn't generate the extra code.

Oh. I simply do not know what can I do. Obviously, I'd like to avoid the new tracepoints in __send_signal(), imho this would be ugly. But the users want more info.

OK. let me send the patch at least for review. May be someone will nack it authoritatively, in this case I can relax and forward the nack back to bugzilla ;)

However, at least 2/2 looks very reasonable to me. In fact it looks almost like the bug-fix.

Oleg.