1. 31 Jan, 2017 9 commits
  2. 27 Jan, 2017 19 commits
  3. 26 Jan, 2017 2 commits
  4. 25 Jan, 2017 1 commit
  5. 23 Jan, 2017 3 commits
    • Markus Elfring's avatar
      cfq-iosched: Adjust one function call together with a variable assignment · 1cf41753
      Markus Elfring authored
      The script "checkpatch.pl" pointed information out like the following.
      
      ERROR: do not use assignment in if condition
      
      Thus fix the affected source code place.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      1cf41753
    • Markus Elfring's avatar
      blk-throttle: Adjust two function calls together with a variable assignment · d609af3a
      Markus Elfring authored
      The script "checkpatch.pl" pointed information out like the following.
      
      ERROR: do not use assignment in if condition
      
      Thus fix the affected source code places.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      d609af3a
    • Alexander Potapenko's avatar
      block: Initialize cfqq->ioprio_class in cfq_get_queue() · 4d608baa
      Alexander Potapenko authored
      KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of
      uninitialized memory in cfq_init_cfqq():
      
      ==================================================================
      BUG: KMSAN: use of unitialized memory
      ...
      Call Trace:
       [<     inline     >] __dump_stack lib/dump_stack.c:15
       [<ffffffff8202ac97>] dump_stack+0x157/0x1d0 lib/dump_stack.c:51
       [<ffffffff813e9b65>] kmsan_report+0x205/0x360 ??:?
       [<ffffffff813eabbb>] __msan_warning+0x5b/0xb0 ??:?
       [<     inline     >] cfq_init_cfqq block/cfq-iosched.c:3754
       [<ffffffff8201e110>] cfq_get_queue+0xc80/0x14d0 block/cfq-iosched.c:3857
      ...
      origin:
       [<ffffffff8103ab37>] save_stack_trace+0x27/0x50 arch/x86/kernel/stacktrace.c:67
       [<ffffffff813e836b>] kmsan_internal_poison_shadow+0xab/0x150 ??:?
       [<ffffffff813e88ab>] kmsan_poison_slab+0xbb/0x120 ??:?
       [<     inline     >] allocate_slab mm/slub.c:1627
       [<ffffffff813e533f>] new_slab+0x3af/0x4b0 mm/slub.c:1641
       [<     inline     >] new_slab_objects mm/slub.c:2407
       [<ffffffff813e0ef3>] ___slab_alloc+0x323/0x4a0 mm/slub.c:2564
       [<     inline     >] __slab_alloc mm/slub.c:2606
       [<     inline     >] slab_alloc_node mm/slub.c:2669
       [<ffffffff813dfb42>] kmem_cache_alloc_node+0x1d2/0x1f0 mm/slub.c:2746
       [<ffffffff8201d90d>] cfq_get_queue+0x47d/0x14d0 block/cfq-iosched.c:3850
      ...
      ==================================================================
      (the line numbers are relative to 4.8-rc6, but the bug persists
      upstream)
      
      The uninitialized struct cfq_queue is created by kmem_cache_alloc_node()
      and then passed to cfq_init_cfqq(), which accesses cfqq->ioprio_class
      before it's initialized.
      Signed-off-by: default avatarAlexander Potapenko <glider@google.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      4d608baa
  6. 20 Jan, 2017 1 commit
    • Jens Axboe's avatar
      blk-mq: allow resize of scheduler requests · 70f36b60
      Jens Axboe authored
      Add support for growing the tags associated with a hardware queue, for
      the scheduler tags. Currently we only support resizing within the
      limits of the original depth, change that so we can grow it as well by
      allocating and replacing the existing scheduler tag set.
      
      This is similar to how we could increase the software queue depth with
      the legacy IO stack and schedulers.
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
      70f36b60
  7. 19 Jan, 2017 3 commits
  8. 18 Jan, 2017 2 commits
    • Jens Axboe's avatar
      blk-cgroup: don't quiesce the queue on policy activate/deactivate · 38dbb7dd
      Jens Axboe authored
      There's no potential harm in quiescing the queue, but it also doesn't
      buy us anything. And we can't run the queue async for policy
      deactivate, since we could be in the path of tearing the queue down.
      If we schedule an async run of the queue at that time, we're racing
      with queue teardown AFTER having we've already torn most of it down.
      Reported-by: default avatarOmar Sandoval <osandov@fb.com>
      Fixes: 4d199c6f ("blk-cgroup: ensure that we clear the stop bit on quiesced queues")
      Tested-by: default avatarOmar Sandoval <osandov@fb.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      38dbb7dd
    • Omar Sandoval's avatar
      sbitmap: fix wakeup hang after sbq resize · 6c0ca7ae
      Omar Sandoval authored
      When we resize a struct sbitmap_queue, we update the wakeup batch size,
      but we don't update the wait count in the struct sbq_wait_states. If we
      resized down from a size which could use a bigger batch size, these
      counts could be too large and cause us to miss necessary wakeups. To fix
      this, update the wait counts when we resize (ensuring some careful
      memory ordering so that it's safe w.r.t. concurrent clears).
      
      This also fixes a theoretical issue where two threads could end up
      bumping the wait count up by the batch size, which could also
      potentially lead to hangs.
      Reported-by: default avatarMartin Raiber <martin@urbackup.org>
      Fixes: e3a2b3f9 ("blk-mq: allow changing of queue depth through sysfs")
      Fixes: 2971c35f ("blk-mq: bitmap tag: fix race on blk_mq_bitmap_tags::wake_cnt")
      Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      6c0ca7ae