Skip to content
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

Merged
merged 10 commits into from Oct 4, 2016

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Oct 3, 2016

...and a bunch of other stuff, including instrumenting cache onodes, extents, blobs, buffers, bytes.

@ifed01
Copy link
Contributor

ifed01 commented Oct 3, 2016

Wondering if
shared_blob_set(MAX(16,
g_conf->bluestore_onode_cache_size *
g_conf->bluestore_shared_blob_hash_table_size_ratio)),
should be fixed as well?

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>
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>
/// ctor for lookup only
explicit Extent(uint32_t lo) : logical_offset(lo) { }
/// ctor for delayed intitialization (see decode_some())
explicit Extent(Cache *cache) {
Copy link
Contributor

@ifed01 ifed01 Oct 4, 2016

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;
Copy link
Contributor

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?

More explicit, less error-prone.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit 9670719 into ceph:master Oct 4, 2016
@liewegas liewegas deleted the wip-bluestore-cache branch October 4, 2016 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants