All of lore.kernel.org
 help / color / mirror / Atom feed
* realtime scheduling
@ 2005-08-08 15:06 Holger Steinhaus
  2005-08-08 15:25 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Holger Steinhaus @ 2005-08-08 15:06 UTC (permalink / raw)
  To: xen-devel

Hi everyone,


I am trying to set up an ISDN gateway and PBX system and want to use Xen 
to seperate some components against each other. Unfortunatly, a 
necessary device driver (zaphfc) depends on very short latencys for 
servicing interrupts. This driver is located in domain0 and everything 
runs fine, as long as all other domains are idling. If the guests get 
something to do, the zaphfc driver suffers massive buffer under/overflow 
problems.

I've found some hints about the Atropos realtime scheduler on the list, 
but some posts say, it is broken currently.

1.) Are there any releases with a working RT-like scheduler?
2.) Do you have any other idea to minimize the scheduling-related 
latency for domain 0?

Thanks,
  Holger

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

* Re: realtime scheduling
  2005-08-08 15:06 realtime scheduling Holger Steinhaus
@ 2005-08-08 15:25 ` Keir Fraser
  2005-08-08 17:16   ` Stephan Diestelhorst
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2005-08-08 15:25 UTC (permalink / raw)
  To: Holger Steinhaus; +Cc: xen-devel


On 8 Aug 2005, at 16:06, Holger Steinhaus wrote:

> 1.) Are there any releases with a working RT-like scheduler?
> 2.) Do you have any other idea to minimize the scheduling-related 
> latency for domain 0?

The SEDF scheduler in the 3.0 tree should allow you to specify RT 
guarantees. Alternatively, if you have a multi-CPU system, or even 
hyperthreading, you can dedicate a cpu (or hyperthread) solely to 
domain0.

  -- keir

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

* Re: realtime scheduling
  2005-08-08 15:25 ` Keir Fraser
@ 2005-08-08 17:16   ` Stephan Diestelhorst
  2005-08-08 21:11     ` Holger Steinhaus
  0 siblings, 1 reply; 5+ messages in thread
From: Stephan Diestelhorst @ 2005-08-08 17:16 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Holger Steinhaus

Keir Fraser schrieb:

>
> On 8 Aug 2005, at 16:06, Holger Steinhaus wrote:
>
>> 1.) Are there any releases with a working RT-like scheduler?
>> 2.) Do you have any other idea to minimize the scheduling-related
>> latency for domain 0?
>
>
> The SEDF scheduler in the 3.0 tree should allow you to specify RT
> guarantees. Alternatively, if you have a multi-CPU system, or even
> hyperthreading, you can dedicate a cpu (or hyperthread) solely to
> domain0.
>
>  -- keir

The default compile of the sedf scheduler is not optimised for latency
(but the standard setting might work well...).
You can do a couple of things:
  -set the period of dom0 to roughly your latency (better half of it)
and scale your slice accordingly
   (e.g. 2ms period, 0.3ms slice...)
  -or edit xen/common/schedule_sedf.c and change
     #define UNBLOCK UNBLOCK_EXTRA_SUPPORT
     to
     #define UNBLOCK UNBLOCK_ATROPOS
     and then set the appropriate latancy value in xm sedf (this does
exactly the same thing internaly

Could you please try the second one and see how that works? If it works
well, I might change the default behaviour, so that the latency aware
scheduler gets enabled for a domain if it uses the latency parameter!

Cheers,
  Stephan

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

* Re: realtime scheduling
  2005-08-08 17:16   ` Stephan Diestelhorst
@ 2005-08-08 21:11     ` Holger Steinhaus
  2005-08-09  7:27       ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Holger Steinhaus @ 2005-08-08 21:11 UTC (permalink / raw)
  Cc: xen-devel


>The default compile of the sedf scheduler is not optimised for latency
>(but the standard setting might work well...).
>You can do a couple of things:
>  -set the period of dom0 to roughly your latency (better half of it)
>and scale your slice accordingly
>   (e.g. 2ms period, 0.3ms slice...)
>  
>
Ok, done. I installed a fresh devel version of Xen (from Aug 7), 
including kernel 2.6.12.3 and SEDF scheduling (in my original post: Xen 
2.0.7, kernel 2.6.11.12, original scheduler). The major change: now the 
buffer problems even occur without any user domain.

I tried to play around with the period/slice parameters, and found some 
values that really boost the problems. As the HFC driver generates 8000 
interupts per second (I assume for timing purposes), the desired period 
of 62500 ns is not possible on my machine. I think, I'll take a closer 
look on the driver first...


>  -or edit xen/common/schedule_sedf.c and change
>     #define UNBLOCK UNBLOCK_EXTRA_SUPPORT
>     to
>     #define UNBLOCK UNBLOCK_ATROPOS
>     and then set the appropriate latancy value in xm sedf (this does
>exactly the same thing internaly
>  
>
Makes no recognizable difference, in my opinion.

Thanks,
  Holger

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

* Re: realtime scheduling
  2005-08-08 21:11     ` Holger Steinhaus
@ 2005-08-09  7:27       ` Keir Fraser
  0 siblings, 0 replies; 5+ messages in thread
From: Keir Fraser @ 2005-08-09  7:27 UTC (permalink / raw)
  To: Holger Steinhaus; +Cc: xen-devel


On 8 Aug 2005, at 22:11, Holger Steinhaus wrote:

> Ok, done. I installed a fresh devel version of Xen (from Aug 7), 
> including kernel 2.6.12.3 and SEDF scheduling (in my original post: 
> Xen 2.0.7, kernel 2.6.11.12, original scheduler). The major change: 
> now the buffer problems even occur without any user domain.
>
> I tried to play around with the period/slice parameters, and found 
> some values that really boost the problems. As the HFC driver 
> generates 8000 interupts per second (I assume for timing purposes), 
> the desired period of 62500 ns is not possible on my machine. I think, 
> I'll take a closer look on the driver first...

If that can't be reduced then you really do need to dedicate a CPU or 
hyperthread to domain0. Otherwise the context switch overheads will 
kill you, even on a really fast CPU.

  -- Keir

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

end of thread, other threads:[~2005-08-09  7:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-08 15:06 realtime scheduling Holger Steinhaus
2005-08-08 15:25 ` Keir Fraser
2005-08-08 17:16   ` Stephan Diestelhorst
2005-08-08 21:11     ` Holger Steinhaus
2005-08-09  7:27       ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.