1. 28 4月, 2009 1 次提交
    • T
      block: kill blk_start_queueing() · a7f55792
      Tejun Heo 提交于
      blk_start_queueing() is identical to __blk_run_queue() except that it
      doesn't check for recursion.  None of the current users depends on
      blk_start_queueing() running request_fn directly.  Replace usages of
      blk_start_queueing() with [__]blk_run_queue() and kill it.
      
      [ Impact: removal of mostly duplicate interface function ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      a7f55792
  2. 24 4月, 2009 3 次提交
    • J
      cfq-iosched: cache prio_tree root in cfqq->p_root · f2d1f0ae
      Jens Axboe 提交于
      Currently we look it up from ->ioprio, but ->ioprio can change if
      either the process gets its IO priority changed explicitly, or if
      cfq decides to temporarily boost it. So if we are unlucky, we can
      end up attempting to remove a node from a different rbtree root than
      where it was added.
      
      Fix this by using ->org_ioprio as the prio_tree index, since that
      will only change for explicit IO priority settings (not for a boost).
      Additionally cache the rbtree root inside the cfqq, then we don't have
      to add code to reinsert the cfqq in the prio_tree if IO priority changes.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      f2d1f0ae
    • J
      cfq-iosched: fix bug with aliased request and cooperation detection · 3ac6c9f8
      Jens Axboe 提交于
      cfq_prio_tree_lookup() should return the direct match, yet it always
      returns zero. Fix that.
      
      cfq_prio_tree_add() assumes that we don't get a direct match, while
      it is very possible that we do. Using O_DIRECT, you can have different
      cfqq with matching requests, since you don't have the page cache
      to serialize things for you. Fix this bug by only adding the cfqq if
      there isn't an existing match.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      3ac6c9f8
    • J
      cfq-iosched: clear ->prio_trees[] on cfqd alloc · 26a2ac00
      Jens Axboe 提交于
      Not strictly needed, but we should make it clear that we init the
      rbtree roots here.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      26a2ac00
  3. 22 4月, 2009 2 次提交
  4. 15 4月, 2009 7 次提交
  5. 07 4月, 2009 3 次提交
    • J
      cfq-iosched: don't let idling interfere with plugging · b029195d
      Jens Axboe 提交于
      When CFQ is waiting for a new request from a process, currently it'll
      immediately restart queuing when it sees such a request. This doesn't
      work very well with streamed IO, since we then end up splitting IO
      that would otherwise have been merged nicely. For a simple dd test,
      this causes 10x as many requests to be issued as we should have.
      Normally this goes unnoticed due to the low overhead of requests
      at the device side, but some hardware is very sensitive to request
      sizes and there it can cause big slow downs.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      b029195d
    • J
      cfq-iosched: kill two unused cfqq flags · 75e50984
      Jens Axboe 提交于
      We only manipulate the must_dispatch and queue_new flags, they are not
      tested anymore. So get rid of them.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      75e50984
    • J
      cfq-iosched: change dispatch logic to deal with single requests at the time · 2f5cb738
      Jens Axboe 提交于
      The IO scheduler core calls into the IO scheduler dispatch_request hook
      to move requests from the IO scheduler and into the driver dispatch
      list. It only does so when the dispatch list is empty. CFQ moves several
      requests to the dispatch list, which can cause higher latencies if we
      suddenly have to switch to some important sync IO. Change the logic to
      move one request at the time instead.
      
      This should almost be functionally equivalent to what we did before,
      except that we now honor 'quantum' as the maximum queue depth at the
      device side from any single cfqq. If there's just a single active
      cfqq, we allow up to 4 times the normal quantum.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      2f5cb738
  6. 06 4月, 2009 1 次提交
  7. 30 1月, 2009 1 次提交
    • D
      cfq-iosched: Allow RT requests to pre-empt ongoing BE timeslice · 3a9a3f6c
      Divyesh Shah 提交于
      This patch adds the ability to pre-empt an ongoing BE timeslice when a RT
      request is waiting for the current timeslice to complete. This reduces the
      wait time to disk for RT requests from an upper bound of 4 (current value
      of cfq_quantum) to 1 disk request.
      
      Applied Jens' suggeested changes to avoid the rb lookup and use !cfq_class_rt()
      and retested.
      
      Latency(secs) for the RT task when doing sequential reads from 10G file.
                             | only RT | RT + BE | RT + BE + this patch
      small (512 byte) reads | 143     | 163     | 145
      large (1Mb) reads      | 142     | 158     | 146
      Signed-off-by: NDivyesh Shah <dpshah@google.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      3a9a3f6c
  8. 29 12月, 2008 4 次提交
  9. 09 10月, 2008 4 次提交
  10. 03 7月, 2008 3 次提交
  11. 28 5月, 2008 2 次提交
  12. 07 5月, 2008 2 次提交
  13. 10 4月, 2008 1 次提交
    • F
      cfq-iosched: do not leak ioc_data across iosched switches · 4faa3c81
      Fabio Checconi 提交于
      When switching scheduler from cfq, cfq_exit_queue() does not clear
      ioc->ioc_data, leaving a dangling pointer that can deceive the following
      lookups when the iosched is switched back to cfq.  The pattern that can
      trigger that is the following:
      
          - elevator switch from cfq to something else;
          - module unloading, with elv_unregister() that calls cfq_free_io_context()
            on ioc freeing the cic (via the .trim op);
          - module gets reloaded and the elevator switches back to cfq;
          - reallocation of a cic at the same address as before (with a valid key).
      
      To fix it just assign NULL to ioc_data in __cfq_exit_single_io_context(),
      that is called from the regular exit path and from the elevator switching
      code.  The only path that frees a cic and is not covered is the error handling
      one, but cic's freed in this way are never cached in ioc_data.
      Signed-off-by: NFabio Checconi <fabio@gandalf.sssup.it>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      4faa3c81
  14. 02 4月, 2008 1 次提交
  15. 19 2月, 2008 1 次提交
  16. 01 2月, 2008 1 次提交
  17. 28 1月, 2008 3 次提交
    • J
      cfq-iosched: kill some big inlines · febffd61
      Jens Axboe 提交于
      Use of inlines were a bit over the top, trim them down a bit.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      febffd61
    • J
      cfq-iosched: relax IOPRIO_CLASS_IDLE restrictions · 0871714e
      Jens Axboe 提交于
      Currently you must be root to set idle io prio class on a process. This
      is due to the fact that the idle class is implemented as a true idle
      class, meaning that it will not make progress if someone else is
      requesting disk access. Unfortunately this means that it opens DOS
      opportunities by locking down file system resources, hence it is root
      only at the moment.
      
      This patch relaxes the idle class a little, by removing the truly idle
      part (which entals a grace period with associated timer). The
      modifications make the idle class as close to zero impact as can be done
      while still guarenteeing progress. This means we can relax the root only
      criteria as well.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      0871714e
    • J
      block: cfq: make the io contect sharing lockless · 4ac845a2
      Jens Axboe 提交于
      The io context sharing introduced a per-ioc spinlock, that would protect
      the cfq io context lookup. That is a regression from the original, since
      we never needed any locking there because the ioc/cic were process private.
      
      The cic lookup is changed from an rbtree construct to a radix tree, which
      we can then use RCU to make the reader side lockless. That is the performance
      critical path, modifying the radix tree is only done on process creation
      (when that process first does IO, actually) and on process exit (if that
      process has done IO).
      
      As it so happens, radix trees are also much faster for this type of
      lookup where the key is a pointer. It's a very sparse tree.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      4ac845a2