1. 28 9月, 2018 6 次提交
    • H
      block: genhd: add 'groups' argument to device_add_disk · fef912bf
      Hannes Reinecke 提交于
      Update device_add_disk() to take an 'groups' argument so that
      individual drivers can register a device with additional sysfs
      attributes.
      This avoids race condition the driver would otherwise have if these
      groups were to be created with sysfs_add_groups().
      Signed-off-by: NMartin Wilck <martin.wilck@suse.com>
      Signed-off-by: NHannes Reinecke <hare@suse.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NBart Van Assche <bvanassche@acm.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      fef912bf
    • O
      kyber: add tracepoints · 6c3b7af1
      Omar Sandoval 提交于
      When debugging Kyber, it's really useful to know what latencies we've
      been having, how the domain depths have been adjusted, and if we've
      actually been throttling. Add three tracepoints, kyber_latency,
      kyber_adjust, and kyber_throttled, to record that.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      6c3b7af1
    • O
      kyber: implement improved heuristics · 6e25cb01
      Omar Sandoval 提交于
      Kyber's current heuristics have a few flaws:
      
      - It's based on the mean latency, but p99 latency tends to be more
        meaningful to anyone who cares about latency. The mean can also be
        skewed by rare outliers that the scheduler can't do anything about.
      - The statistics calculations are purely time-based with a short window.
        This works for steady, high load, but is more sensitive to outliers
        with bursty workloads.
      - It only considers the latency once an I/O has been submitted to the
        device, but the user cares about the time spent in the kernel, as
        well.
      
      These are shortcomings of the generic blk-stat code which doesn't quite
      fit the ideal use case for Kyber. So, this replaces the statistics with
      a histogram used to calculate percentiles of total latency and I/O
      latency, which we then use to adjust depths in a slightly more
      intelligent manner:
      
      - Sync and async writes are now the same domain.
      - Discards are a separate domain.
      - Domain queue depths are scaled by the ratio of the p99 total latency
        to the target latency (e.g., if the p99 latency is double the target
        latency, we will double the queue depth; if the p99 latency is half of
        the target latency, we can halve the queue depth).
      - We use the I/O latency to determine whether we should scale queue
        depths down: we will only scale down if any domain's I/O latency
        exceeds the target latency, which is an indicator of congestion in the
        device.
      
      These new heuristics are just as scalable as the heuristics they
      replace.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      6e25cb01
    • O
      kyber: don't make domain token sbitmap larger than necessary · fa2a1f60
      Omar Sandoval 提交于
      The domain token sbitmaps are currently initialized to the device queue
      depth or 256, whichever is larger, and immediately resized to the
      maximum depth for that domain (256, 128, or 64 for read, write, and
      other, respectively). The sbitmap is never resized larger than that, so
      it's unnecessary to allocate a bitmap larger than the maximum depth.
      Let's just allocate it to the maximum depth to begin with. This will use
      marginally less memory, and more importantly, give us a more appropriate
      number of bits per sbitmap word.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      fa2a1f60
    • O
      block: export blk_stat_enable_accounting() · f8232f29
      Omar Sandoval 提交于
      Kyber will need this in a future change if it is built as a module.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      f8232f29
    • O
      block: move call of scheduler's ->completed_request() hook · ed88660a
      Omar Sandoval 提交于
      Commit 4bc6339a ("block: move blk_stat_add() to
      __blk_mq_end_request()") consolidated some calls using ktime_get() so
      we'd only need to call it once. Kyber's ->completed_request() hook also
      calls ktime_get(), so let's move it to the same place, too.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      ed88660a
  2. 27 9月, 2018 8 次提交
  3. 26 9月, 2018 5 次提交
  4. 25 9月, 2018 9 次提交
  5. 22 9月, 2018 12 次提交