# schedtool: improving RT performance for emulator

## LiquidAcid

Hi there,

I'm currently trying to speed up the GTK snes9x port snes9x-gtk (GTK port version 33).

I'm using (uname -a) as kernel:

Linux leena 2.6.26-gentoo-r1 #1 PREEMPT Sun Sep 7 15:48:27 CDT 2008 i686 Intel(R) Celeron(R) M processor 1.50GHz GenuineIntel GNU/Linux

snes9x-gtk have some speed issues. Like every 10 seconds the emulator slows down quite a bit, then accelerates again and returns to normal speed. Like something in the background is suddenly consuming a lot of CPU power. But nothing is there that could consume.

I'm not only having this problem with snes9x-gtk, also the pSX Playstation1 emulator has these issues. Last time while checking for some visual errors in Max Payne 1 (through wine) I also noticed these slowdowns. For me it looks like a problem with the scheduler.

So I emerged schedtool and tried to fiddle around with the scheduler policies. I wanted to choose something that didn't requiere root rights. SCHED_ISO looked like it should do it. But it's not working for me:

schedtool -4 -e snes9x-gtk

ERROR: could not set PID 30402 to I: SCHED_ISO - value out of range / policy not implemented

The manpages talk about "patch needed". But I really don't know where to get this patch. Looked it up on Google and for me it looks like that this policy is sort of a leftover from previous linux versions.

Does anyone know how to possible reactivate this scheduler policy? Or did something also encounter this problem and has found some other fix for it?

Greets,

liquid

----------

## baeksu

Schedtool only works with cd-patched kernels. But, ck-patches haven't been updated since 2.6.22 (and probably won't be updated ever again).

----------

## LiquidAcid

You mean the SCHED_ISO policy, right?

Any other way to influence the scheduler so I can get acceptable performance in games?

----------

