1. 01 Jun, 2018 3 commits
  2. 31 May, 2018 8 commits
    • Davide Sapienza's avatar
      block, bfq: prevent soft_rt_next_start from being stuck at infinity · f6c3ca0e
      Davide Sapienza authored
      BFQ can deem a bfq_queue as soft real-time only if the queue
      - periodically becomes completely idle, i.e., empty and with
        no still-outstanding I/O request;
      - after becoming idle, gets new I/O only after a special reference
        time soft_rt_next_start.
      
      In this respect, after commit "block, bfq: consider also past I/O in
      soft real-time detection", the value of soft_rt_next_start can never
      decrease. This causes a problem with the following special updating
      case for soft_rt_next_start: to prevent queues that are not completely
      idle to be wrongly detected as soft real-time (when they become
      non-empty again), soft_rt_next_start is temporarily set to infinity
      for empty queues with still outstanding I/O requests. But, if such an
      update is actually performed, then, because of the above commit,
      soft_rt_next_start will be stuck at infinity forever, and the queue
      will have no more chance to be considered soft real-time.
      
      On slow systems, this problem does cause actual soft real-time
      applications to be occasionally not detected as such.
      
      This commit addresses this issue by eliminating the pushing of
      soft_rt_next_start to infinity, and by changing the way non-empty
      queues are prevented from being wrongly detected as soft
      real-time. Simply, a queue that becomes non-empty again can now be
      detected as soft real-time only if it has no outstanding I/O request.
      Signed-off-by: default avatarDavide Sapienza <sapienza.dav@gmail.com>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f6c3ca0e
    • Davide Sapienza's avatar
      block, bfq: increase weight-raising duration for interactive apps · d450542e
      Davide Sapienza authored
      The maximum possible duration of the weight-raising period for
      interactive applications is limited to 13 seconds, as this is the time
      needed to load the largest application that we considered when tuning
      weight raising. Unfortunately, in such an evaluation, we did not
      consider the case of very slow virtual machines.
      
      For example, on a QEMU/KVM virtual machine
      - running in a slow PC;
      - with a virtual disk stacked on a slow low-end 5400rpm HDD;
      - serving a heavy I/O workload, such as the sequential reading of
      several files;
      mplayer takes 23 seconds to start, if constantly weight-raised.
      
      To address this issue, this commit conservatively sets the upper limit
      for weight-raising duration to 25 seconds.
      Signed-off-by: default avatarDavide Sapienza <sapienza.dav@gmail.com>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d450542e
    • Paolo Valente's avatar
      block, bfq: remove slow-system class · e24f1c24
      Paolo Valente authored
      BFQ computes the duration of weight raising for interactive
      applications automatically, using some reference parameters. In
      particular, BFQ uses the best durations (see comments in the code for
      how these durations have been assessed) for two classes of systems:
      slow and fast ones. Examples of slow systems are old phones or systems
      using micro HDDs. Fast systems are all the remaining ones. Using these
      parameters, BFQ computes the actual duration of the weight raising,
      for the system at hand, as a function of the relative speed of the
      system w.r.t. the speed of a reference system, belonging to the same
      class of systems as the system at hand.
      
      This slow vs fast differentiation proved to be useful in the past, but
      happens to have little meaning with current hardware. Even worse, it
      does cause problems in virtual systems, where the speed of the system
      can vary frequently, and so widely to just confuse the class-detection
      mechanism, and, as we have verified experimentally, to cause BFQ to
      compute non-sensical weight-raising durations.
      
      This commit addresses this issue by removing the slow class and the
      class-detection mechanism.
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      e24f1c24
    • Paolo Valente's avatar
      block, bfq: add description of weight-raising heuristics · 4029eef1
      Paolo Valente authored
      A description of how weight raising works is missing in BFQ
      sources. In addition, the code for handling weight raising is
      scattered across a few functions. This makes it rather hard to
      understand the mechanism and its rationale. This commits adds such a
      description at the beginning of the main source file.
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      4029eef1
    • Filippo Muzzini's avatar
      block, bfq: remove the removal of 'next' rq in bfq_requests_merged · ac857e0d
      Filippo Muzzini authored
      Since bfq_finish_request() is always called on the request 'next',
      after bfq_requests_merged() is finished, and bfq_finish_request()
      removes 'next' from its bfq_queue if needed, it isn't necessary to do
      such a removal in advance in bfq_merged_requests().
      
      This commit removes such a useless 'next' removal.
      Signed-off-by: default avatarFilippo Muzzini <filippo.muzzini@outlook.it>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      ac857e0d
    • Paolo Valente's avatar
      block, bfq: remove wrong check in bfq_requests_merged · 8abfa4d6
      Paolo Valente authored
      The request rq passed to the function bfq_requests_merged is always in
      a bfq_queue, so the check !RB_EMPTY_NODE(&rq->rb_node) at the
      beginning of bfq_requests_merged always succeeds, and the control
      flow systematically skips to the end of the function.  This implies
      that the body of the function is never executed, i.e., the
      repositioning of rq is never performed.
      
      On the opposite end, a control is missing in the body of the function:
      'next' must be removed only if it is inside a bfq_queue.
      
      This commit removes the wrong check on rq, and adds the missing check
      on 'next'. In addition, this commit adds comments on
      bfq_requests_merged.
      Signed-off-by: default avatarFilippo Muzzini <filippo.muzzini@outlook.it>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8abfa4d6
    • Filippo Muzzini's avatar
      block, bfq: remove wrong lock in bfq_requests_merged · a12bffeb
      Filippo Muzzini authored
      In bfq_requests_merged(), there is a deadlock because the lock on
      bfqq->bfqd->lock is held by the calling function, but the code of
      this function tries to grab the lock again.
      
      This deadlock is currently hidden by another bug (fixed by next commit
      for this source file), which causes the body of bfq_requests_merged()
      to be never executed.
      
      This commit removes the deadlock by removing the lock/unlock pair.
      Signed-off-by: default avatarFilippo Muzzini <filippo.muzzini@outlook.it>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      a12bffeb
    • Jens Axboe's avatar
      block: fixup bioset_integrity_create() call · 04c4950d
      Jens Axboe authored
      Missed converting the bioset_integrity_create() bounce bio set
      call.
      
      Fixes: 338aa96d ("block: convert bounce, q->bio_split to bioset_init()/mempool_init()")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      04c4950d
  3. 30 May, 2018 18 commits
  4. 29 May, 2018 11 commits