[packages/accelio] - updated to 1.6 - added fio patch, build fio module - added sse patch (fixes non-sse build)

qboosh qboosh at pld-linux.org
Mon Apr 11 16:14:44 CEST 2016


commit 08f63b58e3699caa351e4707ed6fce28751de127
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 11 16:14:44 2016 +0200

    - updated to 1.6
    - added fio patch, build fio module
    - added sse patch (fixes non-sse build)

 accelio-fio.patch | 21 +++++++++++++++++++++
 accelio-sse.patch | 23 +++++++++++++++++++++++
 accelio.spec      | 23 ++++++++++++++++++-----
 3 files changed, 62 insertions(+), 5 deletions(-)
---
diff --git a/accelio.spec b/accelio.spec
index 0fbc3ad..ead0e1d 100644
--- a/accelio.spec
+++ b/accelio.spec
@@ -1,24 +1,26 @@
 # TODO:
-# - fio engine module (BR: headers from fio sources)
 # - kernel modules (BR: OFED kernel headers)
 #
 # Conditional build:
-%bcond_with	fio		# FIO module
+%bcond_without	fio		# FIO module
 %bcond_with	kernel		# kernel modules
 %bcond_without	static_libs	# static libraries
 #
 Summary:	Open Source I/O, Message and RPC Acceleration library
 Summary(pl.UTF-8):	Mająca otwarte źródła biblioteka przyspieszająca we/wy, komunikaty i RPC
 Name:		accelio
-Version:	1.3
+Version:	1.6
 Release:	1
 License:	BSD
 Group:		Libraries
 Source0:	https://github.com/accelio/accelio/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	3a75f4139c72a797740a50e8033f74ae
+# Source0-md5:	0f6634e03ff1bf2e9b83e554202d093f
+Patch0:		%{name}-fio.patch
+Patch1:		%{name}-sse.patch
 URL:		http://www.accelio.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake >= 1:1.11
+%{?with_fio:BuildRequires:	fio-devel >= 2.8}
 BuildRequires:	libaio-devel
 BuildRequires:	libevent-devel >= 2
 BuildRequires:	libibverbs-devel
@@ -65,6 +67,8 @@ Statyczne biblioteki Accelio.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %{__sed} -i -e 's/-Werror //' configure.ac
 
@@ -73,12 +77,13 @@ Statyczne biblioteki Accelio.
 %{__aclocal}
 %{__autoconf}
 %{__automake}
-for d in src/kernel/xio src/kernel/rdma src/kernel/tcp examples/kernel/hello_world examples/kernel/hello_world_mt tests/kernel/hello_test ; do
+for d in src/kernel/xio examples/kernel/hello_world examples/kernel/hello_world_mt tests/kernel/hello_test examples/raio/kernel/nbdx ; do
 cd $d
 %{__autoconf}
 cd -
 done
 %configure \
+	%{?with_fio:FIO_ROOT=%{_includedir}/fio} \
 	--disable-silent-rules \
 	%{!?with_static_libs:--disable-static} \
 	%{?with_fio:--enable-fio-build} \
@@ -91,6 +96,11 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+# fio module, .la is useless
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libraio_fio.la
+# test program
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/event_loop_tests
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -108,6 +118,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/xiosrvd
 %attr(755,root,root) %{_libdir}/libraio.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libraio.so.0
+%if %{with fio}
+%attr(755,root,root) %{_libdir}/libraio_fio.so
+%endif
 %attr(755,root,root) %{_libdir}/libxio.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libxio.so.0
 
diff --git a/accelio-fio.patch b/accelio-fio.patch
new file mode 100644
index 0000000..ce5f594
--- /dev/null
+++ b/accelio-fio.patch
@@ -0,0 +1,21 @@
+--- accelio-1.6/examples/raio/usr/fio/libraio.c.orig	2016-03-28 14:58:45.000000000 +0200
++++ accelio-1.6/examples/raio/usr/fio/libraio.c	2016-04-10 19:16:54.244086124 +0200
+@@ -130,7 +130,7 @@
+ 				 unsigned int max, const struct timespec *t)
+ {
+ 	struct libraio_data *ld = td->io_ops->data;
+-	unsigned actual_min = td->o.iodepth_batch_complete == 0 ? 0 : min;
++	unsigned actual_min = td->o.iodepth_batch_complete_min == 0 ? 0 : min;
+ 	int r, events = 0;
+ 
+ 	do {
+--- accelio-1.6/examples/raio/usr/fio/Makefile.am.orig	2016-03-28 14:58:45.000000000 +0200
++++ accelio-1.6/examples/raio/usr/fio/Makefile.am	2016-04-10 21:54:08.050356893 +0200
+@@ -30,6 +30,7 @@
+ # list of sources for the 'libraio_fio' shared library
+ libraio_fio_la_SOURCES = libraio.c
+ 
++libraio_fio_la_LDFLAGS = -module -avoid-version
+ libraio_fio_la_LIBADD = -lraio -lxio $(libxio_rdma_ldflags) -lrt -ldl -lpthread  \
+ 	     		-L$(top_builddir)/src/usr/ -L$(top_builddir)/examples/raio/
+ 
diff --git a/accelio-sse.patch b/accelio-sse.patch
new file mode 100644
index 0000000..c369599
--- /dev/null
+++ b/accelio-sse.patch
@@ -0,0 +1,23 @@
+"SPINLOCK_NG" is x86-specific;
+also, use __builtin_ia32_pause directly, as _mm_pause used to be inside target("sse") pragma until gcc 5.?
+--- accelio-1.6/src/usr/linux/kernel.h.orig	2016-03-28 14:58:45.000000000 +0200
++++ accelio-1.6/src/usr/linux/kernel.h	2016-04-10 21:34:41.710405838 +0200
+@@ -89,7 +89,9 @@
+ 
+ typedef volatile int spinlock_t;
+ 
++#if defined(__i386__) || defined(__x86_64__)
+ #define SPINLOCK_NG
++#endif
+ 
+ #ifndef SPINLOCK_NG
+ 
+@@ -146,7 +148,7 @@
+ {
+ 	while (__sync_lock_test_and_set(spinlock, 1))
+ 		while (*spinlock)
+-			_mm_pause();
++			__builtin_ia32_pause();
+ }
+ 
+ static inline int spin_try_lock(spinlock_t* spinlock)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/accelio.git/commitdiff/08f63b58e3699caa351e4707ed6fce28751de127



More information about the pld-cvs-commit mailing list