This patch for linux-2.6.25-mm1 that is tested on x86_64 hardware.
Signed-off-by: Hirofumi Nakagawa <hnakagawa@miraclelinux.com>
---
include/linux/maze.h | 92 +++++++++
include/linux/sched.h | 3
init/Kconfig | 10 +
init/main.c | 2
kernel/Makefile | 1
kernel/exit.c | 2
kernel/fork.c | 2
kernel/maze.c | 466 ++++++++++++++++++++++++++++++++++++++++++++++++++
kernel/sched.c | 3
9 files changed, 581 insertions(+)
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.25-mm1-maze/include/linux/maze.h 2008-05-13 17:52:23.000000000 +0900
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2007-2008 MIRACLE LINUX Corp.
+ *
+ * Written by Hirofumi Nakagawa <hnakagawa@miraclelinux.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 2.
+ */
+#ifndef _LINUX_MAZE_H
+#define _LINUX_MAZE_H
+
+#ifdef __KERNEL__
+
+#include <linux/sched.h>
+#include <linux/list.h>
+
+struct maze_context {
+ struct task_struct *task;
+ int pid;
+
+ /* The stime of task when the maze count was reseted */
+ cputime_t reset_stime;
+ /* The utime of task when the maze count was reseted */
+ cputime_t reset_utime;
+
+ /* The soft limit of maze count */
+ unsigned long soft_limit;
+ /* THe hard limit of maze count */
+ unsigned long hard_limit;
+
+ /* The send signal when the maze count reach soft limit */
+ int soft_signal;
+ /* The send signal when the maze count reach hard limit */
+ int hard_signal;
+
+#define MAZE_SENT_SOFT_SIG 1
+#define MAZE_SENT_HARD_SIG 2
+ /* The flags of sent signal */
+ unsigned long flags;
+
+ /* This value is 1, if maze_context is enqueueing */
+ int enqueue;
+ /* This value is cpu number of enqueueing */
+ int enqueue_cpu;
+
+ /* This value is 1, if preempt_notifier is registered */
+ atomic_t ...