From 43b438f06897a390e16709b3f9e11355f325e2e9 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 14 Mar 2013 23:31:38 -0700 Subject: meta-virtualization: add irqbalance Depending on the requirements of a system, interrupt balancing may be desireable. This commit adds irqbalance to provide a daemon to balance interrupts across multiple CPUs, which can lead to better performance and IO balance on SMP systems. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- .../irqbalance/irqbalance/add-initscript.patch | 47 ++++++++++++++++++++++ recipes-extended/irqbalance/irqbalance_1.0.4.bb | 39 ++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 recipes-extended/irqbalance/irqbalance/add-initscript.patch create mode 100644 recipes-extended/irqbalance/irqbalance_1.0.4.bb diff --git a/recipes-extended/irqbalance/irqbalance/add-initscript.patch b/recipes-extended/irqbalance/irqbalance/add-initscript.patch new file mode 100644 index 00000000..46a75a86 --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance/add-initscript.patch @@ -0,0 +1,47 @@ +irqbalance: add basic init script + +The upstream irqbalance release package does not contain an +init script so we create a basic one here. + +Signed-off-by: Mark Asselstine +--- +Index: irqbalance-0.56/irqbalance.init +=================================================================== +--- /dev/null ++++ irqbalance-0.56/irqbalance.init +@@ -0,0 +1,35 @@ ++#!/bin/sh ++# ++# Copyright (c) 2012 Wind River Systems, Inc. ++# ++### BEGIN INIT INFO ++# Provides: irqbalance ++# Required-Start: ++# Required-Stop: ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 ++# Short-Description: IRQ allocation daemon ++### END INIT INFO ++ ++case "$1" in ++ start) ++ echo -n "Starting irqbalance: " ++ start-stop-daemon -S -b -n irqbalance -a /usr/sbin/irqbalance ++ echo "done" ++ ;; ++ stop) ++ echo -n "Shutting down irqbalance: " ++ start-stop-daemon -K -n irqbalance ++ echo "done" ++ ;; ++ restart) ++ $0 stop ++ $0 start ++ ;; ++ *) ++ echo "Usage: $0 {start | stop | restart}" >&2 ++ exit 1 ++ ;; ++esac ++ ++exit 0 diff --git a/recipes-extended/irqbalance/irqbalance_1.0.4.bb b/recipes-extended/irqbalance/irqbalance_1.0.4.bb new file mode 100644 index 00000000..aa9941c5 --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance_1.0.4.bb @@ -0,0 +1,39 @@ +# +# Copyright (C) 2013 Wind River Systems, Inc. +# +SUMMARY = "IRQ allocation daemon" +DESCRIPTION = "A daemon to balance interrupts across multiple CPUs, \ +which can lead to better performance and IO balance on SMP systems." + +HOMEPAGE = "http://code.google.com/p/irqbalance/" +BUGTRACKER = "http://code.google.com/p/irqbalance/issues/list" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://irqbalance.c;beginline=6;endline=8;md5=b94e153694672307b503b1bc87dc9e24 \ + " + +DEPENDS = "glib-2.0" +SRC_URI = "http://irqbalance.googlecode.com/files/irqbalance-${PV}.tar.bz2 \ + file://add-initscript.patch \ + " + +SRC_URI[md5sum] = "f7ca283c46331db73f27e686a643dcfb" +SRC_URI[sha256sum] = "15725edf4a6f20258620cbd05ebf02d0c25aadd5ffa4871ef8507c9215021c43" + +INITSCRIPT_NAME = "irqbalanced" +INITSCRIPT_PARAMS = "defaults" + +inherit autotools +inherit update-rc.d + +EXTRA_OECONF = "--program-transform-name= \ + --with-sysroot=${STAGING_DIR_TARGET} \ + " + +do_install () { + oe_runmake 'DESTDIR=${D}' install + install -d ${D}${sysconfdir}/init.d + cat ${S}/irqbalance.init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/irqbalanced + chmod 755 ${D}${sysconfdir}/init.d/irqbalanced +} -- cgit v1.2.3-54-g00ecf