Hyper-thread aware batch scheduling 2.6.0-test9
PATCH 1/1 Hyper-thread aware batch scheduling 2.6.0-test9
This patch is a combination of two complementary patches I worked on for my own use that you might find useful.
ht-2 has some very simple hyper-thread enhancements designed to balance hyper-thread siblings with cache-warm tasks if possible.
batch-3 contains an improved version of the batch scheduling I posted a while ago.
changes:
The main improvement in this is it is hyper-thread aware. How it does this is it will try not to schedule a batch task on a logical cpu if it's hyper-thread sibling is running a normal task. This makes a massive difference if you try to run batch tasks on a HT box with an SMP kernel. It now does it's accounting for batch cpu time as idle time. Other minor touch ups.
Batch scheduling allows you to specify tasks to be as lightweight as possible, using only idle cpu time when it's available instead of a small proportion of cpu time that the most niced tasks would in normal scheduling.
Both patches are available separately at this url, but batch-3 depends on the ht-2 patch.
http://ck.kolivas.org/patches/2.6/2.6.0-test9
The attached patch is the merged ht2-batch3 patch.
Con
include/linux/sched.h +2 -0
@@ -126,6 +126,7 @@ extern unsigned long nr_iowait(void);#define SCHED_NORMAL 0#define SCHED_FIFO 1#define SCHED_RR 2 +#define SCHED_BATCH 3struct sched_param {int sched_priority;
@@ -285,6 +286,7 @@ struct signal_struct {#define MAX_PRIO (MAX_RT_PRIO + 40)#define rt_task (p) ((p)->prio < MAX_RT_PRIO) +#define batch_task (p) ((p)->policy == SCHED_BATCH)/* * Some day this will be a full-fledged user tracking system..
kernel/sched.c +180 -46
417 lines not on this page · raw message