35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
Subject: stomp-machine-mark-stomper-thread.patch
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
Date: Sun, 17 Jul 2011 19:53:19 +0200
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
---
|
|
include/linux/sched.h | 1 +
|
|
kernel/stop_machine.c | 1 +
|
|
2 files changed, 2 insertions(+)
|
|
|
|
Index: linux-3.2/include/linux/sched.h
|
|
===================================================================
|
|
--- linux-3.2.orig/include/linux/sched.h
|
|
+++ linux-3.2/include/linux/sched.h
|
|
@@ -1818,6 +1818,7 @@ extern void thread_group_times(struct ta
|
|
#define PF_FROZEN 0x00010000 /* frozen for system suspend */
|
|
#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
|
|
#define PF_KSWAPD 0x00040000 /* I am kswapd */
|
|
+#define PF_STOMPER 0x00080000 /* I am a stomp machine thread */
|
|
#define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */
|
|
#define PF_KTHREAD 0x00200000 /* I am a kernel thread */
|
|
#define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */
|
|
Index: linux-3.2/kernel/stop_machine.c
|
|
===================================================================
|
|
--- linux-3.2.orig/kernel/stop_machine.c
|
|
+++ linux-3.2/kernel/stop_machine.c
|
|
@@ -327,6 +327,7 @@ static int __cpuinit cpu_stop_cpu_callba
|
|
if (IS_ERR(p))
|
|
return notifier_from_errno(PTR_ERR(p));
|
|
get_task_struct(p);
|
|
+ p->flags |= PF_STOMPER;
|
|
kthread_bind(p, cpu);
|
|
sched_set_stop_task(cpu, p);
|
|
stopper->thread = p;
|