[PATCH] Update cfq io scheduler to time sliced design
This updates the CFQ io scheduler to the new time sliced design (cfq v3). It provides full process fairness, while giving excellent aggregate system throughput even for many competing processes. It supports io priorities, either inherited from the cpu nice value or set directly with the ioprio_get/set syscalls. The latter closely mimic set/getpriority. This import is based on my latest from -mm. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
020f46a39e
commit
22e2c507c3
@@ -213,6 +213,7 @@ extern int dir_notify_enable;
|
||||
#include <linux/radix-tree.h>
|
||||
#include <linux/prio_tree.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/semaphore.h>
|
||||
@@ -822,16 +823,34 @@ enum {
|
||||
#define vfs_check_frozen(sb, level) \
|
||||
wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level)))
|
||||
|
||||
static inline void get_fs_excl(void)
|
||||
{
|
||||
atomic_inc(¤t->fs_excl);
|
||||
}
|
||||
|
||||
static inline void put_fs_excl(void)
|
||||
{
|
||||
atomic_dec(¤t->fs_excl);
|
||||
}
|
||||
|
||||
static inline int has_fs_excl(void)
|
||||
{
|
||||
return atomic_read(¤t->fs_excl);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Superblock locking.
|
||||
*/
|
||||
static inline void lock_super(struct super_block * sb)
|
||||
{
|
||||
get_fs_excl();
|
||||
down(&sb->s_lock);
|
||||
}
|
||||
|
||||
static inline void unlock_super(struct super_block * sb)
|
||||
{
|
||||
put_fs_excl();
|
||||
up(&sb->s_lock);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user