New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os/bluestore: make cache settings process-wide #11295
Conversation
Wondering if |
Divide by the shard count so that the user isn't totally confused. Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Onodes, buffers, buffer bytes. Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
4a5da2e
to
4802e96
Compare
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
4802e96
to
0118293
Compare
/// ctor for lookup only | ||
explicit Extent(uint32_t lo) : logical_offset(lo) { } | ||
/// ctor for delayed intitialization (see decode_some()) | ||
explicit Extent(Cache *cache) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO specific blob assignment method that also increments cache counter(s) is more transparent and error prone, e.g.
void Extent::assign_blob(BlobRef b) {
if(blob) blob->shared_blob->bc.cache->rm_extent();
blob = b;
if( blob ) blob->shared_blob->bc.cache->add_extent();
}
} | ||
~Extent() { | ||
if (blob) { | ||
blob->shared_blob->bc.cache->rm_extent(); | ||
} | ||
} | ||
|
||
void assign_blob(const BlobRef& b) { | ||
blob = b; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert(!blob) here to catch if someday we call assign_blob twice for some reason?
c96a473
to
da7ab00
Compare
More explicit, less error-prone. Signed-off-by: Sage Weil <sage@redhat.com>
da7ab00
to
304a3b1
Compare
Signed-off-by: Sage Weil <sage@redhat.com>
...and a bunch of other stuff, including instrumenting cache onodes, extents, blobs, buffers, bytes.