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

erasure-code: jerasure upgrade #2299

Merged
9 commits merged into from Aug 28, 2014
Merged

erasure-code: jerasure upgrade #2299

9 commits merged into from Aug 28, 2014

Conversation

ghost
Copy link

@ghost ghost commented Aug 21, 2014

@ghost
Copy link
Author

ghost commented Aug 22, 2014

@majianpeng do you have time to review this patch ?

@liewegas
Copy link
Member

Not sure about preloading non-default variants, but other than that this looks good to me!

@liewegas
Copy link
Member

Reviewed-by:

Loic Dachary added 9 commits August 28, 2014 11:09
But only do so when it has been compiled because a recent enough yasm
has been found.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
The prototype of the init functions of erasure coded plugins is changed
from

   int __erasure_code_init(char *plugin_name)

to

   int __erasure_code_init(char *plugin_name, char *directory)

The jerasure plugin will find optimized variants in this directory and
load them. The load() and preload() functions of
ErasureCodePluginRegistry only use a directory instead of a more generic
parameters map. The parameters map was only used for the directory entry
anyway.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
The variant selection depending on the available CPU features is
encapsulated in a helper. The helper is used in the factory() method and
in the load() method.

The factory() method may load a variant that is not the default, for
benchmark purposes. Such a variant is not preloaded by the load() method
and upgrading while running may be problematic. However, running with a
non standard variant is used for benchmarking and upgrades in this
context are not a concern.

http://tracker.ceph.com/issues/9153 Fixes: #9153

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Which is symmetric to the add method and used for test.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Add the __erasure_code_version function to all plugins, to return the
Ceph version against which they have been compiled. When a plugin is
loaded, an error is thrown if the version of the plugin does not match
the version of the daemon loading it.

If the symbol does not exist, which will be true of older plugins, set
the version to "an older version" so it never matches.

http://tracker.ceph.com/issues/9167 Fixes: #9167

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Add lock to the preload method and assert that it is held by methods
requiring it. Although preload is called at bootstrap and does not
require the lock, adding it does not hurt and makes the lock policy
clearer to understand.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
@ghost
Copy link
Author

ghost commented Aug 28, 2014

repushed with https://github.com/dachary/ceph/commit/efc8bfd112dcffa02b25a361147945330c2d881e only loading the variant that is going to be used by default

ghost pushed a commit that referenced this pull request Aug 28, 2014
erasure-code: jerasure upgrade

Reviewed-by: Sage Weil <sage@redhat.com>
@ghost ghost merged commit c7da395 into ceph:master Aug 28, 2014
@ghost
Copy link
Author

ghost commented Aug 28, 2014

merged after checking gitbuilder was happy with the change

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant