1. 16 10月, 2007 2 次提交
  2. 10 10月, 2007 3 次提交
    • N
      Drop 'size' argument from bio_endio and bi_end_io · 6712ecf8
      NeilBrown 提交于
      As bi_end_io is only called once when the reqeust is complete,
      the 'size' argument is now redundant.  Remove it.
      
      Now there is no need for bio_endio to subtract the size completed
      from bi_size.  So don't do that either.
      
      While we are at it, change bi_end_io to return void.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      6712ecf8
    • N
      Don't decrement bi_size in bio_endio · 5bb23a68
      NeilBrown 提交于
      The only caller of bio_endio that does not pass the full bi_size
      is end_that_request_first.  Also, no ->bi_end_io method is really
      interested in bi_size being decremented.
      
      So move the decrement and related code into ll_rw_blk and merge it
      with order_bio_endio to form req_bio_endio which does endio functionality
      specific to request completion.
      
      As some ->bi_end_io methods do check bi_size of 0, we set it thus for
      now, but that will go in the next patch.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      
      ### Diffstat output
       ./block/ll_rw_blk.c |   42 +++++++++++++++++++++++++++---------------
       ./fs/bio.c          |   23 +++++++++++------------
       2 files changed, 38 insertions(+), 27 deletions(-)
      
      diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5bb23a68
    • N
      Only call bi_end_io once for any bio · 9cc54d40
      NeilBrown 提交于
      Currently bi_end_io can be called multiple times as sub-requests
      complete.  However no ->bi_end_io function wants to know about that.
      So only call when the bio is complete.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      
      ### Diffstat output
       ./fs/bio.c |    4 +++-
       1 file changed, 3 insertions(+), 1 deletion(-)
      
      diff .prev/fs/bio.c ./fs/bio.c
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      9cc54d40
  3. 24 7月, 2007 1 次提交
  4. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  5. 10 7月, 2007 1 次提交
  6. 08 5月, 2007 1 次提交
  7. 30 4月, 2007 1 次提交
    • J
      [BLOCK] Don't pin lots of memory in mempools · 5972511b
      Jens Axboe 提交于
      Currently we scale the mempool sizes depending on memory installed
      in the machine, except for the bio pool itself which sits at a fixed
      256 entry pre-allocation.
      
      There's really no point in "optimizing" this OOM path, we just need
      enough preallocated to make progress. A single unit is enough, lets
      scale it down to 2 just to be on the safe side.
      
      This patch saves ~150kb of pinned kernel memory on a 32-bit box.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5972511b
  8. 14 12月, 2006 1 次提交
    • C
      [PATCH] optimize o_direct on block devices · e61c9018
      Chen, Kenneth W 提交于
      Implement block device specific .direct_IO method instead of going through
      generic direct_io_worker for block device.
      
      direct_io_worker() is fairly complex because it needs to handle O_DIRECT on
      file system, where it needs to perform block allocation, hole detection,
      extents file on write, and tons of other corner cases.  The end result is
      that it takes tons of CPU time to submit an I/O.
      
      For block device, the block allocation is much simpler and a tight triple
      loop can be written to iterate each iovec and each page within the iovec in
      order to construct/prepare bio structure and then subsequently submit it to
      the block layer.  This significantly speeds up O_D on block device.
      
      [akpm@osdl.org: small speedup]
      Signed-off-by: NKen Chen <kenneth.w.chen@intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Zach Brown <zach.brown@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e61c9018
  9. 08 12月, 2006 1 次提交
  10. 01 12月, 2006 2 次提交
  11. 22 11月, 2006 1 次提交
    • D
      WorkStruct: Pass the work_struct pointer instead of context data · 65f27f38
      David Howells 提交于
      Pass the work_struct pointer to the work function rather than context data.
      The work function can use container_of() to work out the data.
      
      For the cases where the container of the work_struct may go away the moment the
      pending bit is cleared, it is made possible to defer the release of the
      structure by deferring the clearing of the pending bit.
      
      To make this work, an extra flag is introduced into the management side of the
      work_struct.  This governs auto-release of the structure upon execution.
      
      Ordinarily, the work queue executor would release the work_struct for further
      scheduling or deallocation by clearing the pending bit prior to jumping to the
      work function.  This means that, unless the driver makes some guarantee itself
      that the work_struct won't go away, the work function may not access anything
      else in the work_struct or its container lest they be deallocated..  This is a
      problem if the auxiliary data is taken away (as done by the last patch).
      
      However, if the pending bit is *not* cleared before jumping to the work
      function, then the work function *may* access the work_struct and its container
      with no problems.  But then the work function must itself release the
      work_struct by calling work_release().
      
      In most cases, automatic release is fine, so this is the default.  Special
      initiators exist for the non-auto-release case (ending in _NAR).
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      65f27f38
  12. 12 10月, 2006 1 次提交
    • A
      [PATCH] fs/bio.c: tweaks · bf02c082
      Andreas Mohr 提交于
      - Calculate a variable in bvec_alloc_bs() only once needed, not earlier
        (bio.o down from 18408 to 18376 Bytes, 32 Bytes saved, probably due to
        data locality improvements).
      
      - Init variable idx to silence a gcc warning which already existed in the
        unmodified original base file (bvec_alloc_bs() handles idx correctly, so
        there's no need for the warning):
      
      	fs/bio.c: In function `bio_alloc_bioset':
      	fs/bio.c:169: warning: `idx' may be used uninitialized in this function
      Signed-off-by: NAndreas Mohr <andi@lisas.de>
      Acked-by: NJens Axboe <axboe@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bf02c082
  13. 01 10月, 2006 2 次提交
  14. 18 6月, 2006 1 次提交
  15. 24 5月, 2006 1 次提交
  16. 27 3月, 2006 3 次提交
  17. 26 3月, 2006 1 次提交
  18. 24 3月, 2006 1 次提交
  19. 23 3月, 2006 1 次提交
  20. 31 1月, 2006 1 次提交
  21. 15 1月, 2006 1 次提交
  22. 09 1月, 2006 1 次提交
  23. 06 1月, 2006 1 次提交
  24. 16 12月, 2005 1 次提交
    • M
      [SCSI] seperate max_sectors from max_hw_sectors · defd94b7
      Mike Christie 提交于
      - export __blk_put_request and blk_execute_rq_nowait
      needed for async REQ_BLOCK_PC requests
      - seperate max_hw_sectors and max_sectors for block/scsi_ioctl.c and
      SG_IO bio.c helpers per Jens's last comments. Since block/scsi_ioctl.c SG_IO was
      already testing against max_sectors and SCSI-ml was setting max_sectors and
      max_hw_sectors to the same value this does not change any scsi SG_IO behavior. It only
      prepares ll_rw_blk.c, scsi_ioctl.c and bio.c for when SCSI-ml begins to set
      a valid max_hw_sectors for all LLDs. Today if a LLD does not set it
      SCSI-ml sets it to a safe default and some LLDs set it to a artificial low
      value to overcome memory and feedback issues.
      
      Note: Since we now cap max_sectors to BLK_DEF_MAX_SECTORS, which is 1024,
      drivers that used to call blk_queue_max_sectors with a large value of
      max_sectors will now see the fs requests capped to BLK_DEF_MAX_SECTORS.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      defd94b7
  25. 15 12月, 2005 1 次提交
    • M
      [SCSI] Convert SCSI mid-layer to scsi_execute_async · 6e68af66
      Mike Christie 提交于
      Add scsi helpers to create really-large-requests and convert
      scsi-ml to scsi_execute_async().
      
      Per Jens's previous comments, I placed this function in scsi_lib.c.
      I made it follow all the queue's limits - I think I did at least :), so
      I removed the warning on the function header.
      
      I think the scsi_execute_* functions should eventually take a request_queue
      and be placed some place where the dm-multipath hw_handler can use them
      if that failover code is going to stay in the kernel. That conversion
      patch will be sent in another mail though.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6e68af66
  26. 28 10月, 2005 1 次提交
    • A
      [PATCH] gfp_t: fs/* · 27496a8c
      Al Viro 提交于
       - ->releasepage() annotated (s/int/gfp_t), instances updated
       - missing gfp_t in fs/* added
       - fixed misannotation from the original sweep caught by bitwise checks:
         XFS used __nocast both for gfp_t and for flags used by XFS allocator.
         The latter left with unsigned int __nocast; we might want to add a
         different type for those but for now let's leave them alone.  That,
         BTW, is a case when __nocast use had been actively confusing - it had
         been used in the same code for two different and similar types, with
         no way to catch misuses.  Switch of gfp_t to bitwise had caught that
         immediately...
      
      One tricky bit is left alone to be dealt with later - mapping->flags is
      a mix of gfp_t and error indications.  Left alone for now.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      27496a8c
  27. 09 10月, 2005 1 次提交
  28. 10 9月, 2005 1 次提交
  29. 08 9月, 2005 1 次提交
  30. 08 8月, 2005 1 次提交
  31. 28 7月, 2005 1 次提交
  32. 08 7月, 2005 1 次提交
  33. 20 6月, 2005 1 次提交