mm/kfence: remove hung_task cruft
authorPavankumar Kondeti <quic_pkondeti@quicinc.com>
Wed, 9 Nov 2022 09:26:46 +0000 (14:56 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 30 Nov 2022 23:58:53 +0000 (15:58 -0800)
commit fdf756f71271 ("sched: Fix more TASK_state comparisons") makes
hung_task not to monitor TASK_IDLE tasks.  The special handling to
workaround hung_task warnings is not required anymore.

Link: https://lkml.kernel.org/r/1667986006-25420-1-git-send-email-quic_pkondeti@quicinc.com
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kfence/core.c

index 141788858b7082e43c1c639059b038a20ff6ea39..08f5bd6fc36d6a11d11fe11343e15f591367bf93 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/random.h>
 #include <linux/rcupdate.h>
 #include <linux/sched/clock.h>
-#include <linux/sched/sysctl.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
@@ -799,16 +798,7 @@ static void toggle_allocation_gate(struct work_struct *work)
        /* Enable static key, and await allocation to happen. */
        static_branch_enable(&kfence_allocation_key);
 
-       if (sysctl_hung_task_timeout_secs) {
-               /*
-                * During low activity with no allocations we might wait a
-                * while; let's avoid the hung task warning.
-                */
-               wait_event_idle_timeout(allocation_wait, atomic_read(&kfence_allocation_gate),
-                                       sysctl_hung_task_timeout_secs * HZ / 2);
-       } else {
-               wait_event_idle(allocation_wait, atomic_read(&kfence_allocation_gate));
-       }
+       wait_event_idle(allocation_wait, atomic_read(&kfence_allocation_gate));
 
        /* Disable static key and reset timer. */
        static_branch_disable(&kfence_allocation_key);