Revert "ANDROID: hung_task: Add vendor hook for hung task detect"

This reverts commit fd84c02872 as it
conflicts with upstream scheduler changes in 6.1-rc1 in a very large
way.  If it is still needed here, it must be reworked and added back
again.

Bug: 188684133
Cc: Huang Yiwei <hyiwei@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iad842fe0f22204570343b94c870589430e46b7cf
This commit is contained in:
Greg Kroah-Hartman
2022-10-12 09:49:01 +02:00
parent ed27852308
commit 9c6c316e3d
3 changed files with 3 additions and 37 deletions
-3
View File
@@ -35,7 +35,6 @@
#include <trace/hooks/selinux.h>
#include <trace/hooks/syscall_check.h>
#include <trace/hooks/remoteproc.h>
#include <trace/hooks/hung_task.h>
/*
* Export tracepoints that act as a bare tracehook (ie: have no trace event
@@ -105,5 +104,3 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_file_open);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_bpf_syscall);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery_set);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_uninterruptible_tasks);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_uninterruptible_tasks_dn);
-25
View File
@@ -1,25 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM hung_task
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_HUNG_TASK_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_HUNG_TASK_H
#include <trace/hooks/vendor_hooks.h>
struct task_struct;
DECLARE_HOOK(android_vh_check_uninterruptible_tasks,
TP_PROTO(struct task_struct *t, unsigned long timeout,
bool *need_check),
TP_ARGS(t, timeout, need_check));
DECLARE_HOOK(android_vh_check_uninterruptible_tasks_dn,
TP_PROTO(void *unused),
TP_ARGS(unused));
#endif /* _TRACE_HOOK_HUNG_TASK_H */
/* This part must be outside protection */
#include <trace/define_trace.h>
+3 -9
View File
@@ -24,8 +24,6 @@
#include <linux/sched/sysctl.h>
#include <trace/events/sched.h>
#undef CREATE_TRACE_POINTS
#include <trace/hooks/hung_task.h>
/*
* The number of tasks checked:
@@ -182,7 +180,6 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
int max_count = sysctl_hung_task_check_count;
unsigned long last_break = jiffies;
struct task_struct *g, *t;
bool need_check = true;
/*
* If the system crashed already then all bets are off,
@@ -201,13 +198,10 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
goto unlock;
last_break = jiffies;
}
trace_android_vh_check_uninterruptible_tasks(t, timeout, &need_check);
if (need_check)
/* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
if (READ_ONCE(t->__state) == TASK_UNINTERRUPTIBLE)
check_hung_task(t, timeout);
/* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
if (READ_ONCE(t->__state) == TASK_UNINTERRUPTIBLE)
check_hung_task(t, timeout);
}
trace_android_vh_check_uninterruptible_tasks_dn(NULL);
unlock:
rcu_read_unlock();
if (hung_task_show_lock)