Skip to contentSkip to conversation

Added package: 'sysbench' and its dependency: 'ck'.

RFC PATCH Superseded Sergey Romanov via buildroot 2 participants 10 messages May 25, 2023 – Nov 21

lore
Share & tools
lore
#0 lore raw

cover Added package: 'sysbench' and its dependency: 'ck'.

Sergey Romanov (2):
package/ck: new package
package/sysbench: new package

 .checkpackageignore                           |   1 +
 DEVELOPERS                                    |   4 +
 package/Config.in                             |   2 +
 ...oid-buildroot-s-influence-on-LDFLAGS.patch | 191 ++++++++++++++++++
 package/ck/Config.in                          |  23 +++
 package/ck/ck.hash                            |   3 +
 package/ck/ck.mk                              |  42 ++++
 package/sysbench/Config.in                    |  28 +++
 package/sysbench/sysbench.hash                |   3 +
 package/sysbench/sysbench.mk                  |  30 +++
 10 files changed, 327 insertions(+)
 create mode 100644 package/ck/0001-Avoid-buildroot-s-influence-on-LDFLAGS.patch
 create mode 100644 package/ck/Config.in
 create mode 100644 package/ck/ck.hash
 create mode 100644 package/ck/ck.mk
 create mode 100644 package/sysbench/Config.in
 create mode 100644 package/sysbench/sysbench.hash
 create mode 100644 package/sysbench/sysbench.mk
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

RFC PATCH 1/2 package/ck: new package

Concurrency primitives, safe memory reclamation
mechanisms and non-blocking data structures
for the research, design and implementation
of high performance concurrent systems.

https://github.com/concurrencykit/ck.git

---
 .checkpackageignore                           |   1 +
 DEVELOPERS                                    |   3 +
 package/Config.in                             |   1 +
 ...oid-buildroot-s-influence-on-LDFLAGS.patch | 191 ++++++++++++++++++
 package/ck/Config.in                          |  23 +++
 package/ck/ck.hash                            |   3 +
 package/ck/ck.mk                              |  42 ++++
 7 files changed, 264 insertions(+)
 create mode 100644 package/ck/0001-Avoid-buildroot-s-influence-on-LDFLAGS.patch
 create mode 100644 package/ck/Config.in
 create mode 100644 package/ck/ck.hash
 create mode 100644 package/ck/ck.mk
.checkpackageignore +1 -0
index f2dea0dfd9..1be4e79a2b 100644
@@ -286,6 +286,7 @@ package/cgroupfs-mount/S30cgroupfs Indent Shellcheck Variables
 package/chipmunk/0001-Fix-build-failure-on-musl.patch Upstream
 package/chocolate-doom/0001-Remove-redundant-demoextend-definition.patch Upstream
 package/chrony/S49chrony Indent Shellcheck Variables
+package/ck/0001-Avoid-buildroot-s-influence-on-LDFLAGS.patch Upstream
 package/clang/0001-lib-Driver-ToolChains-Gnu-Use-GCC_INSTALL_PREFIX-in-.patch Upstream
 package/cmake/0001-rename-cmake-rootfile.patch Upstream
 package/cmocka/0001-Don-t-redefine-uintptr_t.patch Upstream
DEVELOPERS +3 -0
index e76717e845..4accefb251 100644
@@ -2626,6 +2626,9 @@ F:	package/rtl8189fs/
 F:	package/wpa_supplicant/
 F:	package/xr819-xradio/
 
+N:	Sergey Romanov <[email protected]>
+F:	package/ck/
+
 N:	Sergio Prado <[email protected]>
 F:	board/toradex/apalis-imx6/
 F:	configs/toradex_apalis_imx6_defconfig
package/Config.in +1 -0
index 420ebaa370..c81ddc81f6 100644
@@ -92,6 +92,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/bonnie/Config.in"
 	source "package/bpftool/Config.in"
 	source "package/cache-calibrator/Config.in"
+	source "package/ck/Config.in"
 	source "package/clinfo/Config.in"
 	source "package/clpeak/Config.in"
 	source "package/coremark/Config.in"
package/ck/0001-Avoid-buildroot-s-influence-on-LDFLAGS.patch new file +191 -0

191 lines not on this page · raw message

package/ck/Config.in new file +23 -0
new file mode 100644
index 0000000000..d88eaa8413
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_CK_ARCH_SUPPORTS
+	bool
+	default y if ((BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && \
+		!BR2_ARM_CPU_ARMV7M) || BR2_aarch64 || \
+		BR2_powerpc || BR2_powerpc64 || BR2_RISCV_64 || \
+		BR2_s390x || BR2_sparc_v9 || BR2_x86 || BR2_x86_64)
+
+config BR2_PACKAGE_CK_TOOLCHAIN_SUPPORTS
+	bool
+	default y if ((BR2_TOOLCHAIN_USES_MUSL || BR2_TOOLCHAIN_USES_GLIBC) && \
+		!BR2_TOOLCHAIN_USES_UCLIBC)
+
+config BR2_PACKAGE_CK
+	bool "concurrency kit"
+	depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_CK_TOOLCHAIN_SUPPORTS
+	help
+	  Concurrency primitives, safe memory reclamation
+	  mechanisms and non-blocking data structures
+	  for the research, design and implementation
+	  of high performance concurrent systems.
+
+	  https://github.com/concurrencykit/ck.git
package/ck/ck.hash new file +3 -0
new file mode 100644
index 0000000000..6d77ae4bee
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  97d2a21d5326ef79b4668be2e6eda6284ee77a64c0981b35fd9695c736c3d4ac  ck-0.7.1.tar.gz
+sha256  21a861f554f8f97047815e63ff5cbd57707b4c53dc1dd1b0f2dd43e6ca193464  LICENSE
package/ck/ck.mk new file +42 -0

42 lines not on this page · raw message

Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [RFC PATCH v1 1/2] package/ck: new package

Hello Sergey,

Quoted 8 lines · On Fri, 26 May 2023 00:51:02 +0300 Sergey Romanov via buildroot…

Concurrency primitives, safe memory reclamation
mechanisms and non-blocking data structures
for the research, design and implementation
of high performance concurrent systems.

https://github.com/concurrencykit/ck.git

Sorry for the very slow feedback. I wanted to push this, but it doesn't build, and I don't see how it can build in a cross-compilation environment. Indeed, the configure script does this:

$CC -o .1 .1.c
COMPILER=./.1 2> /dev/null
r=$?
rm -f .1.c .1

if test "$r" -ne 0; then
assert "" "update compiler"
else
echo "success [$CC]"
fi

So it builds a program called .1 with the cross-compiler, and then it tries to run it. This obviously will never work in a cross-compilation context.

Some more comments below (which I had addressed locally, but had to give up because of the above issue)

.checkpackageignore package/cgroupfs-mount/S30cgroupfs Indent Shellcheck Variables · line 289

Quoted 9 lines
.checkpackageignore +1 -0
index f2dea0dfd9..1be4e79a2b 100644
@@ -286,6 +286,7 @@ package/cgroupfs-mount/S30cgroupfs Indent Shellcheck Variables
 package/chipmunk/0001-Fix-build-failure-on-musl.patch Upstream
 package/chocolate-doom/0001-Remove-redundant-demoextend-definition.patch Upstream
 package/chrony/S49chrony Indent Shellcheck Variables
+package/ck/0001-Avoid-buildroot-s-influence-on-LDFLAGS.patch Upstream

Please add a proper Upstream: tag instead of adding an exception. We don't want to add new entries in .checkpackageignore, only remove existing entries.

package/ck/0001-Avoid-buildroot-s-influence-on-LDFLAGS.patch line 6

Quoted 12 lines
package/ck/0001-Avoid-buildroot-s-influence-on-LDFLAGS.patch new file +6 -0
new file mode 100644
index 0000000000..7e2cc85ba6
@@ -0,0 +1,191 @@
+From 0b30b184538c0de485fe292e2ebb6bfea3c255bc Mon Sep 17 00:00:00 2001
+From: Sergey Romanov <[email protected]>
+Date: Thu, 25 May 2023 19:01:28 +0300
+Subject: [PATCH] Avoid buildroot's influence on LDFLAGS
+
+Upstream-status: Pending

Pending where? Could you please provide some link to a pull request?

Also, could you provide some more details on why this patch is needed. Apparently, the configure script is designed to allow passing custom LDFLAGS through the LDFLAGS variable, so why doesn't that just work?

package/ck/Config.in line 6

Quoted 12 lines
package/ck/Config.in new file +6 -0
new file mode 100644
index 0000000000..d88eaa8413
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_CK_ARCH_SUPPORTS
+	bool
+	default y if ((BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && \
+		!BR2_ARM_CPU_ARMV7M) || BR2_aarch64 || \
+		BR2_powerpc || BR2_powerpc64 || BR2_RISCV_64 || \
+		BR2_s390x || BR2_sparc_v9 || BR2_x86 || BR2_x86_64)

BR2_x86 doesn't exist, it's BR2_i386. Also, please reformat as such:

config BR2_PACKAGE_CK_ARCH_SUPPORTS
bool
default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && !BR2_ARM_CPU_ARMV7M default y if BR2_aarch64
default y if BR2_i386
default y if BR2_powerpc || BR2_powerpc64
default y if BR2_RISCV_64
default y if BR2_s390x
default y if BR2_sparc_v9
default y if BR2_x86_64

package/ck/Config.in line 11

Quoted 4 lines
package/ck/Config.in new file +4 -0
+config BR2_PACKAGE_CK_TOOLCHAIN_SUPPORTS
+	bool
+	default y if ((BR2_TOOLCHAIN_USES_MUSL || BR2_TOOLCHAIN_USES_GLIBC) && \
+		!BR2_TOOLCHAIN_USES_UCLIBC)

Please drop this.

package/ck/Config.in line 16

Quoted 5 lines
package/ck/Config.in new file +5 -0
+
+config BR2_PACKAGE_CK
+	bool "concurrency kit"
+	depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_CK_TOOLCHAIN_SUPPORTS

And use:

	# some comment here to explain the issue
	depends on !BR2_TOOLCHAIN_USES_UCLIBC

package/ck/Config.in line 23

Quoted 7 lines
package/ck/Config.in new file +7 -0
+	help
+	  Concurrency primitives, safe memory reclamation
+	  mechanisms and non-blocking data structures
+	  for the research, design and implementation
+	  of high performance concurrent systems.
+
+	  https://github.com/concurrencykit/ck.git

And add:

comment "ck needs a toolchain w/ glibc or musl"
depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_USES_UCLIBC

package/ck/Config.in

Quoted 4 lines
package/ck/Config.in new file +4 -0
+CK_INSTALL_STAGING = YES
+
+CK_PROFILE_PARAMS += --platform=$(BR2_ARCH)
+CK_PROFILE_PARAMS += --prefix="/usr"

Please use:

CK_CONF_OPTS = \
	--platform=$(BR2_ARCH) \
	--prefix="/usr"

package/ck/Config.in

Quoted 5 lines
package/ck/Config.in new file +5 -0
+
+define CK_CONFIGURE_CMDS
+	( cd $(@D); \
+	$(TARGET_CONFIGURE_OPTS) \
+	$(CK_PROFILE_CONF_ENV) \

This variable doesn't exist.

package/ck/Config.in

Quoted 1 line
package/ck/Config.in new file +1 -0
+	./configure $(CK_PROFILE_PARAMS) )

Please simplify to:

        cd $(@D); \
                $(TARGET_CONFIGURE_OPTS) \
                ./configure $(CK_CONF_OPTS)

package/ck/Config.in

Quoted 6 lines
package/ck/Config.in new file +6 -0
+endef
+
+define CK_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) \
+	$(CK_PROFILE_CONF_ENV) \
+	$(MAKE) -C $(@D)

If you can simplify to:

        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)

it would be great.

package/ck/Config.in

Quoted 6 lines
package/ck/Config.in new file +6 -0
+endef
+
+define CK_INSTALL_TARGET_CMDS
+	$(TARGET_CONFIGURE_OPTS) \
+	$(CK_PROFILE_CONF_ENV) \
+	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install

Simplify to:

        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install

if possible.

package/ck/Config.in

Quoted 6 lines
package/ck/Config.in new file +6 -0
+endef
+
+define CK_INSTALL_STAGING_CMDS
+	$(TARGET_CONFIGURE_OPTS) \
+	$(CK_PROFILE_CONF_ENV) \
+	$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install

Simplify to:

        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install

if possible.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

v2 cover Added package: 'sysbench' and its dependency: 'ck'.

Sergey Romanov (2):
package/ck: new package
package/sysbench: new package

 DEVELOPERS                     |  4 ++
 package/Config.in              |  2 +
 package/ck/Config.in           | 19 +++++++++
 package/ck/ck.hash             |  3 ++
 package/ck/ck.mk               | 71 ++++++++++++++++++++++++++++++++++
 package/sysbench/Config.in     | 29 ++++++++++++++
 package/sysbench/sysbench.hash |  3 ++
 package/sysbench/sysbench.mk   | 31 +++++++++++++++
 8 files changed, 162 insertions(+)
 create mode 100644 package/ck/Config.in
 create mode 100644 package/ck/ck.hash
 create mode 100644 package/ck/ck.mk
 create mode 100644 package/sysbench/Config.in
 create mode 100644 package/sysbench/sysbench.hash
 create mode 100644 package/sysbench/sysbench.mk
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

RFC PATCH v2 1/2 package/ck: new package

From: Sergey Romanov <[email protected]>

Concurrency primitives, safe memory reclamation mechanisms and non-blocking data structures
for the research, design and implementation
of high performance concurrent systems.

https://github.com/concurrencykit/ck.git

---
 DEVELOPERS           |  3 ++
 package/Config.in    |  1 +
 package/ck/Config.in | 19 ++++++++++++
 package/ck/ck.hash   |  3 ++
 package/ck/ck.mk     | 71 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 97 insertions(+)
 create mode 100644 package/ck/Config.in
 create mode 100644 package/ck/ck.hash
 create mode 100644 package/ck/ck.mk
DEVELOPERS +3 -0
index 1f26e9bc81..f967b46842 100644
@@ -2717,6 +2717,9 @@ N:	Sergey Matyukevich <[email protected]>
 F:	board/synopsys/nsim/
 F:	configs/snps_arc700_nsim_defconfig
 
+N:	Sergey Romanov <[email protected]>
+F:	package/ck/
+
 N:	Sergio Prado <[email protected]>
 F:	board/toradex/apalis-imx6/
 F:	configs/toradex_apalis_imx6_defconfig
package/Config.in +1 -0
index 5a3410d758..ed08cb69c6 100644
@@ -91,6 +91,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/bonnie/Config.in"
 	source "package/bpftool/Config.in"
 	source "package/cache-calibrator/Config.in"
+	source "package/ck/Config.in"
 	source "package/clinfo/Config.in"
 	source "package/clpeak/Config.in"
 	source "package/coremark/Config.in"
package/ck/Config.in new file +19 -0
new file mode 100644
index 0000000000..613a1f4dde
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_CK_ARCH_SUPPORTS
+	bool
+	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && !BR2_ARM_CPU_ARMV7M
+	default y if BR2_aarch64
+	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+	default y if BR2_s390x
+	default y if BR2_sparc_v9
+	default y if BR2_i386
+	default y if BR2_x86_64
+
+config BR2_PACKAGE_CK
+	bool "concurrency kit"
+	depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+	help
+	  Concurrency primitives, safe memory reclamation mechanisms
+	  and non-blocking data structures for the research, design and
+	  implementation of high performance concurrent systems.
+
+	  https://github.com/concurrencykit/ck.git
package/ck/ck.hash new file +3 -0
new file mode 100644
index 0000000000..6d77ae4bee
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  97d2a21d5326ef79b4668be2e6eda6284ee77a64c0981b35fd9695c736c3d4ac  ck-0.7.1.tar.gz
+sha256  21a861f554f8f97047815e63ff5cbd57707b4c53dc1dd1b0f2dd43e6ca193464  LICENSE
package/ck/ck.mk new file +71 -0

71 lines not on this page · raw message

Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

RFC PATCH v2 2/2 package/sysbench: new package

In reply to Sergey Romanov via buildroot

From: Sergey Romanov <[email protected]>

This benchmark was designed for identifying basic system parameters, as they are important for system using MySQL (w Innodb) under intensive load. Handling of IO in case of many parallel requests, checked as well as memory allocation/transfer speed and scheduler performance.
CPU is benchmarked by using 64bit integer manipulation using Euklid algorithms for prime number computation. Benchmarks are designed to show benefit of multiple CPUs as well as of multiple hard drives, battery backed up write cache.

https://github.com/akopytov/sysbench.git

---
 DEVELOPERS                     |  1 +
 package/Config.in              |  1 +
 package/sysbench/Config.in     | 29 +++++++++++++++++++++++++++++
 package/sysbench/sysbench.hash |  3 +++
 package/sysbench/sysbench.mk   | 31 +++++++++++++++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 package/sysbench/Config.in
 create mode 100644 package/sysbench/sysbench.hash
 create mode 100644 package/sysbench/sysbench.mk
DEVELOPERS +1 -0
index f967b46842..73d4dfe094 100644
@@ -2719,6 +2719,7 @@ F:	configs/snps_arc700_nsim_defconfig
 
 N:	Sergey Romanov <[email protected]>
 F:	package/ck/
+F:	package/sysbench/
 
 N:	Sergio Prado <[email protected]>
 F:	board/toradex/apalis-imx6/
package/Config.in +1 -0
index ed08cb69c6..281544900b 100644
@@ -152,6 +152,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/strace/Config.in"
 	source "package/stress/Config.in"
 	source "package/stress-ng/Config.in"
+	source "package/sysbench/Config.in"
 	source "package/sysdig/Config.in"
 	source "package/sysprof/Config.in"
 	source "package/tcf-agent/Config.in"
package/sysbench/Config.in new file +29 -0
new file mode 100644
index 0000000000..7e4987497e
@@ -0,0 +1,29 @@
+config BR2_PACKAGE_SYSBENCH_ARCH_SUPPORTS
+	bool
+	default y if !BR2_powerpc
+
+config BR2_PACKAGE_SYSBENCH
+	bool "sysbench"
+	depends on BR2_PACKAGE_SYSBENCH_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+	depends on !BR2_STATIC_LIBS # luajit
+	depends on !BR2_PACKAGE_LUA # luajit
+	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS # luajit
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+
+	select BR2_PACKAGE_LUAJIT
+	select BR2_PACKAGE_CK
+	select BR2_PACKAGE_PKGCONF
+	select BR2_PACKAGE_LIBTOOL
+	help
+	  This benchmark was designed for identifying basic system
+	  parameters, as they are important for system using MySQL (w
+	  Innodb) under intensive load. Handling of IO in case of many
+	  parallel requests, checked as well as memory allocation
+	  /transfer speed and scheduler performance. CPU is benchmarked
+	  by using 64bit integer manipulation using Euklid algorithms
+	  for prime number computation. Benchmarks are designed to show
+	  benefit of multiple CPUs as well as of multiple hard drives,
+	  battery backed up write cache.
+
+	  https://github.com/akopytov/sysbench.git
package/sysbench/sysbench.hash new file +3 -0
new file mode 100644
index 0000000000..a31fdb1178
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  e8ee79b1f399b2d167e6a90de52ccc90e52408f7ade1b9b7135727efe181347f  sysbench-1.0.20.tar.gz
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/sysbench/sysbench.mk new file +31 -0
new file mode 100644
index 0000000000..33e19706e8
@@ -0,0 +1,31 @@
+################################################################################
+#
+# SYSBENCH
+#
+################################################################################
+
+SYSBENCH_VERSION = 1.0.20
+SYSBENCH_SITE = $(call github,akopytov,sysbench,$(SYSBENCH_VERSION))
+SYSBENCH_LICENSE = GPL-2.0+
+SYSBENCH_LICENSE_FILES = COPYING
+
+SYSBENCH_AUTORECONF = YES
+
+SYSBENCH_DEPENDENCIES += host-pkgconf ck luajit
+
+SYSBENCH_CONF_OPTS += \
+	--without-lib-prefix \
+	--with-system-luajit \
+	--with-system-ck
+
+ifeq ($(BR2_PACKAGE_MYSQL), y)
+SYSBENCH_DEPENDENCIES += mysql
+SYSBENCH_CONF_OPTS += \
+	--with-mysql \
+	--with-mysql-includes=$(STAGING_DIR)/usr/include/mysql \
+	--with-mysql-libs=$(STAGING_DIR)/usr/lib
+else
+SYSBENCH_CONF_OPTS += --without-mysql
+endif
+
+$(eval $(autotools-package))
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

PATCH v3 1/2 package/ck: new package

In reply to Sergey Romanov via buildroot

From: Sergey Romanov <[email protected]>

Concurrency primitives, safe memory reclamation
mechanisms and non-blocking data structures
for the research, design and implementation
of high performance concurrent systems.

https://github.com/concurrencykit/ck.git

---
Changes v2 -> v3:
- bump to version 0.7.2
- move the package to the "Other" libraries menu: ck is a library
- do not force -march=armv6k or -march=armv7-a: Buildroot already passes the CPU flags. Instead, exclude arm1136j-s and arm1136jf-s, the only ARMv6 cores without the ARMv6K instructions that ck needs
- exclude i486: the configure script stops on it, ck needs at least

    an i586

- pass --disable-sse on 32-bit x86 CPUs without SSE2: else the configure script adds -msse -msse2
- give --platform the name ck knows: powerpc64le is ppc64le for ck. --platform sets the memory model of the target in ck_md.h
- pass AR to make: the configure script does not set it, so the static library was made with the ar of the host
- keep TARGET_LDFLAGS instead of replacing them, and drop -m64: the x86_64 toolchain already builds 64-bit code
- build only the libraries that the configuration asks for: shared, static or both
- simplify the .mk file: one variable for the profile, and the configure options inline. Explain why the configure script needs --profile
- help text: link to the project page, not the git URL
- DEVELOPERS: add Angelo Compagnucci too
- rebase on master

Supersedes v2: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/

 DEVELOPERS           |  4 +++
 package/Config.in    |  1 +
 package/ck/Config.in | 22 ++++++++++++++
 package/ck/ck.hash   |  3 ++
 package/ck/ck.mk     | 72 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 102 insertions(+)
 create mode 100644 package/ck/Config.in
 create mode 100644 package/ck/ck.hash
 create mode 100644 package/ck/ck.mk
DEVELOPERS +4 -0
index 1d2960f9b3..5812ce6484 100644
@@ -227,6 +227,7 @@ F:	board/sipeed/lichee_rv_dock/
 F:	configs/sipeed_lichee_rv*
 F:	docs/website/
 F:	package/apparmor/
+F:	package/ck/
 F:	package/corkscrew/
 F:	package/cups/
 F:	package/cups-filters/
@@ -3100,6 +3101,9 @@ F:	package/rtl8189fs/
 F:	package/wpa_supplicant/
 F:	package/xr819-xradio/
 
+N:	Sergey Romanov <[email protected]>
+F:	package/ck/
+
 N:	Sergio Prado <[email protected]>
 F:	package/aoetools/
 F:	package/asn1c/
package/Config.in +1 -0
index 49659b007e..199f8b0bc7 100644
@@ -2172,6 +2172,7 @@ menu "Other"
 	source "package/catch2/Config.in"
 	source "package/cctz/Config.in"
 	source "package/cereal/Config.in"
+	source "package/ck/Config.in"
 	source "package/llvm-project/clang/Config.in"
 	source "package/cmocka/Config.in"
 	source "package/llvm-project/compiler-rt/Config.in"
package/ck/Config.in new file +22 -0
new file mode 100644
index 0000000000..273e58c398
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_CK_ARCH_SUPPORTS
+	bool
+	# ck needs the ARMv6K instructions
+	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && \
+		!BR2_ARM_CPU_ARMV7M && !BR2_arm1136j_s && !BR2_arm1136jf_s
+	default y if BR2_aarch64
+	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+	default y if BR2_s390x
+	default y if BR2_sparc_v9
+	# ck needs at least an i586 (cmpxchg8b)
+	default y if BR2_i386 && !BR2_x86_i486
+	default y if BR2_x86_64
+
+config BR2_PACKAGE_CK
+	bool "concurrency kit"
+	depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+	help
+	  Concurrency primitives, safe memory reclamation mechanisms
+	  and non-blocking data structures for the research, design and
+	  implementation of high performance concurrent systems.
+
+	  https://github.com/concurrencykit/ck
package/ck/ck.hash new file +3 -0
new file mode 100644
index 0000000000..ba99f24c59
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  568ebe0bc1988a23843fce6426602e555b7840bf6714edcdf0ed530214977f1b  ck-0.7.2.tar.gz
+sha256  21a861f554f8f97047815e63ff5cbd57707b4c53dc1dd1b0f2dd43e6ca193464  LICENSE
package/ck/ck.mk new file +72 -0

72 lines not on this page · raw message

Signature · 6 lines
2.53.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

PATCH v3 2/2 package/sysbench: new package

From: Sergey Romanov <[email protected]>

This benchmark was designed for identifying basic system parameters, as they are important for system using MySQL (w Innodb) under intensive load. Handling of IO in case of many parallel requests, checked as well as memory allocation/transfer speed and scheduler performance.
CPU is benchmarked by using 64bit integer manipulation using Euklid algorithms for prime number computation. Benchmarks are designed to show benefit of multiple CPUs as well as of multiple hard drives, battery backed up write cache.

https://github.com/akopytov/sysbench.git

---
Changes v2 -> v3:
- do not select the target pkgconf and libtool packages: host-pkgconf is already a build dependency, and autoreconf brings host-libtool
- add the comment for the toolchain dependencies
- add a runtime test, on ARMv7: it runs short cpu (two threads) and memory tests, under a second each
- .mk file: header in lower case, fix the ifeq spacing
- help text: link to the project page, not the git URL
- DEVELOPERS: add Angelo Compagnucci too
- rebase on master

Supersedes v2: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/

 DEVELOPERS                                    |  4 +++
 package/Config.in                             |  1 +
 package/sysbench/Config.in                    | 32 +++++++++++++++++
 package/sysbench/sysbench.hash                |  3 ++
 package/sysbench/sysbench.mk                  | 31 +++++++++++++++++
 .../testing/tests/package/test_sysbench.py    | 34 +++++++++++++++++++
 6 files changed, 105 insertions(+)
 create mode 100644 package/sysbench/Config.in
 create mode 100644 package/sysbench/sysbench.hash
 create mode 100644 package/sysbench/sysbench.mk
 create mode 100644 support/testing/tests/package/test_sysbench.py
DEVELOPERS +4 -0
index 5812ce6484..d2175d4f6f 100644
@@ -264,8 +264,10 @@ F:	package/rtl8723ds-bt/
 F:	package/sam-ba/
 F:	package/sshguard/
 F:	package/sunwait/
+F:	package/sysbench/
 F:	package/sysdig/
 F:	package/uthash/
+F:	support/testing/tests/package/test_sysbench.py
 
 N:	Andy Shevchenko <[email protected]>
 F:	package/fb-test-app/
@@ -3103,6 +3105,8 @@ F:	package/xr819-xradio/
 
 N:	Sergey Romanov <[email protected]>
 F:	package/ck/
+F:	package/sysbench/
+F:	support/testing/tests/package/test_sysbench.py
 
 N:	Sergio Prado <[email protected]>
 F:	package/aoetools/
package/Config.in +1 -0
index 199f8b0bc7..a72ad20b54 100644
@@ -149,6 +149,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/strace/Config.in"
 	source "package/stress/Config.in"
 	source "package/stress-ng/Config.in"
+	source "package/sysbench/Config.in"
 	source "package/sysdig/Config.in"
 	source "package/sysprof/Config.in"
 	source "package/tbtools/Config.in"
package/sysbench/Config.in new file +32 -0
new file mode 100644
index 0000000000..e30f691081
@@ -0,0 +1,32 @@
+config BR2_PACKAGE_SYSBENCH_ARCH_SUPPORTS
+	bool
+	default y if !BR2_powerpc
+
+config BR2_PACKAGE_SYSBENCH
+	bool "sysbench"
+	depends on BR2_PACKAGE_SYSBENCH_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+	depends on !BR2_STATIC_LIBS # luajit
+	depends on !BR2_PACKAGE_LUA # luajit
+	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS # luajit
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_LUAJIT
+	select BR2_PACKAGE_CK
+	help
+	  This benchmark was designed for identifying basic system
+	  parameters, as they are important for system using MySQL (w
+	  Innodb) under intensive load. Handling of IO in case of many
+	  parallel requests, checked as well as memory allocation
+	  /transfer speed and scheduler performance. CPU is benchmarked
+	  by using 64bit integer manipulation using Euklid algorithms
+	  for prime number computation. Benchmarks are designed to show
+	  benefit of multiple CPUs as well as of multiple hard drives,
+	  battery backed up write cache.
+
+	  https://github.com/akopytov/sysbench
+
+comment "sysbench needs a toolchain w/ threads, dynamic library"
+	depends on BR2_PACKAGE_SYSBENCH_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/sysbench/sysbench.hash new file +3 -0
new file mode 100644
index 0000000000..a31fdb1178
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  e8ee79b1f399b2d167e6a90de52ccc90e52408f7ade1b9b7135727efe181347f  sysbench-1.0.20.tar.gz
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/sysbench/sysbench.mk new file +31 -0
new file mode 100644
index 0000000000..771745329a
@@ -0,0 +1,31 @@
+################################################################################
+#
+# sysbench
+#
+################################################################################
+
+SYSBENCH_VERSION = 1.0.20
+SYSBENCH_SITE = $(call github,akopytov,sysbench,$(SYSBENCH_VERSION))
+SYSBENCH_LICENSE = GPL-2.0+
+SYSBENCH_LICENSE_FILES = COPYING
+
+SYSBENCH_AUTORECONF = YES
+
+SYSBENCH_DEPENDENCIES = host-pkgconf ck luajit
+
+SYSBENCH_CONF_OPTS = \
+	--without-lib-prefix \
+	--with-system-luajit \
+	--with-system-ck
+
+ifeq ($(BR2_PACKAGE_MYSQL),y)
+SYSBENCH_DEPENDENCIES += mysql
+SYSBENCH_CONF_OPTS += \
+	--with-mysql \
+	--with-mysql-includes=$(STAGING_DIR)/usr/include/mysql \
+	--with-mysql-libs=$(STAGING_DIR)/usr/lib
+else
+SYSBENCH_CONF_OPTS += --without-mysql
+endif
+
+$(eval $(autotools-package))
support/testing/tests/package/test_sysbench.py new file +34 -0
new file mode 100644
index 0000000000..45679bdd0e
@@ -0,0 +1,34 @@
+import os
+
+import infra.basetest
+
+
+class TestSysbench(infra.basetest.BRTest):
+    # ck does not support ARMv5, so use an ARMv7 toolchain
+    config = \
+        """
+        BR2_arm=y
+        BR2_cortex_a9=y
+        BR2_ARM_ENABLE_VFP=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+        BR2_PACKAGE_SYSBENCH=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """
+
+    def test_run(self):
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv7",
+                           kernel="builtin",
+                           options=["-initrd", cpio_file])
+        self.emulator.login()
+
+        self.assertRunOk("sysbench --version")
+        # Short runs, under a second each: the cpu test runs Lua code
+        # through luajit, and two threads use the ck primitives of the
+        # sysbench core
+        self.assertRunOk("sysbench cpu --threads=2 --cpu-max-prime=1000 --events=100 --time=0 run",
+                         timeout=30)
+        self.assertRunOk("sysbench memory --memory-total-size=1M run",
+                         timeout=30)
Signature · 6 lines
2.53.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

RFC PATCH 2/2 package/sysbench: new package

In reply to Sergey Romanov via buildroot

This benchmark was designed for identifying basic system parameters, as they are important for system using MySQL (w Innodb) under intensive load. Handling of IO in case of many parallel requests, checked as well as memory allocation/transfer speed and scheduler performance.
CPU is benchmarked by using 64bit integer manipulation using Euklid algorithms for prime number computation. Benchmarks are designed to show benefit of multiple CPUs as well as of multiple hard drives, battery backed up write cache.

https://github.com/akopytov/sysbench.git

---
 DEVELOPERS                     |  1 +
 package/Config.in              |  1 +
 package/sysbench/Config.in     | 28 ++++++++++++++++++++++++++++
 package/sysbench/sysbench.hash |  3 +++
 package/sysbench/sysbench.mk   | 30 ++++++++++++++++++++++++++++++
 5 files changed, 63 insertions(+)
 create mode 100644 package/sysbench/Config.in
 create mode 100644 package/sysbench/sysbench.hash
 create mode 100644 package/sysbench/sysbench.mk
DEVELOPERS +1 -0
index 4accefb251..d48cbbd145 100644
@@ -2628,6 +2628,7 @@ F:	package/xr819-xradio/
 
 N:	Sergey Romanov <[email protected]>
 F:	package/ck/
+F:	package/sysbench/
 
 N:	Sergio Prado <[email protected]>
 F:	board/toradex/apalis-imx6/
package/Config.in +1 -0
index c81ddc81f6..0004f71846 100644
@@ -152,6 +152,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/strace/Config.in"
 	source "package/stress/Config.in"
 	source "package/stress-ng/Config.in"
+	source "package/sysbench/Config.in"
 	source "package/sysdig/Config.in"
 	source "package/sysprof/Config.in"
 	source "package/tcf-agent/Config.in"
package/sysbench/Config.in new file +28 -0
new file mode 100644
index 0000000000..a8377b5bfd
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_SYSBENCH
+	bool "sysbench"
+	select BR2_PACKAGE_LUAJIT
+	select BR2_PACKAGE_CK
+	help
+	  This benchmark was designed for identifying basic
+	  system parameters, as they are important for system
+	  using MySQL (w Innodb) under intensive load.
+	  Handling of IO in case of many parallel requests,
+	  checked as well as memory allocation/transfer
+	  speed and scheduler performance.
+	  CPU is benchmarked by using 64bit integer manipulation
+	  using Euklid algorithms for prime number computation.
+	  Benchmarks are designed to show benefit of multiple
+	  CPUs as well as of multiple hard drives,
+	  battery backed up write cache.
+
+	  https://github.com/akopytov/sysbench.git
+
+if BR2_PACKAGE_SYSBENCH
+
+config BR2_PACKAGE_SYSBENCH_WITH_MYSQL
+	bool "configure with mysql"
+	select BR2_PACKAGE_MYSQL
+	help
+	  Configure with mysql
+
+endif
package/sysbench/sysbench.hash new file +3 -0
new file mode 100644
index 0000000000..a31fdb1178
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  e8ee79b1f399b2d167e6a90de52ccc90e52408f7ade1b9b7135727efe181347f  sysbench-1.0.20.tar.gz
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/sysbench/sysbench.mk new file +30 -0
new file mode 100644
index 0000000000..748014f564
@@ -0,0 +1,30 @@
+################################################################################
+#
+# SYSBENCH
+#
+################################################################################
+
+SYSBENCH_VERSION = 1.0.20
+SYSBENCH_SITE = $(call github,akopytov,sysbench,$(SYSBENCH_VERSION))
+SYSBENCH_LICENSE = GPLv2
+SYSBENCH_LICENSE_FILES = COPYING
+
+SYSBENCH_AUTORECONF = YES
+
+SYSBENCH_DEPENDENCIES = host-pkgconf
+SYSBENCH_DEPENDENCIES += ck
+SYSBENCH_DEPENDENCIES += luajit
+
+SYSBENCH_CONF_OPTS += --without-lib-prefix
+SYSBENCH_CONF_OPTS += --with-system-luajit
+SYSBENCH_CONF_OPTS += --with-system-ck
+
+ifneq ($(BR2_PACKAGE_SYSBENCH_WITH_MYSQL), y)
+SYSBENCH_CONF_OPTS += --without-mysql
+else
+SYSBENCH_DEPENDENCIES += mysql
+SYSBENCH_CONF_OPTS += --with-mysql-includes=$(STAGING_DIR)/usr/include/mysql
+SYSBENCH_CONF_OPTS += --with-mysql-libs=$(STAGING_DIR)/usr/lib
+endif
+
+$(eval $(autotools-package))
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

Re: [Buildroot] [RFC PATCH v1 2/2] package/sysbench: new package

Hello Sergey,

package/sysbench/Config.in line 4

Quoted 10 lines · On Fri, 26 May 2023 00:51:03 +0300 Sergey Romanov via buildroot…
package/sysbench/Config.in new file +4 -0
new file mode 100644
index 0000000000..a8377b5bfd
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_SYSBENCH
+	bool "sysbench"
+	select BR2_PACKAGE_LUAJIT
+	select BR2_PACKAGE_CK

You need to replicate the dependencies of those options, so:

depends on !BR2_STATIC_LIBS # luajit depends on !BR2_PACKAGE_LUA # luajit depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS # luajit depends on !BR2_TOOLCHAIN_USES_UCLIBC # ck

package/sysbench/Config.in line 16

Quoted 12 lines
package/sysbench/Config.in new file +12 -0
+	help
+	  This benchmark was designed for identifying basic
+	  system parameters, as they are important for system
+	  using MySQL (w Innodb) under intensive load.
+	  Handling of IO in case of many parallel requests,
+	  checked as well as memory allocation/transfer
+	  speed and scheduler performance.
+	  CPU is benchmarked by using 64bit integer manipulation
+	  using Euklid algorithms for prime number computation.
+	  Benchmarks are designed to show benefit of multiple
+	  CPUs as well as of multiple hard drives,
+	  battery backed up write cache.

The wrapping of those lines look really weird. Can you ask your text editor to wrap this automatically, and get some more consistent wrapping?

package/sysbench/Config.in line 26

Quoted 10 lines
package/sysbench/Config.in new file +10 -0
+
+	  https://github.com/akopytov/sysbench.git
+
+if BR2_PACKAGE_SYSBENCH
+
+config BR2_PACKAGE_SYSBENCH_WITH_MYSQL
+	bool "configure with mysql"
+	select BR2_PACKAGE_MYSQL
+	help
+	  Configure with mysql

You can drop this option and test BR2_PACKAGE_MYSQL in the .mk file.

Quoted 6 lines
package/sysbench/sysbench.mk new file +0 -0
new file mode 100644
index 0000000000..748014f564

package/sysbench/sysbench.mk line 9

Quoted 9 lines
package/sysbench/sysbench.mk new file +9 -0
@@ -0,0 +1,30 @@
+################################################################################
+#
+# SYSBENCH
+#
+################################################################################
+
+SYSBENCH_VERSION = 1.0.20
+SYSBENCH_SITE = $(call github,akopytov,sysbench,$(SYSBENCH_VERSION))
+SYSBENCH_LICENSE = GPLv2

GPL-2.0, not GPLv2. But from a quick look at the code, it seems like the license is actually GPL-2.0+.

package/sysbench/sysbench.mk line 16

Quoted 8 lines
package/sysbench/sysbench.mk new file +7 -0
+SYSBENCH_LICENSE_FILES = COPYING
+
+SYSBENCH_AUTORECONF = YES
 
+
+SYSBENCH_DEPENDENCIES = host-pkgconf
+SYSBENCH_DEPENDENCIES += ck
+SYSBENCH_DEPENDENCIES += luajit

Please change to:

SYSBENCH_DEPENDENCIES = host-pkgconf ck luajit

package/sysbench/sysbench.mk line 20

Quoted 3 lines
package/sysbench/sysbench.mk new file +3 -0
+SYSBENCH_CONF_OPTS += --without-lib-prefix
+SYSBENCH_CONF_OPTS += --with-system-luajit
+SYSBENCH_CONF_OPTS += --with-system-ck

Please change to:

SYSBENCH_CONF_OPTS = \
	--without-lib-prefix \
	--with-system-luajit \
	--with-system-ck

package/sysbench/sysbench.mk line 28

Quoted 8 lines
package/sysbench/sysbench.mk new file +8 -0
+
+ifneq ($(BR2_PACKAGE_SYSBENCH_WITH_MYSQL), y)
+SYSBENCH_CONF_OPTS += --without-mysql
+else
+SYSBENCH_DEPENDENCIES += mysql
+SYSBENCH_CONF_OPTS += --with-mysql-includes=$(STAGING_DIR)/usr/include/mysql
+SYSBENCH_CONF_OPTS += --with-mysql-libs=$(STAGING_DIR)/usr/lib
+endif

Please change to:

ifeq ($(BR2_PACKAGE_MYSQL),y)
SYSBENCH_DEPENDENCIES += mysql

SYSBENCH_CONF_OPTS += \
	--with-mysql \
	--with-mysql-includes=$(STAGING_DIR)/usr/include/mysql \
	--with-mysql-libs=$(STAGING_DIR)/usr/lib

else
SYSBENCH_CONF_OPTS += --without-mysql
endif

Could you rework this and send a v2?

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot