mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.6.0 SCHED_RR/SCHED_FIFO strangness .
@ 2004-01-14  7:45 Der Herr Hofrat
  2004-01-15  9:26 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Der Herr Hofrat @ 2004-01-14  7:45 UTC (permalink / raw)
  To: linux-kernel


Hi !

 doing some simple benchmarks with 2.6.0 I have results I don't
 understand. The setup is a P4 2GHz 2.6.0 kernel running
 Slackware 9.1 with one soft real-time task active only. This one
 task is:

	param.sched_priority = 0;
	sched_setscheduler(getpid(),SCHED_FIFO,&param);
//	sched_setscheduler(getpid(),SCHED_RR,&param);
	...

	while(n < loops) {
                hwtime2 = hwtime();
		hwtime1 = hwtime();
		jitt=hwtime1-hwtime2;
		...
	}

 the jitter is then put into an array using jitt converted to microseconds as
 index. hwtime is:

__inline__ unsigned long long int hwtime(void)
{
        unsigned long long int x;
        __asm__ __volatile__("rdtsc\n\t"
                :"=A" (x));
        return x;
}

 So this should shows how long the task can be interrupted between two 
 consecutive statements (loops is around 1E9).

 The strange thing is that SCHED_FIFO runs always return worse results than
 SCHED_RR runs under even moderate load (one find / in an endless loop, system
 otherwise idle) - any ideas what is causing this ?

 As there is only one task with rt priority in the system I was actually 
 expecting more or less identical worst case results with a slight preference
 for SCHED_FIFO in the average case.

hofrat

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-15 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-14  7:45 2.6.0 SCHED_RR/SCHED_FIFO strangness Der Herr Hofrat
2004-01-15  9:26 ` Andrew Morton
2004-01-14 19:42   ` Der Herr Hofrat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®