From 958e46acc8e900e8569dd467c1af9b8d2d019394 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 09 Dec 2023 08:38:54 +0000
Subject: [PATCH] disable cpu isolcpus
---
kernel/include/linux/freezer.h | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/kernel/include/linux/freezer.h b/kernel/include/linux/freezer.h
index 21f5aa0..f753c30 100644
--- a/kernel/include/linux/freezer.h
+++ b/kernel/include/linux/freezer.h
@@ -27,6 +27,11 @@
return p->flags & PF_FROZEN;
}
+static inline bool frozen_or_skipped(struct task_struct *p)
+{
+ return p->flags & (PF_FROZEN | PF_FREEZER_SKIP);
+}
+
extern bool freezing_slow_path(struct task_struct *p);
/*
@@ -207,6 +212,17 @@
return __retval;
}
+/* DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION */
+static inline long freezable_schedule_timeout_interruptible_unsafe(long timeout)
+{
+ long __retval;
+
+ freezer_do_not_count();
+ __retval = schedule_timeout_interruptible(timeout);
+ freezer_count_unsafe();
+ return __retval;
+}
+
/* Like schedule_timeout_killable(), but should not block the freezer. */
static inline long freezable_schedule_timeout_killable(long timeout)
{
@@ -259,6 +275,7 @@
#else /* !CONFIG_FREEZER */
static inline bool frozen(struct task_struct *p) { return false; }
+static inline bool frozen_or_skipped(struct task_struct *p) { return false; }
static inline bool freezing(struct task_struct *p) { return false; }
static inline void __thaw_task(struct task_struct *t) {}
@@ -285,6 +302,9 @@
#define freezable_schedule_timeout_interruptible(timeout) \
schedule_timeout_interruptible(timeout)
+#define freezable_schedule_timeout_interruptible_unsafe(timeout) \
+ schedule_timeout_interruptible(timeout)
+
#define freezable_schedule_timeout_killable(timeout) \
schedule_timeout_killable(timeout)
--
Gitblit v1.6.2