Re: [patch] Real-Time Preemption, -RT-2.6.12-rc3-V0.7.46-01

Daniel Walker
2005-04-26T17:52:09Z

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

On Fri, 2005-04-22 at 08:55, Ingo Molnar wrote:

> i used:
>
> ./test --tasks 10 file.hist

This patch cleanup the delays on increased numbers of tasks. It goes on
to of the current plist snapshot.

Daniel

[-- Attachment #2: fix_pi_list_init.patch --]
[-- Type: text/x-patch, Size: 1772 bytes --]

Index: linux-2.6.11/include/linux/plist.h
===================================================================
--- linux-2.6.11.orig/include/linux/plist.h 2005-04-22 19:36:54.000000000 +0000
+++ linux-2.6.11/include/linux/plist.h 2005-04-22 19:38:29.000000000 +0000
@@ -251,7 +251,7 @@
static inline void plist_del_init(struct plist *pl, struct plist *plist)
{
plist_del (pl, plist);
- plist_init(pl, 0);
+ plist_init(pl, INT_MAX);
}

/* Return the priority a pl node */
Index: linux-2.6.11/include/linux/rt_lock.h
===================================================================
--- linux-2.6.11.orig/include/linux/rt_lock.h 2005-04-21 17:49:26.000000000 +0000
+++ linux-2.6.11/include/linux/rt_lock.h 2005-04-22 22:35:37.000000000 +0000
@@ -95,12 +95,12 @@
#ifdef CONFIG_RT_DEADLOCK_DETECT
# define __RT_MUTEX_INITIALIZER(lockname) \
{ .wait_lock = RAW_SPIN_LOCK_UNLOCKED, \
- .wait_list = PLIST_INIT((lockname).wait_list, 0), \
+ .wait_list = PLIST_INIT((lockname).wait_list, MAX_PRIO), \
.name = #lockname, .file = __FILE__, .line = __LINE__ }
#else
# define __RT_MUTEX_INITIALIZER(lockname) \
{ .wait_lock = RAW_SPIN_LOCK_UNLOCKED, \
- PLIST_INIT((lockname).wait_list, 0) }
+ PLIST_INIT((lockname).wait_list, MAX_PRIO) }
#endif
/*
* RW-semaphores are an RT mutex plus a reader-depth count.
Index: linux-2.6.11/kernel/rt.c
===================================================================
--- linux-2.6.11.orig/kernel/rt.c 2005-04-22 15:05:33.000000000 +0000
+++ linux-2.6.11/kernel/rt.c 2005-04-22 22:34:22.000000000 +0000
@@ -939,6 +939,7 @@

set_task_state(task, TASK_UNINTERRUPTIBLE);

+ plist_init (&waiter.list, task->prio);
task_blocks_on_lock(&waiter, task, lock, eip);

TRACE_BUG_ON(!irqs_disabled());