1. 27 6月, 2011 2 次提交
  2. 13 6月, 2011 1 次提交
  3. 06 6月, 2011 1 次提交
  4. 02 6月, 2011 1 次提交
  5. 01 6月, 2011 1 次提交
  6. 24 5月, 2011 4 次提交
  7. 23 5月, 2011 1 次提交
  8. 21 5月, 2011 4 次提交
    • V
      blk-throttle: Make dispatch stats per cpu · 5624a4e4
      Vivek Goyal 提交于
      Currently we take blkg_stat lock for even updating the stats. So even if
      a group has no throttling rules (common case for root group), we end
      up taking blkg_lock, for updating the stats.
      
      Make dispatch stats per cpu so that these can be updated without taking
      blkg lock.
      
      If cpu goes offline, these stats simply disappear. No protection has
      been provided for that yet. Do we really need anything for that?
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      5624a4e4
    • V
      blk-cgroup: Allow sleeping while dynamically allocating a group · f469a7b4
      Vivek Goyal 提交于
      Currently, all the cfq_group or throtl_group allocations happen while
      we are holding ->queue_lock and sleeping is not allowed.
      
      Soon, we will move to per cpu stats and also need to allocate the
      per group stats. As one can not call alloc_percpu() from atomic
      context as it can sleep, we need to drop ->queue_lock, allocate the
      group, retake the lock and continue processing.
      
      In throttling code, I check the queue DEAD flag again to make sure
      that driver did not call blk_cleanup_queue() in the mean time.
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      f469a7b4
    • V
      cfq-iosched: Fix a possible race with cfq cgroup removal code · 56edf7d7
      Vivek Goyal 提交于
      blkg->key = cfqd is an rcu protected pointer and hence we used to do
      call_rcu(cfqd->rcu_head) to free up cfqd after one rcu grace period.
      
      The problem here is that even though cfqd is around, there are no
      gurantees that associated request queue (td->queue) or q->queue_lock
      is still around. A driver might have called blk_cleanup_queue() and
      release the lock.
      
      It might happen that after freeing up the lock we call
      blkg->key->queue->queue_ock and crash. This is possible in following
      path.
      
      blkiocg_destroy()
       blkio_unlink_group_fn()
        cfq_unlink_blkio_group()
      
      Hence, wait for an rcu peirod if there are groups which have not
      been unlinked from blkcg->blkg_list. That way, if there are any groups
      which are taking cfq_unlink_blkio_group() path, can safely take queue
      lock.
      
      This is how we have taken care of race in throttling logic also.
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      56edf7d7
    • V
      cfq-iosched: Get rid of redundant function parameter "create" · 3e59cf9d
      Vivek Goyal 提交于
      Nobody seems to be using cfq_find_alloc_cfqg() function parameter "create".
      Get rid of that.
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      3e59cf9d
  9. 16 5月, 2011 1 次提交
    • V
      blk-throttle: Use task_subsys_state() to determine a task's blkio_cgroup · 70087dc3
      Vivek Goyal 提交于
      Currentlly we first map the task to cgroup and then cgroup to
      blkio_cgroup. There is a more direct way to get to blkio_cgroup
      from task using task_subsys_state(). Use that.
      
      The real reason for the fix is that it also avoids a race in generic
      cgroup code. During remount/umount rebind_subsystems() is called and
      it can do following with and rcu protection.
      
      cgrp->subsys[i] = NULL;
      
      That means if somebody got hold of cgroup under rcu and then it tried
      to do cgroup->subsys[] to get to blkio_cgroup, it would get NULL which
      is wrong. I was running into this race condition with ltp running on a
      upstream derived kernel and that lead to crash.
      
      So ideally we should also fix cgroup generic code to wait for rcu
      grace period before setting pointer to NULL. Li Zefan is not very keen
      on introducing synchronize_wait() as he thinks it will slow
      down moun/remount/umount operations.
      
      So for the time being atleast fix the kernel crash by taking a more
      direct route to blkio_cgroup.
      
      One tester had reported a crash while running LTP on a derived kernel
      and with this fix crash is no more seen while the test has been
      running for over 6 days.
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Reviewed-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      70087dc3
  10. 19 4月, 2011 1 次提交
  11. 18 4月, 2011 1 次提交
  12. 31 3月, 2011 1 次提交
  13. 23 3月, 2011 3 次提交
  14. 17 3月, 2011 1 次提交
  15. 12 3月, 2011 1 次提交
  16. 10 3月, 2011 1 次提交
  17. 07 3月, 2011 3 次提交
  18. 02 3月, 2011 2 次提交
    • T
      block: add @force_kblockd to __blk_run_queue() · 1654e741
      Tejun Heo 提交于
      __blk_run_queue() automatically either calls q->request_fn() directly
      or schedules kblockd depending on whether the function is recursed.
      blk-flush implementation needs to be able to explicitly choose
      kblockd.  Add @force_kblockd.
      
      All the current users are converted to specify %false for the
      parameter and this patch doesn't introduce any behavior change.
      
      stable: This is prerequisite for fixing ide oops caused by the new
              blk-flush implementation.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jan Beulich <JBeulich@novell.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: stable@kernel.org
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      1654e741
    • J
      cfq-iosched: Always provide group isolation. · 0bbfeb83
      Justin TerAvest 提交于
      Effectively, make group_isolation=1 the default and remove the tunable.
      The setting group_isolation=0 was because by default we idle on
      sync-noidle tree and on fast devices, this can be very harmful for
      throughput.
      
      However, this problem can also be addressed by tuning slice_idle and
      possibly group_idle on faster storage devices.
      
      This change simplifies the CFQ code by removing the feature entirely.
      Signed-off-by: NJustin TerAvest <teravest@google.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      0bbfeb83
  19. 11 2月, 2011 1 次提交
  20. 09 2月, 2011 1 次提交
    • J
      cfq-iosched: Don't wait if queue already has requests. · 02a8f01b
      Justin TerAvest 提交于
      Commit 7667aa06 added logic to wait for
      the last queue of the group to become busy (have at least one request),
      so that the group does not lose out for not being continuously
      backlogged. The commit did not check for the condition that the last
      queue already has some requests. As a result, if the queue already has
      requests, wait_busy is set. Later on, cfq_select_queue() checks the
      flag, and decides that since the queue has a request now and wait_busy
      is set, the queue is expired.  This results in early expiration of the
      queue.
      
      This patch fixes the problem by adding a check to see if queue already
      has requests. If it does, wait_busy is not set. As a result, time slices
      do not expire early.
      
      The queues with more than one request are usually buffered writers.
      Testing shows improvement in isolation between buffered writers.
      
      Cc: stable@kernel.org
      Signed-off-by: NJustin TerAvest <teravest@google.com>
      Reviewed-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      02a8f01b
  21. 19 1月, 2011 1 次提交
  22. 14 1月, 2011 2 次提交
  23. 07 1月, 2011 2 次提交
  24. 17 12月, 2010 1 次提交
  25. 13 12月, 2010 1 次提交
  26. 01 12月, 2010 1 次提交