1. 28 6月, 2005 3 次提交
    • J
      [PATCH] CFQ io scheduler updates · 3b18152c
      Jens Axboe 提交于
      - Adjust slice values
      
      - Instead of one async queue, one is defined per priority level. This
        prevents kernel threads (such as reiserfs/x and others) that run at
        higher io priority from conflicting with others. Previously, it was a
        coin toss what io prio the async queue got, it was defined by who
        first set up the queue.
      
      - Let a time slice only begin, when the previous slice is completely
        done. Previously we could be somewhat unfair to a new sync slice, if
        the previous slice was async and had several ios queued. This might
        need a little tweaking if throughput suffers a little due to this,
        allowing perhaps an overlap of a single request or so.
      
      - Optimize the calling of kblockd_schedule_work() by doing it only when
        it is strictly necessary (no requests in driver and work left to do).
      
      - Correct sync vs async logic. A 'normal' process can be purely async as
        well, and a flusher can be purely sync as well. Sync or async is now a
        property of the class defined and requests pending. Previously writers
        could be considered sync, when they were really async.
      
      - Get rid of the bit fields in cfqq and crq, use flags instead.
      
      - Various other cleanups and fixes
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3b18152c
    • J
      [PATCH] Fix cfq_find_next_crq() · 3d25f356
      Jens Axboe 提交于
      In cfq_find_next_crq(), cfq tries to find the next request by choosing
      one of two requests before and after the current one.  Currently, when
      choosing the next request, if there's no next request, the next
      candidate is NULL, resulting in selection of the previous request.  This
      results in weird scheduling.  Once we reach the end, we always seek
      backward.
      
      The correct behavior is using the first request as the next candidate.
      cfq_choose_req() already has logics for handling wrapped requests.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3d25f356
    • J
      [PATCH] Update cfq io scheduler to time sliced design · 22e2c507
      Jens Axboe 提交于
      This updates the CFQ io scheduler to the new time sliced design (cfq
      v3).  It provides full process fairness, while giving excellent
      aggregate system throughput even for many competing processes.  It
      supports io priorities, either inherited from the cpu nice value or set
      directly with the ioprio_get/set syscalls.  The latter closely mimic
      set/getpriority.
      
      This import is based on my latest from -mm.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      22e2c507
  2. 26 6月, 2005 3 次提交
  3. 24 6月, 2005 12 次提交
  4. 21 6月, 2005 3 次提交
  5. 17 6月, 2005 1 次提交
    • K
      When cfq I/O scheduler is selected, get_request() in __make_request() calls · db3b5848
      Kiyoshi Ueda 提交于
      __cfq_get_queue().  __cfq_get_queue() finds an existing queue (struct
      cfq_queue) of the current process for the device and returns it.  If it's not
      found, __cfq_get_queue() creates and returns a new one if __cfq_get_queue() is
      called with __GFP_WAIT flag, or __cfq_get_queue() returns NULL (this means that
      get_request() fails) if no __GFP_WAIT flag.
      
      On the other hand, in __make_request(), get_request() is called without
      __GFP_WAIT flag at the first time.  Thus, the get_request() fails when there is
      no existing queue, typically when it's called for the first I/O request of the
      process to the device.
      
      Though it will be followed by get_request_wait() for general case,
      __make_request() will just end the I/O with an error (EWOULDBLOCK) when the
      request was for read-ahead.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NKiyoshi Ueda <k-ueda@ct.jp.nec.com>
      Signed-off-by: NJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      db3b5848
  6. 16 6月, 2005 2 次提交
  7. 12 6月, 2005 1 次提交
  8. 09 6月, 2005 1 次提交
  9. 03 6月, 2005 1 次提交
  10. 21 5月, 2005 3 次提交
  11. 17 5月, 2005 3 次提交
    • P
      [PATCH] CDRW/DVD packet writing data corruption fix · 7baeb6a5
      Peter Osterlund 提交于
      I found a bug in the packet writing driver that could cause data
      corruption.  The problem arised if the driver got a write request for a
      sector in a "zone" it was already working on.  In that case it was supposed
      to queue the write request until it was done processing earlier requests
      for the same zone, and instead work on some other zone in the mean time.
      However, if there was no other zone to work on, the driver would initiate
      two packet_data objects for the same zone, causing unpredictable things to
      happen.
      Signed-off-by: NPeter Osterlund <petero2@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7baeb6a5
    • P
      [PATCH] Fix root hole in pktcdvd · 118326e9
      Peter Osterlund 提交于
      ioctl_by_bdev may only be used INSIDE the kernel.  If the "arg" argument
      refers to memory that is accessed by put_user/get_user in the ioctl
      function, the memory needs to be in the kernel address space (that's the
      set_fs(KERNEL_DS) doing in the ioctl_by_bdev).  This works on i386 because
      even with set_fs(KERNEL_DS) the user space memory is still accessible with
      put_user/get_user.  That is not true for s390.  In short the ioctl
      implementation of the pktcdvd device driver is horribly broken.
      Signed-off-by: NPeter Osterlund <petero2@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      118326e9
    • S
      [PATCH] Fix root hole in raw device · 68f66feb
      Stephen Tweedie 提交于
      [Patch] Fix raw device ioctl pass-through
      
      Raw character devices are supposed to pass ioctls through to the block
      devices they are bound to.  Unfortunately, they are using the wrong
      function for this: ioctl_by_bdev(), instead of blkdev_ioctl().
      
      ioctl_by_bdev() performs a set_fs(KERNEL_DS) before calling the ioctl,
      redirecting the user-space buffer access to the kernel address space.
      This is, needless to say, a bad thing.
      
      This was noticed first on s390, where raw IO was non-functioning.  The
      s390 driver config does not actually allow raw IO to be enabled, which
      was the first part of the problem.  Secondly, the s390 kernel address
      space is distinct from user, causing legal raw ioctls to fail.  I've
      reproduced this on a kernel built with 4G:4G split on x86, which fails
      in the same way (-EFAULT if the address does not exist kernel-side;
      returns success without actually populating the user buffer if it does.)
      
      The patch below fixes both the config and address-space problems.  It's
      based closely on a patch by Jan Glauber <jang@de.ibm.com>, which has
      been tested on s390 at IBM.  I've tested it on x86 4G:4G (split address
      space) and x86_64 (common address space).
      
      Kernel-address-space access has been assigned CAN-2005-1264.
      Signed-off-by: NStephen Tweedie <sct@redhat.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      68f66feb
  12. 07 5月, 2005 1 次提交
  13. 06 5月, 2005 3 次提交
  14. 04 5月, 2005 3 次提交