[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240219112926.77ac16f8@gandalf.local.home>
Date: Mon, 19 Feb 2024 11:29:26 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: wenyang.linux@...mail.com, Masami Hiramatsu <mhiramat@...nel.org>, Ingo
Molnar <mingo@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Mel Gorman <mgorman@...hsingularity.net>,
Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] coredump debugging: add a tracepoint to report the
coredumping
On Sat, 17 Feb 2024 11:49:24 +0100
Oleg Nesterov <oleg@...hat.com> wrote:
> On 02/17, wenyang.linux@...mail.com wrote:
> >
> > From: Wen Yang <wenyang.linux@...mail.com>
> >
> > Currently coredump_task_exit() takes some time to wait for the generation
> > of the dump file. But if the user-space wants to receive a notification
> > as soon as possible it maybe inconvenient.
> >
> > Add the new trace_sched_process_coredump() into coredump_task_exit(),
> > this way a user-space monitor could easily wait for the exits and
> > potentially make some preparations in advance.
>
> Can't comment, I never know when the new tracepoint will make sense.
>
> Stupid question. Can we simply shift trace_sched_process_exit() up
> before coredump_task_exit() ?
Reading the rest of the thread and looking at the code, we do have this:
void __noreturn do_exit(long code)
{
struct task_struct *tsk = current;
int group_dead;
[...]
acct_collect(code, group_dead);
if (group_dead)
tty_audit_exit();
audit_free(tsk);
tsk->exit_code = code;
taskstats_exit(tsk, group_dead);
exit_mm();
if (group_dead)
acct_process();
trace_sched_process_exit(tsk);
There's a lot that happens before we trigger the above event. I could
imagine that there are users expecting those actions to have taken place by
the time the event triggered. Like the "exit_mm()" call, as well as many
others.
I would be leery of moving that tracepoint.
-- Steve
Powered by blists - more mailing lists