31 Oct, 2006

2 commits

  • When the ioprio code recently got juggled a bit, a bug was introduced.
    changed_ioprio() is no longer called with interrupts disabled, so using
    plain spin_lock() on the queue_lock is a bug.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     
  • If cfq_set_request() is called for a new process AND a non-fs io
    request (so that __GFP_WAIT may not be set), cfq_cic_link() may
    use spin_lock_irq() and spin_unlock_irq() with interrupts already
    disabled.

    Fix is to always use irq safe locking in cfq_cic_link()

    Acked-By: Arjan van de Ven
    Acked-by: Ingo Molnar
    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

01 Oct, 2006

18 commits


21 Aug, 2006

1 commit


25 Jul, 2006

1 commit


01 Jul, 2006

1 commit


23 Jun, 2006

6 commits

  • They all duplicate macros to check for empty root and/or node, and
    clearing a node. So put those in rbtree.h.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • - Remember to set ->last_sector so that the cfq_choose_req() logic
    works correctly.

    - Remove redundant call to cfq_choose_req()

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • This is a collection of patches that greatly improve CFQ performance
    in some circumstances.

    - Change the idling logic to only kick in after a request is done and we
    are deciding what to do. Before the idling included the request service
    time, so it was hard to adjust. Now it's true think/idle time.

    - Take advantage of TCQ/NCQ/queueing for seeky sync workloads, but keep
    it in control for sync and sequential (or close to) workloads.

    - Expire queues immediately and move on to other busy queues, if we are
    not going to idle after the current one finishes.

    - Don't rearm idle timer if there are no busy queues. Just leave the
    system idle.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Patch originally from Vasily Tarasov

    If you set io-priority of process 1 using sys_ioprio_set system call by
    another process 2 (like ionice do), then cfq_init_prio_data() function
    sets priority of process 2 (current) on queue of process 1 and clears
    the flag, that designates change of ioprio. So the process 1 will work
    like with priority of process 2.

    I propose not to call cfq_init_prio_data() on io-priority change, but
    only mark queue as queue with changed prority. Every time when new
    request comes cfq-scheduler checks for this flag and atomaticaly changes
    priority of queue to new value.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • A process flag to indicate whether we are doing sync io is incredibly
    ugly. It also causes performance problems when one does a lot of async
    io and then proceeds to sync it. Part of the io will go out as async,
    and the other part as sync. This causes a disconnect between the
    previously submitted io and the synced io. For io schedulers such as CFQ,
    this will cause us lost merges and suboptimal behaviour in scheduling.

    Remove PF_SYNCWRITE completely from the fsync/msync paths, and let
    the O_DIRECT path just directly indicate that the writes are sync
    by using WRITE_SYNC instead.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • We cannot update them if the user changes nr_requests, so don't
    set it in the first place. The gains are pretty questionable as
    well. The batching loss has been shown to decrease throughput.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

21 Jun, 2006

2 commits

  • The color is now in the low bits of the parent pointer, and initializing
    it to 0 happens as part of the whole memset above, so just remove the
    unnecessary RB_CLEAR_COLOR.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * git://git.infradead.org/~dwmw2/rbtree-2.6:
    [RBTREE] Switch rb_colour() et al to en_US spelling of 'color' for consistency
    Update UML kernel/physmem.c to use rb_parent() accessor macro
    [RBTREE] Update hrtimers to use rb_parent() accessor macro.
    [RBTREE] Add explicit alignment to sizeof(long) for struct rb_node.
    [RBTREE] Merge colour and parent fields of struct rb_node.
    [RBTREE] Remove dead code in rb_erase()
    [RBTREE] Update JFFS2 to use rb_parent() accessor macro.
    [RBTREE] Update eventpoll.c to use rb_parent() accessor macro.
    [RBTREE] Update key.c to use rb_parent() accessor macro.
    [RBTREE] Update ext3 to use rb_parent() accessor macro.
    [RBTREE] Change rbtree off-tree marking in I/O schedulers.
    [RBTREE] Add accessor macros for colour and parent fields of rb_node

    Linus Torvalds
     

15 Jun, 2006

1 commit

  • We don't clear the seek stat values in cfq_alloc_io_context(), and if
    ->seek_mean is unlucky enough to be set to -36 by chance, the first
    invocation of cfq_update_io_seektime() will oops with a divide by zero
    in do_div().

    Just memset the entire cic instead of filling invididual values
    independently.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

09 Jun, 2006

1 commit

  • There's a race between shutting down one io scheduler and firing up the
    next, in which a new io could enter and cause the io scheduler to be
    invoked with bad or NULL data.

    To fix this, we need to maintain the queue lock for a bit longer.
    Unfortunately we cannot do that, since the elevator init requires to be
    run without the lock held. This isn't easily fixable, without also
    changing the mempool API. So split the initialization into two parts,
    and alloc-init operation and an attach operation. Then we can
    preallocate the io scheduler and related structures, and run the attach
    inside the lock after we detach the old one.

    This patch has survived 30 minutes of 1 second io scheduler switching
    with a very busy io load.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

02 Jun, 2006

1 commit


01 Jun, 2006

4 commits


31 May, 2006

1 commit


21 Apr, 2006

1 commit