diff mbox series

[LEDE-DEV] Add support for Flexible I/O Tester

Message ID fbbf82fb-f069-af3a-1318-9d36b2f3a519@codeminutia.com
State Changes Requested
Delegated to: John Crispin
Headers show
Series [LEDE-DEV] Add support for Flexible I/O Tester | expand

Commit Message

Dragan Stancevic May 13, 2018, 6:58 p.m. UTC
A lot of SoC boards come with integrated SATA it would be nice to be
able to use fio to test performance of those boards.

Comments

John Crispin May 14, 2018, 1:52 p.m. UTC | #1
On 13/05/18 20:58, Dragan Stancevic wrote:
> A lot of SoC boards come with integrated SATA it would be nice to be
> able to use fio to test performance of those boards.
>
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


Hi Dragan,

please propose this as a PR on the packages feed on github

     John
Dragan Stancevic May 14, 2018, 4:50 p.m. UTC | #2
On 05/14/2018 08:52 AM, John Crispin wrote:
> Hi Dragan,
> 
> please propose this as a PR on the packages feed on github

Hi John,

thanks for the clarification, I looked at the github openwrt repo and it
said that it's just a mirror of
[https://git.openwrt.org/openwrt/openwrt.git] but admittedly I didn't
look at the github packages repo. That's what got me confused (new here)...

I wasn't aware but Daniel apparently submitted a PR on github in January:
[https://github.com/openwrt/packages/pull/5396]

Daniel and I synced up, I'll take package ownership but it's his PR that
should be pulled in.

Any ideas when this will make it in?

Thanks in advance!
diff mbox series

Patch

From 23b64e372654ac7592e597fcc559df38fa1ee31b Mon Sep 17 00:00:00 2001
From: Dragan Stancevic <ds@codeminutia.com>
Date: Sun, 13 May 2018 13:36:58 -0500
Subject: [PATCH] Add support for Flexible I/O Tester

A lot of SoC boards come with integrated SATA,
this adds fio to the build so performance can
be tested.

Signed-off-by: Dragan Stancevic <ds@codeminutia.com>
---
 package/utils/fio/Makefile | 86 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 package/utils/fio/Makefile

diff --git a/package/utils/fio/Makefile b/package/utils/fio/Makefile
new file mode 100644
index 0000000..1f54b5b
--- /dev/null
+++ b/package/utils/fio/Makefile
@@ -0,0 +1,86 @@ 
+#
+# Copyright (C) 2018 - Dragan Stancevic <ds@codeminutia.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fio
+PKG_VERSION:=3.6
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/axboe/fio.git
+PKG_SOURCE_VERSION:=c5477c6a3b3e0042b1f74414071429ca66d94c2f
+PKG_SOURCE_DATE:=2018-04-16
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_MIRROR_HASH:=eecd190a100ccf803575a7f0027c111fb3ff322b05b98b83f01ad88039b33741
+
+PKG_MAINTAINER:=Dragan Stancevic <ds@codeminutia.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_DEPENDS:= +zlib
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fio
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Flexible I/O Tester
+  URL:=https://github.com/axboe/fio/
+  DEPENDS:= +zlib
+endef
+
+define Package/fio/description
+ Flexible I/O Tester
+
+ Fio was originally written to save me the hassle of writing special test case
+ programs when I wanted to test a specific workload, either for performance
+ reasons or to find/reproduce a bug. The process of writing such a test app can
+ be tiresome, especially if you have to do it often.  Hence I needed a tool that
+ would be able to simulate a given I/O workload without resorting to writing a
+ tailored test case again and again.
+
+ A test work load is difficult to define, though. There can be any number of
+ processes or threads involved, and they can each be using their own way of
+ generating I/O. You could have someone dirtying large amounts of memory in an
+ memory mapped file, or maybe several threads issuing reads using asynchronous
+ I/O. fio needed to be flexible enough to simulate both of these cases, and many
+ more.
+
+ Fio spawns a number of threads or processes doing a particular type of I/O
+ action as specified by the user. fio takes a number of global parameters, each
+ inherited by the thread unless otherwise parameters given to them overriding
+ that setting is given.  The typical use of fio is to write a job file matching
+ the I/O load one wants to simulate.
+
+ Author: Jens Axboe <axboe@kernel.dk>
+ Package Maintainer: <ds@codeminutia.com> http://codeminutia.com/
+
+endef
+
+# Remove quotes from CONFIG_CPU_TYPE
+CONFIG_CPU_TYPE_NQ:= $(patsubst "%",%,$(CONFIG_CPU_TYPE))
+# get CPU type so we can pass it to fio configure script
+CONF_CPU:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE_NQ)))
+
+CONFIGURE_ARGS = --prefix="$(PKG_INSTALL_DIR)" --cpu="$(CONF_CPU)" --cc="$(TARGET_CC)" --extra-cflags="$(TARGET_CFLAGS)"
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR)
+	$(MAKE) -C $(PKG_BUILD_DIR) INSTALL_PREFIX="$(PKG_INSTALL_DIR)" install
+endef
+
+define Package/fio/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,fio, +zlib))
-- 
2.7.4