From 5dd2937e9046e57c91939696b6e5c896bca15b9ea6577041d4eb720b8631bf4b Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Thu, 11 Sep 2014 13:21:48 +0000 Subject: [PATCH] Accepting request 248595 from home:trenn:branches:Base:System - Only warn once for affinity hint subset empty irqs * Add bug-893478_warn-once.patch - Rename rcirq_balancer like the package name and the already renamed systemd service: rcirqbalance OBS-URL: https://build.opensuse.org/request/show/248595 OBS-URL: https://build.opensuse.org/package/show/Base:System/irqbalance?expand=0&rev=40 --- bug-893478_warn-once.patch | 43 ++++++++++++++++++++++++++++++++++++++ irqbalance.changes | 8 +++++++ irqbalance.spec | 6 ++++-- 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 bug-893478_warn-once.patch diff --git a/bug-893478_warn-once.patch b/bug-893478_warn-once.patch new file mode 100644 index 0000000..3f95afb --- /dev/null +++ b/bug-893478_warn-once.patch @@ -0,0 +1,43 @@ +From: Takashi Iwai +Only warn once for affinity hint subset empty irqs + +bnc#893478 + +Signed-off-by: Thomas Renninger +--- + activate.c | 13 ++++++++----- + types.h | 1 + + 2 files changed, 9 insertions(+), 5 deletions(-) + +--- a/activate.c ++++ b/activate.c +@@ -84,11 +84,14 @@ static void activate_mapping(struct irq_ + if ((hint_policy == HINT_POLICY_SUBSET) && + (!cpus_empty(info->affinity_hint))) { + cpus_and(applied_mask, applied_mask, info->affinity_hint); +- if (!cpus_intersects(applied_mask, unbanned_cpus)) +- log(TO_ALL, LOG_WARNING, +- "irq %d affinity_hint subset empty\n", +- info->irq); +- else ++ if (!cpus_intersects(applied_mask, unbanned_cpus)) { ++ if (!info->warned) { ++ info->warned = 1; ++ log(TO_ALL, LOG_WARNING, ++ "irq %d affinity_hint subset empty\n", ++ info->irq); ++ } ++ } else + valid_mask = 1; + } else { + valid_mask = 1; +--- a/types.h ++++ b/types.h +@@ -69,6 +69,7 @@ struct irq_info { + uint64_t load; + int moved; + struct topo_obj *assigned_obj; ++ unsigned int warned; + }; + + #endif diff --git a/irqbalance.changes b/irqbalance.changes index bfb13fe..3990486 100644 --- a/irqbalance.changes +++ b/irqbalance.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Sep 11 13:12:26 UTC 2014 - trenn@suse.de + +- Only warn once for affinity hint subset empty irqs +* Add bug-893478_warn-once.patch +- Rename rcirq_balancer like the package name and the already renamed + systemd service: rcirqbalance + ------------------------------------------------------------------- Mon Jun 16 13:22:17 UTC 2014 - trenn@suse.de diff --git a/irqbalance.spec b/irqbalance.spec index 41a5b97..eafc527 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -25,6 +25,7 @@ Group: System/Daemons Url: http://code.google.com/p/irqbalance Source: http://irqbalance.googlecode.com/files/%{name}-%{version}.tar.bz2 Source3: sysconfig.irqbalance +Patch0: bug-893478_warn-once.patch BuildRequires: libnuma-devel BuildRequires: libtool BuildRequires: pkgconfig(glib-2.0) @@ -43,6 +44,7 @@ being used for all IRQs. %prep %setup -q +%patch0 -p1 %build ./autogen.sh @@ -62,7 +64,7 @@ sed -ie "s|EnvironmentFile=.*|EnvironmentFile=/etc/sysconfig/irqbalance|g" misc/ # Remove syslog.target in systemd service file; not provided by systemd anymore sed -ie "s|After=syslog.target||g" misc/irqbalance.service install -D -m 0644 misc/irqbalance.service %{buildroot}%{_unitdir}/irqbalance.service -ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcirq_balancer +ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcirqbalance %pre %service_add_pre irqbalance.service @@ -80,7 +82,7 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcirq_balancer %files %defattr(-,root,root,-) %{_sbindir}/irqbalance -%{_sbindir}/rcirq_balancer +%{_sbindir}/rcirqbalance %{_unitdir}/irqbalance.service %{_mandir}/man1/irqbalance.1.gz %{_localstatedir}/adm/fillup-templates/sysconfig.irqbalance