Skip to contentSkip to conversation

CFS-devel, latest code

git Applied Dmitry Adamushko 3 participants 3 messages Sep 30, 2007 – Oct 1, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

remove obsolete code -- calc_weighted()

---

kernel/sched_fair.c +0 -0
index fe4003d..2674e27 100644
@@ -342,17 +342,6 @@ update_stats_wait_start(struct cfs_rq *cfs_rq,

struct sched_entity *se)
schedstat_set(se->wait_start, rq_of(cfs_rq)->clock);
}

-static inline unsigned long -calc_weighted(unsigned long delta, struct sched_entity *se) -{
- unsigned long weight = se->load.weight;
-
- if (unlikely(weight != NICE_0_LOAD))
- return (u64)delta * se->load.weight >> NICE_0_SHIFT;
- else
- return delta;
-}
-
/*
* Task is being enqueued - update stats:
*/

---

#1 lore raw
Quoted 3 lines · Dmitry Adamushko

remove obsolete code -- calc_weighted()

Here's another piece of low hanging obsolete fruit.

Remove obsolete TASK_NONINTERACTIVE.

fs/pipe.c renamed from linux-2.6.sched-devel/fs/pipe.c +1 -2
diff -uprNX /root/dontdiff git/linux-2.6.sched-devel/fs/pipe.c linux-2.6.23-rc8.d/fs/pipe.c
@@ -45,8 +45,7 @@ void pipe_wait(struct pipe_inode_info *p
 	 * Pipes are system-local resources, so sleeping on them
 	 * is considered a noninteractive wait:
 	 */
-	prepare_to_wait(&pipe->wait, &wait,
-			TASK_INTERRUPTIBLE | TASK_NONINTERACTIVE);
+	prepare_to_wait(&pipe->wait, &wait, TASK_INTERRUPTIBLE);
 	if (pipe->inode)
 		mutex_unlock(&pipe->inode->i_mutex);
 	schedule();
include/linux/sched.h renamed from linux-2.6.sched-devel/include/linux/sched.h +1 -2
diff -uprNX /root/dontdiff git/linux-2.6.sched-devel/include/linux/sched.h linux-2.6.23-rc8.d/include/linux/sched.h
@@ -174,8 +174,7 @@ print_cfs_rq(struct seq_file *m, int cpu
 #define EXIT_ZOMBIE		16
 #define EXIT_DEAD		32
 /* in tsk->state again */
-#define TASK_NONINTERACTIVE	64
-#define TASK_DEAD		128
+#define TASK_DEAD		64
 
 #define __set_task_state(tsk, state_value)		\
 	do { (tsk)->state = (state_value); } while (0)
Applied
#2 lore raw
Quoted 10 lines · Mike Galbraith
Quoted 3 lines · Dmitry Adamushko

remove obsolete code -- calc_weighted()

Here's another piece of low hanging obsolete fruit.

Remove obsolete TASK_NONINTERACTIVE.

thanks, applied.

Ingo