1. 18 4月, 2008 6 次提交
    • T
      libata: kill ata_noop_dev_select() · c9f75b04
      Tejun Heo 提交于
      Now that SFF assumptions are separated out from non-SFF reset
      sequence, port_ops->sff_dev_select() is no longer necessary for
      non-SFF controllers.  Kill ata_noop_dev_select() and ->sff_dev_select
      initialization from base and other non-SFF port_ops.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      c9f75b04
    • T
      libata: remove check_status from non-SFF drivers · 520d06f9
      Tejun Heo 提交于
      Now that all SFF stuff is separated out of core layer, core layer
      doesn't call ops->[alt_]check_status().  In fact, no one calls them
      for non-SFF drivers anymore.  Kill them.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      520d06f9
    • T
      libata: replace tf_read with qc_fill_rtf for non-SFF drivers · 4c9bf4e7
      Tejun Heo 提交于
      Now that all SFF stuff is separated out of core layer, core layer
      doesn't call ops->tf_read directly.  It gets called only via
      ops->qc_fill_rtf() for non-SFF drivers.  This patch directly
      implements private ops->qc_fill_rtf() for non-SFF controllers and kill
      ops->tf_read().
      
      This is much cleaner for non-SFF controllers as some of them have to
      cache SFF register values in private data structure and report the
      cached values via ops->tf_read().  Also, ops->tf_read() gets nasty for
      controllers which don't have clear notion of TF registers when
      operation is not in progress.
      
      As this change makes default ops->qc_fill_rtf unnecessary, move
      ata_sff_qc_fill_rtf() form ata_base_port_ops to ata_sff_port_ops where
      it belongs.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      4c9bf4e7
    • T
      libata: add qc_fill_rtf port operation · 22183bf5
      Tejun Heo 提交于
      On command completion, ata_qc_complete() directly called ops->tf_read
      to fill qc->result_tf.  This patch adds ops->qc_fill_rtf to replace
      hardcoded ops->tf_read usage.
      
      ata_sff_qc_fill_rtf() which uses ops->tf_read to fill result_tf is
      implemented and set in ata_base_port_ops and other ops tables which
      don't inherit from ata_base_port_ops, so this patch doesn't introduce
      any behavior change.
      
      ops->qc_fill_rtf() is similar to ops->sff_tf_read() but can only be
      called when a command finishes.  As some non-SFF controllers don't
      have TF registers defined unless they're associated with in-flight
      commands, this limited operation makes life easier for those drivers
      and help lifting SFF assumptions from libata core layer.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      22183bf5
    • T
      libata: rename SFF port ops · 5682ed33
      Tejun Heo 提交于
      Add sff_ prefix to SFF specific port ops.
      
      This rename is in preparation of separating SFF support out of libata
      core layer.  This patch strictly renames ops and doesn't introduce any
      behavior difference.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      5682ed33
    • T
      libata: make reset related methods proper port operations · a1efdaba
      Tejun Heo 提交于
      Currently reset methods are not specified directly in the
      ata_port_operations table.  If a LLD wants to use custom reset
      methods, it should construct and use a error_handler which uses those
      reset methods.  It's done this way for two reasons.
      
      First, the ops table already contained too many methods and adding
      four more of them would noticeably increase the amount of necessary
      boilerplate code all over low level drivers.
      
      Second, as ->error_handler uses those reset methods, it can get
      confusing.  ie. By overriding ->error_handler, those reset ops can be
      made useless making layering a bit hazy.
      
      Now that ops table uses inheritance, the first problem doesn't exist
      anymore.  The second isn't completely solved but is relieved by
      providing default values - most drivers can just override what it has
      implemented and don't have to concern itself about higher level
      callbacks.  In fact, there currently is no driver which actually
      modifies error handling behavior.  Drivers which override
      ->error_handler just wraps the standard error handler only to prepare
      the controller for EH.  I don't think making ops layering strict has
      any noticeable benefit.
      
      This patch makes ->prereset, ->softreset, ->hardreset, ->postreset and
      their PMP counterparts propoer ops.  Default ops are provided in the
      base ops tables and drivers are converted to override individual reset
      methods instead of creating custom error_handler.
      
      * ata_std_error_handler() doesn't use sata_std_hardreset() if SCRs
        aren't accessible.  sata_promise doesn't need to use separate
        error_handlers for PATA and SATA anymore.
      
      * softreset is broken for sata_inic162x and sata_sx4.  As libata now
        always prefers hardreset, this doesn't really matter but the ops are
        forced to NULL using ATA_OP_NULL for documentation purpose.
      
      * pata_hpt374 needs to use different prereset for the first and second
        PCI functions.  This used to be done by branching from
        hpt374_error_handler().  The proper way to do this is to use
        separate ops and port_info tables for each function.  Converted.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      a1efdaba
  2. 07 4月, 2008 1 次提交
    • H
      scsi: fix sense_slab/bio swapping livelock · 164fc5dc
      Hugh Dickins 提交于
      Since 2.6.25-rc7, I've been seeing an occasional livelock on one x86_64
      machine, copying kernel trees to tmpfs, paging out to swap.
      
      Signature: 6000 pages under writeback but never getting written; most
      tasks of interest trying to reclaim, but each get_swap_bio waiting for a
      bio in mempool_alloc's io_schedule_timeout(5*HZ); every five seconds an
      atomic page allocation failure report from kblockd failing to allocate a
      sense_buffer in __scsi_get_command.
      
      __scsi_get_command has a (one item) free_list to protect against this,
      but rc1's [SCSI] use dynamically allocated sense buffer
      de25deb1 upset that slightly.  When it
      fails to allocate from the separate sense_slab, instead of giving up, it
      must fall back to the command free_list, which is sure to have a
      sense_buffer attached.
      
      Either my earlier -rc testing missed this, or there's some recent
      contributory factor.  One very significant factor is SLUB, which merges
      slab caches when it can, and on 64-bit happens to merge both bio cache
      and sense_slab cache into kmalloc's 128-byte cache: so that under this
      swapping load, bios above are liable to gobble up all the slots needed
      for scsi_cmnd sense_buffers below.
      
      That's disturbing behaviour, and I tried a few things to fix it.  Adding
      a no-op constructor to the sense_slab inhibits SLUB from merging it, and
      stops all the allocation failures I was seeing; but it's rather a hack,
      and perhaps in different configurations we have other caches on the
      swapout path which are ill-merged.
      
      Another alternative is to revert the separate sense_slab, using
      cache-line-aligned sense_buffer allocated beyond scsi_cmnd from the one
      kmem_cache; but that might waste more memory, and is only a way of
      diverting around the known problem.
      
      While I don't like seeing the allocation failures, and hate the idea of
      all those bios piled up above a scsi host working one by one, it does
      seem to emerge fairly soon with the livelock fix.  So lacking better
      ideas, stick with that one clear fix for now.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Peter Zijlstra <a.p.ziljstra@chello.nl>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      164fc5dc
  3. 29 3月, 2008 8 次提交
  4. 28 3月, 2008 2 次提交
  5. 27 3月, 2008 1 次提交
  6. 20 3月, 2008 3 次提交
  7. 15 3月, 2008 2 次提交
  8. 14 3月, 2008 1 次提交
  9. 09 3月, 2008 1 次提交
  10. 08 3月, 2008 1 次提交
  11. 06 3月, 2008 3 次提交
  12. 05 3月, 2008 1 次提交
  13. 04 3月, 2008 10 次提交