lkml.org 
[lkml]   [2007]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RSDL v0.31

* Rik van Riel <riel@redhat.com> wrote:

> The increased AIM7 throughput (and the other benchmark results) looked
> very promising to me.
>
> I wonder what we're doing wrong in the normal scheduler...

there's a relatively easy way to figure out whether it's related to the
interactivity code: try AIM7 with SCHED_BATCH as well, to take most of
the 'interactivity effects' out of the picture.

build the attached setbatch.c code and do "./setbatch $$" to change the
shell to SCHED_BATCH (and all its future children will be SCHED_BATCH
too).

Ingo

/*
* Set a given PID to be a SCHED_BATCH process.
*
* Copyright (C) 2002 Ingo Molnar
*/
#include <time.h>
#include <stdio.h>
#include <sched.h>
#include <stdlib.h>
#include <sys/types.h>
#include <linux/unistd.h>

int main (int argc, char **argv)
{
int pid, ret;
struct sched_param p;

p.sched_priority = 0;

if (argc != 2) {
printf("usage: setbatch <pid>\n");
exit(-1);
}
pid = atol(argv[1]);

ret = sched_setscheduler(pid, 3, &p);

if (ret) {
printf("could not set pid %d to SCHED_BATCH: err %d.\n", pid, ret);
return -1;
}
printf("pid %d is SCHED_BATCH from now on.\n", pid);
return 0;
}
\
 
 \ /
  Last update: 2007-03-17 16:43    [W:0.566 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site