[patch-2.3.43-pre5] (was Re: [q] what is TASK_SWAPPING for?)

From: Tigran Aivazian (tigran@sco.COM)
Date: Wed Feb 09 2000 - 10:25:49 EST


On Wed, 9 Feb 2000, Andrea Arcangeli wrote:
> On Wed, 9 Feb 2000, Tigran Aivazian wrote:
>
> >question - why is TASK_SWAPPING still needed?
>
> It's not needed.

Ok, thanks - then perhaps Linus could consider this patch:

   http://www.ocston.org/~tigran/patches/tswap-2.3.35.patch

(it still applies cleanly to 2.3.43-pre5).

Regards,
------
Tigran A. Aivazian | http://www.sco.com
Escalations Research Group | tel: +44-(0)1923-813796
Santa Cruz Operation Ltd | http://www.ocston.org/~tigran

diff -urN -X dontdiff linux/fs/proc/array.c tswap/fs/proc/array.c
--- linux/fs/proc/array.c Fri Nov 12 12:29:47 1999
+++ tswap/fs/proc/array.c Wed Dec 29 13:10:18 1999
@@ -133,8 +133,7 @@
                                            TASK_INTERRUPTIBLE |
                                            TASK_UNINTERRUPTIBLE |
                                            TASK_ZOMBIE |
- TASK_STOPPED |
- TASK_SWAPPING);
+ TASK_STOPPED);
         const char **p = &task_state_array[0];
 
         while (state) {
diff -urN -X dontdiff linux/include/linux/sched.h tswap/include/linux/sched.h
--- linux/include/linux/sched.h Tue Dec 21 00:01:14 1999
+++ tswap/include/linux/sched.h Wed Dec 29 13:12:22 1999
@@ -80,7 +80,6 @@
 #define TASK_UNINTERRUPTIBLE 2
 #define TASK_ZOMBIE 4
 #define TASK_STOPPED 8
-#define TASK_SWAPPING 16
 #define TASK_EXCLUSIVE 32
 
 #define __set_task_state(tsk, state_value) \
diff -urN -X dontdiff linux/kernel/timer.c tswap/kernel/timer.c
--- linux/kernel/timer.c Tue Dec 14 00:13:36 1999
+++ tswap/kernel/timer.c Wed Dec 29 13:10:59 1999
@@ -553,8 +553,7 @@
         read_lock(&tasklist_lock);
         for_each_task(p) {
                 if ((p->state == TASK_RUNNING ||
- (p->state & TASK_UNINTERRUPTIBLE) ||
- (p->state & TASK_SWAPPING)))
+ (p->state & TASK_UNINTERRUPTIBLE)))
                         nr += FIXED_1;
         }
         read_unlock(&tasklist_lock);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:15 EST