1. 04 11月, 2009 1 次提交
  2. 02 11月, 2009 2 次提交
  3. 29 10月, 2009 2 次提交
    • C
      blkdev: flush disk cache on ->fsync · ab0a9735
      Christoph Hellwig 提交于
      Currently there is no barrier support in the block device code.  That
      means we cannot guarantee any sort of data integerity when using the
      block device node with dis kwrite caches enabled.  Using the raw block
      device node is a typical use case for virtualization (and I assume
      databases, too).  This patch changes block_fsync to issue a cache flush
      and thus make fsync on block device nodes actually useful.
      
      Note that in mainline we would also need to add such code to the
      ->aio_write method for O_SYNC handling, but assuming that Jan's patch
      series for the O_SYNC rewrite goes in it will also call into ->fsync
      for 2.6.32.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      ab0a9735
    • J
      block: move bdi/address_space unplug functions to backing-dev.h · b9d128f1
      Jens Axboe 提交于
      There's nothing block related about them, the backing device
      is used by things like NFS etc as well. This gets rid of the
      need to protect such calls by CONFIG_BLOCK.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      b9d128f1
  4. 28 10月, 2009 9 次提交
    • J
      drbd: fix in_flight rw indexing · a870a3a4
      Jens Axboe 提交于
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      a870a3a4
    • J
      aio: implement request batching · cfb1e33e
      Jeff Moyer 提交于
      Hi,
      
      Some workloads issue batches of small I/O, and the performance is poor
      due to the call to blk_run_address_space for every single iocb.  Nathan
      Roberts pointed this out, and suggested that by deferring this call
      until all I/Os in the iocb array are submitted to the block layer, we
      can realize some impressive performance gains (up to 30% for sequential
      4k reads in batches of 16).
      Signed-off-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      cfb1e33e
    • J
      block: get rid of the WRITE_ODIRECT flag · 1af60fbd
      Jeff Moyer 提交于
      Hi,
      
      The WRITE_ODIRECT flag is only used in one place, and that code path
      happens to also call blk_run_address_space.  The introduction of this
      flag, then, could result in the device being unplugged twice for every
      I/O.
      
      Further, with the batching changes in the next patch, we don't want an
      O_DIRECT write to imply a queue unplug.
      Signed-off-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      1af60fbd
    • J
      cfq-iosched: fix style issue in cfq_get_avg_queues() · 5869619c
      Jens Axboe 提交于
      Line breaks and bad brace placement.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5869619c
    • C
      cfq-iosched: fairness for sync no-idle queues · 718eee05
      Corrado Zoccolo 提交于
      Currently no-idle queues in cfq are not serviced fairly:
      even if they can only dispatch a small number of requests at a time,
      they have to compete with idling queues to be serviced, experiencing
      large latencies.
      
      We should notice, instead, that no-idle queues are the ones that would
      benefit most from having low latency, in fact they are any of:
      * processes with large think times (e.g. interactive ones like file
        managers)
      * seeky (e.g. programs faulting in their code at startup)
      * or marked as no-idle from upper levels, to improve latencies of those
        requests.
      
      This patch improves the fairness and latency for those queues, by:
      * separating sync idle, sync no-idle and async queues in separate
        service_trees, for each priority
      * service all no-idle queues together
      * and idling when the last no-idle queue has been serviced, to
        anticipate for more no-idle work
      * the timeslices allotted for idle and no-idle service_trees are
        computed proportionally to the number of processes in each set.
      
      Servicing all no-idle queues together should have a performance boost
      for NCQ-capable drives, without compromising fairness.
      Signed-off-by: NCorrado Zoccolo <czoccolo@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      718eee05
    • C
      cfq-iosched: enable idling for last queue on priority class · a6d44e98
      Corrado Zoccolo 提交于
      cfq can disable idling for queues in various circumstances.
      When workloads of different priorities are competing, if the higher
      priority queue has idling disabled, lower priority queues may steal
      its disk share. For example, in a scenario with an RT process
      performing seeky reads vs a BE process performing sequential reads,
      on an NCQ enabled hardware, with low_latency unset,
      the RT process will dispatch only the few pending requests every full
      slice of service for the BE process.
      
      The patch solves this issue by always performing idle on the last
      queue at a given priority class > idle. If the same process, or one
      that can pre-empt it (so at the same priority or higher), submits a
      new request within the idle window, the lower priority queue won't
      dispatch, saving the disk bandwidth for higher priority ones.
      
      Note: this doesn't touch the non_rotational + NCQ case (no hardware
      to test if this is a benefit in that case).
      Signed-off-by: NCorrado Zoccolo <czoccolo@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      a6d44e98
    • C
      cfq-iosched: reimplement priorities using different service trees · c0324a02
      Corrado Zoccolo 提交于
      We use different service trees for different priority classes.
      This allows a simplification in the service tree insertion code, that no
      longer has to consider priority while walking the tree.
      Signed-off-by: NCorrado Zoccolo <czoccolo@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      c0324a02
    • C
      cfq-iosched: preparation to handle multiple service trees · aa6f6a3d
      Corrado Zoccolo 提交于
      We embed a pointer to the service tree in each queue, to handle multiple
      service trees easily.
      Service trees are enriched with a counter.
      cfq_add_rq_rb is invoked after putting the rq in the fifo, to ensure
      that all fields in rq are properly initialized.
      Signed-off-by: NCorrado Zoccolo <czoccolo@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      aa6f6a3d
    • C
      cfq-iosched: adapt slice to number of processes doing I/O · 5db5d642
      Corrado Zoccolo 提交于
      When the number of processes performing I/O concurrently increases,
      a fixed time slice per process will cause large latencies.
      
      This patch, if low_latency mode is enabled,  will scale the time slice
      assigned to each process according to a 300ms target latency.
      
      In order to keep fairness among processes:
      * The number of active processes is computed using a special form of
      running average, that quickly follows sudden increases (to keep latency low),
      and decrease slowly (to have fairness in spite of rapid decreases of this
      value).
      
      To safeguard sequential bandwidth, we impose a minimum time slice
      (computed using 2*cfq_slice_idle as base, adjusted according to priority
      and async-ness).
      Signed-off-by: NCorrado Zoccolo <czoccolo@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5db5d642
  5. 27 10月, 2009 1 次提交
  6. 26 10月, 2009 4 次提交
  7. 13 10月, 2009 3 次提交
  8. 12 10月, 2009 1 次提交
  9. 09 10月, 2009 3 次提交
    • W
      writeback: kill space in debugfs item name · 961515f6
      Wu Fengguang 提交于
      The space is not script friendly, kill it.
      Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      961515f6
    • W
      writeback: account IO throttling wait as iowait · d25105e8
      Wu Fengguang 提交于
      It makes sense to do IOWAIT when someone is blocked
      due to IO throttle, as suggested by Kame and Peter.
      
      There is an old comment for not doing IOWAIT on throttle,
      however it has been mismatching the code for a long time.
      
      If we stop accounting IOWAIT for 2.6.32, it could be an
      undesirable behavior change. So restore the io_schedule.
      
      CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      d25105e8
    • K
      elv_iosched_store(): fix strstrip() misuse · 8c279598
      KOSAKI Motohiro 提交于
      elv_iosched_store() ignore the return value of strstrip().  It makes small
      inconsistent behavior.
      
      This patch fixes it.
      
       <before>
       ====================================
       # cd /sys/block/{blockdev}/queue
      
       case1:
       # echo "anticipatory" > scheduler
       # cat scheduler
       noop [anticipatory] deadline cfq
      
       case2:
       # echo "anticipatory " > scheduler
       # cat scheduler
       noop [anticipatory] deadline cfq
      
       case3:
       # echo " anticipatory" > scheduler
       bash: echo: write error: Invalid argument
      
       <after>
       ====================================
       # cd /sys/block/{blockdev}/queue
      
       case1:
       # echo "anticipatory" > scheduler
       # cat scheduler
       noop [anticipatory] deadline cfq
      
       case2:
       # echo "anticipatory " > scheduler
       # cat scheduler
       noop [anticipatory] deadline cfq
      
       case3:
       # echo " anticipatory" > scheduler
       noop [anticipatory] deadline cfq
      
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      8c279598
  10. 08 10月, 2009 4 次提交
  11. 07 10月, 2009 4 次提交
  12. 06 10月, 2009 1 次提交
  13. 05 10月, 2009 5 次提交