]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #24214 from iridescent-rsy/bursting_io
authorJason Dillaman <dillaman@redhat.com>
Sat, 10 Nov 2018 00:53:55 +0000 (19:53 -0500)
committerGitHub <noreply@github.com>
Sat, 10 Nov 2018 00:53:55 +0000 (19:53 -0500)
librbd: reduce the TokenBucket fill cycle and support bursting io configuration

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
1  2 
src/common/Throttle.cc
src/common/Throttle.h
src/common/options.cc

index 0d24acc0ee4fc37ca4c75bd3870629470532af57,8e026bfdb9f199dba59fffbdaf2e5595777d2e18..f3a3bd02f9b843380d686b3107ee038be5149ae5
@@@ -741,15 -796,15 +796,15 @@@ void TokenBucketThrottle::add_tokens() 
      // check the m_blockers from head to tail, if blocker can get
      // enough tokens, let it go.
      while (!m_blockers.empty()) {
 -      Blocker blocker = m_blockers.front();
 +      Blocker &blocker = m_blockers.front();
        uint64_t got = m_throttle.get(blocker.tokens_requested);
        if (got == blocker.tokens_requested) {
-       // got enough tokens for front.
-       tmp_blockers.splice(tmp_blockers.end(), m_blockers, m_blockers.begin());
+         // got enough tokens for front.
+         tmp_blockers.splice(tmp_blockers.end(), m_blockers, m_blockers.begin());
        } else {
-       // there is no more tokens.
-       blocker.tokens_requested -= got;
-       break;
+         // there is no more tokens.
+         blocker.tokens_requested -= got;
+         break;
        }
      }
    }
Simple merge
Simple merge