mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wen Yang <wenyang.linux@foxmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>, Oleg Nesterov <oleg@redhat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] exit: move trace_sched_process_exit earlier in do_exit()
Date: Sat, 23 Mar 2024 23:30:24 +0800	[thread overview]
Message-ID: <tencent_2A5F9506756CD0DC2443BA00339BDFCF3306@qq.com> (raw)
In-Reply-To: <20240319145718.2bfb0d526ff441c8b37eab09@linux-foundation.org>



On 2024/3/20 05:57, Andrew Morton wrote:
> On Sun, 10 Mar 2024 13:25:29 +0800 wenyang.linux@foxmail.com wrote:
> 
>> From: Wen Yang <wenyang.linux@foxmail.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.
> 
> If userspace is awaiting this notification to say "it's now OK to read
> the dump file" then it could break things?
> 

Thanks for your comments.

This could also be achieved in the nearby proc_exit_connector().

In addition, this issue has been discussed in detail in the following link:
https://lkml.org/lkml/2024/2/23/1018


>> Move trace_sched_process_exit() earlier in do_exit().
>> This way a user-space monitor could detect the exits and
>> potentially make some preparations in advance.
>>
>> Oleg initially proposed this suggestion, and Steven further provided some
>> detailed suggestions, and Mathieu carefully checked the historical code
>> and said:
>> : I've checked with Matthew Khouzam (maintainer of Trace Compass)
>> : which care about this tracepoint, and we have not identified any
>> : significant impact of moving it on its model of the scheduler, other
>> : than slightly changing its timing.
>> : I've also checked quickly in lttng-analyses and have not found
>> : any code that care about its specific placement.
>> : So I would say go ahead and move it earlier in do_exit(), it's
>> : fine by me.
> 
> I'm not seeing a clear need for this change.  "maybe inconveniant" is
> quite thin.  Please fully describe what motivated you to work on this?
> 

Thanks.
We hope to address this issue in our Advanced Driver Assistance System:
When certain critical processes exit abnormally, prompt information can 
be reported to the monitoring program as soon as possible.

We have also attempted to add a new TP, as follows:
https://lkml.org/lkml/2024/2/23/5

But after some discussion, it is still considered more reasonable to 
move trace_sched_process_exit() earlier.

We also look forward to your suggestions, thanks again.


--
Best wishes,
Wen





      reply	other threads:[~2024-03-23 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-10  5:25 wenyang.linux
2024-03-12 15:18 ` Steven Rostedt
2024-03-19 21:57 ` Andrew Morton
2024-03-23 15:30   ` Wen Yang [this message]

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=tencent_2A5F9506756CD0DC2443BA00339BDFCF3306@qq.com \
    --to=wenyang.linux@foxmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mgorman@techsingularity.net \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome