I think we can do this optimization, but see below.
Nice work! I've merged it all.
Thanks,
Roland
On 09/07, Roland McGrath wrote:
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -362,7 +362,12 @@ static inline void tracehook_report_vfor
*/
static inline void tracehook_prepare_release_task(struct task_struct *task)
{
- utrace_release_task(task);
+ /*
+
Again, I am not sure this make sense as a cleanup, up to you.
But utrace_release_task() can check UTRACE_EVENT(REAP) and
optimize out utrace_reap() when there are no attached engines.
In the original code, utrace_release_task() would not be called at all when
there are no engines attached.
On 09/07, Roland McGrath wrote:
In the original code, utrace_release_task() would not be called at all when
there are no engines attached. IMHO that is the optimization we want to
get back to.
It may still be too early in the morning for me to be thinking clearly.
and too late for me ;)
Again, I am not sure this make sense as a cleanup, up to you.
But utrace_release_task() can check UTRACE_EVENT(REAP) and
optimize out utrace_reap() when there are no attached engines.
Signed-off-by: Oleg Nesterov o...@redhat.com
---
kernel/utrace.c |4 +++-
1 file changed, 3 insertions(+),