[linux-audio-dev] Fwd: [[NO] PATCH] cfq + io priorities

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Fwd: [[NO] PATCH] cfq + io priorities
From: Roger Larsson (roger.larsson_AT_norran.net)
Date: Thu Nov 13 2003 - 01:51:48 EET


Hi,

I guess this will be of interest to some of you...
An even newer version has shown up on linux-kernel.

/RogerL

From: Jens Axboe
--------------------------------
Hi,
 
 I've implemented IO nice levels in the CFQ io scheduler. It works as
 follows.
 
 A process has an assigned io nice level, anywhere from 0 to 20. Both of
 these end values are "special" - 0 means the process is only allowed to
 do io if the disk is idle, and 20 means the process io is considered
 realtime. Realtime IO always gets first access to the disk. Values from
 1 to 19 assign 5-95% of disk bandwidth to that process. Any io class is
 allowed to use all of disk bandwidth in absence of higher priority io.
 
 Idle and realtime IO settings work as expected, but not much tuning has
 gone into making sure that the individual levels in-between work 100% as
 expected. It should be good enough for some testing at least, even if it
 has some holes.
 
 About the patch: stuff like this really needs some resource management
 abstraction like CKRM. Right now we just look at the tgid of the
 process. I've added two syscalls for setting and getting io priority.
 Don't consider this final or anything, it's just easy for testing. Patch
 has been tested on x86 and ppc, syscalls are also added for x86_64.
 
 I'm attaching the simple ionice tool. It's used as follows:
 
 # ionice -n20 bash
 
 starts a bash shell with realtime io. Beware that io level is inherited
 on fork, so any program you start from this shell will also run with
 realtime io.
 
 # ionice -n0 dbench 32
 
 run some dbench thrasher, but only when disk is idle.
 
 Pretty straight forward :-)
 
 For really good results, you probably also want to set cpu nice level.
 Needless to say, a realtime io process can only submit io when it gets
 scheduled.
 
 Default IO priority for a new process is 10.
 
 Patch is against bk-current.

-- 
Roger Larsson
Skellefteċ
Sweden


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Nov 13 2003 - 01:48:13 EET