Commit Graph

128 Commits

Author SHA1 Message Date
Kefu Chai
b567261208 cmake: require lz4 v1.7 for building lz4 compressor
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-08-17 16:01:55 +08:00
Boris Ranto
70473011a0 Merge pull request #16753 from ceph/wip-fix-ppc64
Fix ppc64 support for ceph

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-08-14 15:41:28 +02:00
Dan Mick
de06f8e504 cmake/Distutils.cmake: make pkg files optional, add bin
Skip nonexistent 'expected' Python packaging files, and add bin/ as
a possible file for symlinking during build (for Python projects with
slightly different forms, currently ceph-volume)

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2017-08-04 10:25:57 -04:00
Boris Ranto
2172dfb594 Fix ppc64 support for ceph
The ppc64 support requires a couple of changes:
- adding the ppc64 support to cmake
- changing optimized crc32 code to compile on ppc64le only
- moving ifdef condition before crc32_align to avoid defined but not
used warning

Signed-off-by: Boris Ranto <branto@redhat.com>
2017-08-04 10:56:03 +02:00
Ilsoo Byun
8134620ad4 os/bluestore: fix build errors when spdk is on
- remove pthread library link from dpdk cmake
- fix the bugs of NVMEDevice

Signed-off-by: Ilsoo Byun <ilsoo.byun@sk.com>
2017-07-05 01:42:10 -04:00
Kefu Chai
f8d5f74663 cmake: compile libzfs backend conditionally
* do not REQUIRE libzfs if it is enabled, this follows the way how we
  handle `WITH_XFS` option.
* also refactor the cmake script related to libxfs backend support a
  little bit.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-27 23:28:03 +08:00
Kefu Chai
96b2016489 cmake: do not add dependencies to INTERFACE library on cmake < 3.3
otherwise we will have

add_dependencies Cannot add target-level dependencies to INTERFACE
library

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-21 23:34:51 +08:00
Kefu Chai
83432b4461 cmake: build boost as an external project
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-14 23:53:50 +08:00
Sage Weil
c2e346cf12 Merge pull request #15562 from tchaikov/wip-no-assert.h
common,osdc: remove atomic_t completely

Reviewed-by: Sage Weil <sage@redhat.com>
2017-06-08 20:38:23 -05:00
Sage Weil
b0e9f3ed51 Merge pull request #15102 from majianpeng/blockdevice-pmem
os/bluestore/BlockDevice: support pmem device as bluestore backend

Reviewed-by: Sage Weil <sage@redhat.com>
2017-06-08 13:15:52 -05:00
Kefu Chai
a87fa37e46 cmake,debian,rpm: remove atomic_t completely
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-08 12:21:00 +08:00
Jianpeng Ma
e25accff7d os/bluestore/BlockDevice:support pmem device as bluestore backend.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2017-06-07 23:22:52 +08:00
James Page
5d92c79b8e build: misc fixes for cmake build on i386
Scope SIMD CPU flag detection base on target architecture,
resolving build failures in gf-complete on i386; this is
inline with the previous autotools based feature detection.

Only compile crypto/isa-l if yasm 64 bit complier is found,
effectively limiting scope to x86_64.

Signed-off-by: James Page <james.page@ubuntu.com>
2017-06-06 16:34:50 +01:00
Nathan Cutler
4acd2cef35 cmake: align cmake names of library packages
The cmake package names of libraries are case-sensitive. The name used in
FIND_PACKAGE_HANDLE_STANDARD_ARGS - e.g. "cryptopp" - must match the name used
in the module name - "Findcryptopp.cmake" - as well as the name used in
find_package() call - "find_package(cryptopp REQUIRED)"

Note that the term "package" here refers to a cmake abstraction, *not* an
actual RPM or Debian package.

Fixes: http://tracker.ceph.com/issues/19853
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2017-05-04 11:14:43 +02:00
Kefu Chai
4847a88556 cmake: do not try to add submodule to exclude list if .git is not around
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-13 13:49:54 +08:00
Kefu Chai
e1991238e7 cmake: support optional argument for overriding default ctag excludes
so instead of excluding all submodules, one can just exclude boost and
rocksdb using:

  cmake -DCTAG_EXCLUDES="boost;rocksdb" ..

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-07 12:06:52 +08:00
Dan Mick
3681683df7 cmake: Add simple recursive ctags target for Ceph source only
Excludes submodules and random JavaScript.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-06 13:27:12 +08:00
Kefu Chai
195425c9ca cmake: extract ppc64le detection into SIMDExt.cmake
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-03 01:44:17 +08:00
Dan Mick
ac4815f74b cmake/modules/SIMDExt.cmake: armv8 crypto intrinsics
Test not only for -march support, but also the actual
presence of the intrinsic routines.  Not sure why, but gcc
4.8.5 passes the first but not the second.

Fixes: http://tracker.ceph.com/issues/19386
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2017-03-27 09:35:22 -07:00
Dan Mick
ef8980bad2 cmake/modules/SIMDExt.cmake: add whitespace
readability, man, readability

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2017-03-24 20:10:15 -07:00
Kefu Chai
0603794d53 Merge pull request #12977 from weixiaowilliam/crc32c_opt
crc32c: optimize aarch64 crc32c implementation

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-02-18 17:13:50 +08:00
Adir Lev
74fc3f6b83 msg/async/rdma: check if exp verbs avail
issue: 975125

Change-Id: I9daa168ca0299887a7238a688508c773b98abde9
Signed-off-by: Adir Lev <adirl@mellanox.com>
Signed-off-by: Oren Duer <oren@mellanox.com>
2017-02-13 13:28:21 +00:00
wei xiao
b0ae5ae2ad crc32c: optimize aarch64 crc32c implementation
ARMv8 defines PMULL crypto instruction.
This patch optimizes crc32c calculate with the instruction when
available rather than original linear crc instructions.

ceph crc32c performance unit test shows that the optimization get
~ x3.90 speedups on ThunderX ARM Core@2.0GHz (Cavium)
~ x1.45 speedups on ARM Cortex-A57@2.1GHz (Huaiwei)
~ x1.16 speedups on ARM Cortex-A57@2.0GHz (Softiron)

Jira: ENTLLT-358
Change-Id: I657422cd20c9ca78237cd060210a5383f4122575
Signed-off-by: wei xiao <wei.xiao@linaro.org>
2017-02-04 06:20:50 +00:00
Bassam Tabbara
615b4b2600 cmake: support for external rocksdb
add support for building with an external rocksdb.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2017-01-16 09:33:32 -08:00
John Lin
fbe78efd8a cmake: search for nspr include files for both suffixes: nspr4 and nspr
Fixes: http://tracker.ceph.com/issues/18535
Signed-off-by: John Lin <johnlinp@gmail.com>
2017-01-16 16:35:41 +08:00
Haomai Wang
836c5686b5 Merge pull request #12776 from optimistyzy/201714
cmake: remove Findpciaccess.cmake

Reviewed-by: Kefu Chai <kefu@redhat.com>
Reviewed-by: Pan Liu <pan.liu@istuary.com>
2017-01-06 11:20:27 +08:00
Pascal Bach
c79bf93d02 cmake: search for Keyutils in default paths and cleanup
This makes it more portable

Remove /usr/include as it is searched by find_path anyway.
Remove unnecessary include that weren't used.


Signed-off-by: Pascal Bach <pascal.bach@nextrem.ch>
2017-01-04 12:47:17 +01:00
optimistyzy
52494f15a3 cmake,modules: remove Findpciaccess.cmake
Now SPDK uses the DPDK's library for PCI device
enumeration, we can remove this dependency

Signed-off-by: optimistyzy <optimistyzy@gmail.com>
2017-01-04 12:32:30 +08:00
Pan Liu
2c2cae16cf dpdk: make compilation successful when use dpdk v16.11
Signed-off-by: Pan Liu <pan.liu@istuary.com>
2017-01-02 16:41:08 +08:00
Pan Liu
1ed6a37611 bluestore: fixed compilation error when enable spdk
Signed-off-by: Pan Liu <pan.liu@istuary.com>
2016-12-27 12:42:44 +08:00
Bassam Tabbara
bdf4db8c4c cmake: simplify find_package jemalloc
simplified the package to find jemalloc. this one matches
the one in src/rocksdb/cmake/modules. The existing one
was struggling to find jemalloc on some hosts.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-12-13 11:39:35 -05:00
Bassam Tabbara
c6067f48ec embedded: Add a skeleton libcephd library
libcephd is a library that contains ceph daemon code
that can be statically linked in other applications.

Added MergeStaticLibraries.cmake that can merge static libraries
to form a bigger one. This approach avoids the need to mess with
STATIC libraries all over the code base.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-11-28 23:48:02 -08:00
Adam C. Emerson
4731433eac cmake: Suppress warnings on Cython output
They are automatically generated code and we don't really control it.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2016-11-16 19:54:31 -05:00
Haomai Wang
eae7d5a645 msg/async: add dpdk stack plugin
Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-11-09 11:39:20 +08:00
Haomai Wang
cf23acef71 msg/async/rdma: add build ops
Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-11-01 15:34:04 +08:00
Alexander Graf
e70ab48b7f AArch64: Detect crc32 extension support from assembler
The used compiler may or may not be recent enough to recognize the
crc32 extended cpu type. However, it does not really have to know about
them either, since all we do is pass inline assembly instructions to
the assembler.

This patch moves the crc cpu extension detection from compiler based
to assembler based, so that we can build optimized code even when the
compiler does not know about the cpu type yet.

Fixes: http://tracker.ceph.com/issues/17516
Signed-off-by: Alexander Graf <agraf@suse.de>
2016-10-10 14:51:44 +02:00
Bassam Tabbara
e7e0b1bc1e erasure-code: Backward compatibility with legacy EC plugins
Resurrected jerasure_generic, jerasure_sse3, jerasure_sse4, jerasure_neon,
shec_generic, shec_sse3, shec_sse4 and shec_neon. These all are exact
copies of the new jerasure and shec plugins that support SIMD detection.

Moved EC preload code in ceph-mon and ceph-osd to a central location, added
warning when preloading legacy plugins.

OSMonitor::get_erasure_code and OSDMonitor:normalize_profile will now check
if legacy EC plugins are used and log a warning.

Added tests to check that warnings make it to the log.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-09-29 10:34:34 -07:00
Bassam Tabbara
10d06eb115 cmake: normalize use of SIMD flags
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-09-29 10:34:33 -07:00
Bassam Tabbara
cc62c11a76 erasure-code: Remove SIMD flavors for jerasure and shec
By switching to a new gf-complete with SIMD runtime detection, we can now remove all the different flavors of jerasure and shec. This simplifies deployment and configuration of erasure coding, enables hetergenous OSDs, and enables us to take advantage of new performance improvements in jerasure without config/build changes.

This commit removes flavors from cmake, removes ErasureCodePluginSelect___, and fixes unit tests. There is now a single plugin for jerasure and a single plugin for shec.

SIMDExt.cmake was changed so that its a little more generic, and is not polluted with gf-complete specific CFLAG defines. The #define for SIMD instruction were based on gf-complete.

I also added a small init helper for jerasure that has code that was common between jerasure and shec.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-09-29 10:34:33 -07:00
Casey Bodley
1a76324981 fio: generalize for other ObjectStores
* renamed target to fio_ceph_objectstore
* moved into src/test/fio subdirectory
* added to cmake build
* added support for DDIR_READ
* added required fio option 'conf' to load a ceph configuration file
* added multiple collections per job to simulate parallelism from pgs
* creates objects of the appropriate size on setup
* added support for multiple jobs that share an ObjectStore instance

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-09-13 11:02:17 -04:00
Dan Mick
3fdccc9e2b Set ARM_CRC_FLAGS from the CRC test rather than ARM_NEON_FLAGS
Fixes: http://tracker.ceph.com/issues/17250
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2016-09-08 20:28:55 -07:00
Kefu Chai
367755e7f7 cmake: pass -DINTEL* to gf-complete cflags
* in addition to the -march=foobar, we also need to pass -DFOOBAR to
  gf-complete sources' cflags, so that the SIMD instructions can be
  generated as expected.
* also extract the compiler support for instruction extensions detections
  into SIMDExt.cmake.
* and only check the compiler support if CMAKE_SYSTEM_PROCESSOR matches
  with the instruction-set/arch to be checked.

Signed-off-by: tone.zhang <tone.zhang@linaro.org>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-09-02 16:23:54 +08:00
Kefu Chai
2ed44f993f cmake: replace Findlttng-ust.cmake with FindLTTngUST.cmake
find_package(lttng-ust REQUIRED) fails to find the lttng library without
this change. because find_path(LTTNG_LIBRARY_DIR ...) does not search
in the default library paths. and the second mode of
FIND_PACKAGE_HANDLE_STANDARD_ARGS() does not stop the cmake with a fatal
message, even some of the required vars are missing. so use the
implemetantion from cmake upstream.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-30 15:51:51 +08:00
Josh Durgin
aaac836380 Merge pull request #10208 from BlaXpirit/cmake-py3
Include Python 3 bindings into the cmake build and make packages for them

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-08-12 16:30:35 -07:00
Oleh Prypin
5683a8259b cmake: Also build Python bindings for Python 3
Signed-off-by: Oleh Prypin <oleh@pryp.in>
2016-08-11 16:36:57 +03:00
Kefu Chai
5d9debd57d cmake: cleanup Findxio.cmake
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-11 14:53:03 +08:00
Kefu Chai
96fdb6914a cmake: cleanup Findleveldb.cmake
* and reference leveldb library and include dir with fullpath

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-11 14:53:02 +08:00
Kefu Chai
6c12edbf9d cmake: cleanup Findgperftools.cmake
* remove Findtcmalloc.cmake, use Findgperftools.cmake instead.
* tcmalloc is packaged in gperftools-dev, so we can check them in a single
  place.
* fix the check of heap-profiler.h, we should enable the check as long
  as tcmalloc is enabled or profiler is enabled.
* only check gperftools headers in "include/gperftools", and do not
  "include/google" anymore. as we only support the distros which
  shipping recent gperftools-dev package with "include/gperftools".
  and "google/*.h" are deprecated.
* set ALLOC_LIBS with GPERFTOOLS_TCMALLOC_LIBRARY, so we can link
  against tcmalloc with full path.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-11 14:06:39 +08:00
Kefu Chai
5444721b1d cmake: install platlib into a subdir of build-base dir
distutils' install command installs all stuff under $build-base, which
includes the temporary files. and rpm packaging does not like::
  Installed (but unpackaged) file(s)
and to support both py2 and py3, we should encode the python version
into the path, otherwise the built files will be overwritten.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-11 00:14:17 +08:00
Kefu Chai
300aedd8a6 cmake: fix wrong path introduced by bb163e9
s/CYTHON_MODULE_LIB/CYTHON_MODULE_DIR/

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-10 15:59:30 +08:00