Hello community, here is the log from the commit of package cachefilesd for openSUSE:Factory checked in at 2014-03-18 13:41:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cachefilesd (Old) and /work/SRC/openSUSE:Factory/.cachefilesd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cachefilesd" Changes: -------- --- /work/SRC/openSUSE:Factory/cachefilesd/cachefilesd.changes 2013-03-21 22:02:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.cachefilesd.new/cachefilesd.changes 2014-03-18 13:41:15.000000000 +0100 @@ -1,0 +2,7 @@ +Tue Mar 11 02:38:09 UTC 2014 - [email protected] + +- fix-cpu-spin.patch - Fix problem were cachefilesd + would sometimes enter a tight loop wasting CPU time. + bnc#843575 + +------------------------------------------------------------------- New: ---- fix-cpu-spin.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cachefilesd.spec ++++++ --- /var/tmp/diff_new_pack.p5Jq10/_old 2014-03-18 13:41:16.000000000 +0100 +++ /var/tmp/diff_new_pack.p5Jq10/_new 2014-03-18 13:41:16.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package cachefilesd # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: cachefilesd Summary: CacheFiles userspace management daemon License: GPL-2.0+ @@ -26,6 +27,7 @@ Patch1: cachefilesd-config.patch Patch2: cachefilesd-loadmod.patch Patch3: cachefilesd-monitoring-howto-update.patch +Patch4: fix-cpu-spin.patch Url: http://people.redhat.com/~dhowells/fscache/ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: automake @@ -44,6 +46,7 @@ %patch1 %patch2 %patch3 -p1 +%patch4 -p1 %build autoreconf -fiv %configure --with-systemdsystemunitdir=%{_unitdir} ++++++ fix-cpu-spin.patch ++++++ Git-commit: 9a4160bcfc4b859b848fabed112ee9382be3cc27 From: NeilBrown <[email protected]> Date: Tue, 4 Feb 2014 15:47:00 +1100 Subject: [PATCH] cachefilesd can spin when disk space is short. References: bnc#843575 When cachefilesd finds that it needs to cull, but that culling doesn't achieve anything, it sets an alarm to wake it in 30 seconds to try again. But as read_cache_state() will detect that culling is still needed, it will immediately try again anyway. This results in 100% cpu usage of no value. This patch causes culling to be blocked until the 30 second alarm goes off. It also changes the test to decide whether to enter poll() after blocking signals to test exactly those values that might be changed by a signal. Testing these is important, testing anything else is pointless. Signed-off-by: NeilBrown <[email protected]> --- cachefilesd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- cachefilesd-0.10.5.orig/cachefilesd.c +++ cachefilesd-0.10.5/cachefilesd.c @@ -98,6 +98,7 @@ static struct object **cullready; static int oldest_build = -1; static int oldest_ready = -1; static int ncullable = 0; +static int cull_delayed = 0; static const char *configfile = "/etc/cachefilesd.conf"; @@ -244,6 +245,7 @@ static void sigio(int sig) static void sigalrm(int sig) { jumpstart_scan = 1; + cull_delayed = 0; } /*****************************************************************************/ @@ -605,11 +607,11 @@ static void cachefilesd(void) /* sleep without racing on reap and cull with the signal * handlers */ - if (!scan && !reap && !cull) { + if (!scan && !reap && !(cull && !cull_delayed)) { if (sigprocmask(SIG_BLOCK, &sigs, &osigs) < 0) oserror("Unable to block signals"); - if (!reap && !cull) { + if (!reap && !stop && !jumpstart_scan) { if (ppoll(pollfds, 1, NULL, &osigs) < 0 && errno != EINTR) oserror("Unable to suspend process"); @@ -636,7 +638,7 @@ static void cachefilesd(void) if (cull) { if (oldest_ready >= 0) cull_objects(); - else if (oldest_build < 0) + else if (oldest_build < 0 && !cull_delayed) jumpstart_scan = 1; } @@ -1351,6 +1353,7 @@ static void decant_cull_table(void) /* if nothing there, scan again in a short while */ if (oldest_build < 0) { + cull_delayed = 1; signal(SIGALRM, sigalrm); alarm(30); return; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
