diff options
5 files changed, 320 insertions, 5 deletions
diff --git a/kernels/linux-libre-rt/PKGBUILD b/kernels/linux-libre-rt/PKGBUILD index de65bc557..1f6b300ab 100644 --- a/kernels/linux-libre-rt/PKGBUILD +++ b/kernels/linux-libre-rt/PKGBUILD @@ -13,7 +13,7 @@ _releasever=6 _rtpatchver=rt9 _pkgver=${_basekernel}.${_releasever} pkgver=${_basekernel}.${_releasever}_${_rtpatchver} -pkgrel=1 +pkgrel=2 _lxopkgver=${_basekernel}.6 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" @@ -32,6 +32,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'boot-logo.patch' 'change-default-console-loglevel.patch' 'criu-no-expert.patch' + 'timers-do-not-raise-softirq-unconditionally.patch' "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") md5sums=('254f59707b6676b59ce5ca5c3c698319' '4b18ce60daff87504e6740670edf6b50' @@ -44,6 +45,7 @@ md5sums=('254f59707b6676b59ce5ca5c3c698319' '44260d2cb1a8b51c119d2ce1f83e457a' '98beb36f9b8cf16e58de2483ea9985e3' 'd50c1ac47394e9aec637002ef3392bd1' + 'a091e206b3cadcd9bcd807f3a0c98922' '71bbddd5f9799aa045660d92baa05845') if [ "$CARCH" != "mips64el" ]; then # don't use the Loongson-specific patches on non-mips64el arches. @@ -64,6 +66,9 @@ prepare() { # add realtime patch patch -p1 -i "${srcdir}/patch-${_pkgver}-${_rtpatchver}.patch" + # revert patch, causing the kernel to hang on very early in the boot process + patch -p1 -R -i "${srcdir}/timers-do-not-raise-softirq-unconditionally.patch" + # add freedo as boot logo patch -Np1 -i "${srcdir}/boot-logo.patch" diff --git a/kernels/linux-libre-rt/timers-do-not-raise-softirq-unconditionally.patch b/kernels/linux-libre-rt/timers-do-not-raise-softirq-unconditionally.patch new file mode 100644 index 000000000..d8f01f2d6 --- /dev/null +++ b/kernels/linux-libre-rt/timers-do-not-raise-softirq-unconditionally.patch @@ -0,0 +1,156 @@ +From 35b6173e6176fc978c635f9e07f1778eff7b76e7 Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner <tglx@linutronix.de> +Date: Thu, 7 Nov 2013 12:21:11 +0100 +Subject: [PATCH] timers: do not raise softirq unconditionally + +Mike, + +On Thu, 7 Nov 2013, Mike Galbraith wrote: + +> On Thu, 2013-11-07 at 04:26 +0100, Mike Galbraith wrote: +> > On Wed, 2013-11-06 at 18:49 +0100, Thomas Gleixner wrote: +> +> > > I bet you are trying to work around some of the side effects of the +> > > occasional tick which is still necessary despite of full nohz, right? +> > +> > Nope, I wanted to check out cost of nohz_full for rt, and found that it +> > doesn't work at all instead, looked, and found that the sole running +> > task has just awakened ksoftirqd when it wants to shut the tick down, so +> > that shutdown never happens. +> +> Like so in virgin 3.10-rt. Box is x3550 M3 booted nowatchdog +> rcu_nocbs=1-3 nohz_full=1-3, and CPUs1-3 are completely isolated via +> cpusets as well. + +well, that very same problem is in mainline if you add "threadirqs" to +the command line. But we can be smart about this. The untested patch +below should address that issue. If that works on mainline we can +adapt it for RT (needs a trylock(&base->lock) there). + +Though it's not a full solution. It needs some thought versus the +softirq code of timers. Assume we have only one timer queued 1000 +ticks into the future. So this change will cause the timer softirq not +to be called until that timer expires and then the timer softirq is +going to do 1000 loops until it catches up with jiffies. That's +anything but pretty ... + +What worries me more is this one: + + pert-5229 [003] d..h1.. 684.482618: softirq_raise: vec=9 [action=RCU] + +The CPU has no callbacks as you shoved them over to cpu 0, so why is +the RCU softirq raised? + +Thanks, + + tglx +------------------ +Message-id: <alpine.DEB.2.02.1311071158350.23353@ionos.tec.linutronix.de> +|CONFIG_NO_HZ_FULL + CONFIG_PREEMPT_RT_FULL = nogo +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + include/linux/hrtimer.h | 3 +-- + kernel/hrtimer.c | 31 +++++++------------------------ + kernel/timer.c | 23 ++++++++++++++++++++--- + 3 files changed, 28 insertions(+), 29 deletions(-) + +--- a/include/linux/hrtimer.h ++++ b/include/linux/hrtimer.h +@@ -461,9 +461,8 @@ extern int schedule_hrtimeout_range_cloc + unsigned long delta, const enum hrtimer_mode mode, int clock); + extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode); + +-/* Soft interrupt function to run the hrtimer queues: */ ++/* Called from the periodic timer tick */ + extern void hrtimer_run_queues(void); +-extern void hrtimer_run_pending(void); + + /* Bootup initialization: */ + extern void __init hrtimers_init(void); +--- a/kernel/hrtimer.c ++++ b/kernel/hrtimer.c +@@ -1694,30 +1694,6 @@ static void run_hrtimer_softirq(struct s + } + + /* +- * Called from timer softirq every jiffy, expire hrtimers: +- * +- * For HRT its the fall back code to run the softirq in the timer +- * softirq context in case the hrtimer initialization failed or has +- * not been done yet. +- */ +-void hrtimer_run_pending(void) +-{ +- if (hrtimer_hres_active()) +- return; +- +- /* +- * This _is_ ugly: We have to check in the softirq context, +- * whether we can switch to highres and / or nohz mode. The +- * clocksource switch happens in the timer interrupt with +- * xtime_lock held. Notification from there only sets the +- * check bit in the tick_oneshot code, otherwise we might +- * deadlock vs. xtime_lock. +- */ +- if (tick_check_oneshot_change(!hrtimer_is_hres_enabled())) +- hrtimer_switch_to_hres(); +-} +- +-/* + * Called from hardirq context every jiffy + */ + void hrtimer_run_queues(void) +@@ -1730,6 +1706,13 @@ void hrtimer_run_queues(void) + if (hrtimer_hres_active()) + return; + ++ /* ++ * Check whether we can switch to highres mode. ++ */ ++ if (tick_check_oneshot_change(!hrtimer_is_hres_enabled()) ++ && hrtimer_switch_to_hres()) ++ return; ++ + for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) { + base = &cpu_base->clock_base[index]; + if (!timerqueue_getnext(&base->active)) +--- a/kernel/timer.c ++++ b/kernel/timer.c +@@ -1439,8 +1439,6 @@ static void run_timer_softirq(struct sof + { + struct tvec_base *base = __this_cpu_read(tvec_bases); + +- hrtimer_run_pending(); +- + if (time_after_eq(jiffies, base->timer_jiffies)) + __run_timers(base); + } +@@ -1450,8 +1448,27 @@ static void run_timer_softirq(struct sof + */ + void run_local_timers(void) + { ++ struct tvec_base *base = __this_cpu_read(tvec_bases); ++ + hrtimer_run_queues(); +- raise_softirq(TIMER_SOFTIRQ); ++ /* ++ * We can access this lockless as we are in the timer ++ * interrupt. If there are no timers queued, nothing to do in ++ * the timer softirq. ++ */ ++ if (!spin_do_trylock(&base->lock)) { ++ raise_softirq(TIMER_SOFTIRQ); ++ return; ++ } ++ if (!base->active_timers) ++ goto out; ++ ++ /* Check whether the next pending timer has expired */ ++ if (time_before_eq(base->next_timer, jiffies)) ++ raise_softirq(TIMER_SOFTIRQ); ++out: ++ rt_spin_unlock_after_trylock_in_irq(&base->lock); ++ + } + + #ifdef __ARCH_WANT_SYS_ALARM diff --git a/libre/gloobus-preview-libre/PKGBUILD b/libre/gloobus-preview-libre/PKGBUILD index 5881a4c2e..0a7cf95d5 100644 --- a/libre/gloobus-preview-libre/PKGBUILD +++ b/libre/gloobus-preview-libre/PKGBUILD @@ -1,16 +1,16 @@ -# $Id: PKGBUILD 91026 2013-05-18 11:44:23Z bgyorgy $ +# $Id: PKGBUILD 104564 2014-01-22 21:49:14Z bgyorgy $ # Maintainer: Balló György <ballogyor+arch at gmail dot com> _pkgname=gloobus-preview pkgname=gloobus-preview-libre pkgver=0.4.5.290 _pkgver=0.4.5-ubuntu11~ppa290 -pkgrel=1.1 +pkgrel=2 pkgdesc="Gnome application designed to enable a full screen preview of any kind of file, with libarchive support" arch=('i686' 'x86_64') url="http://gloobus.net/" license=('GPL') -depends=('gstreamer0.10-base-plugins' 'gtksourceview3' 'poppler-glib' 'python2-dbus' 'python2-gconf' 'taglib' 'xdg-utils') +depends=('gstreamer0.10-base-plugins' 'gtksourceview3' 'poppler-glib' 'python2-dbus' 'python2-gobject' 'gconf' 'taglib' 'xdg-utils') makedepends=('boost' 'bzr' 'djvulibre' 'libspectre') replaces=$_pkgname conflicts=$_pkgname @@ -25,19 +25,22 @@ optdepends=('djvulibre: Preview DjVu documents' 'unoconv: Preview LibreOffice compatible documents' 'libarchive: View content of RAR archives' 'unzip: View content of .ZIP archives') -options=('!libtool') install=$_pkgname.install source=(https://launchpad.net/~gloobus-dev/+archive/$_pkgname/+files/${_pkgname}_$_pkgver.orig.tar.xz gloobus-sushi::bzr+http://bazaar.launchpad.net/~gloobus-dev/gloobus-sushi/gloobus-sushi fix-gtksource-include.patch fix-unoconv.patch use-xdg-open.patch + gloobus-preview-configuration-pygobject3-port.patch + gloobus-sushi-pygobject3-port.patch gloobus-preview-usr-bsdtar-for-rar.patch) md5sums=('27b3db2043ecaf47fa928940bbb4f32a' 'SKIP' 'ca15a3e31cec01d3d4fc5a4e1720f692' '03379c173e67ad1b6804bc609336451d' 'd6d9e2b3e001f0ea8440cccdf90480af' + '16e7a7d892dfde5fd40332fc41de97b0' + '7536f8fbbb2c6bbc0132a2fa25b296b7' 'eeab61846c861540bb16ca00fa14cdb6') prepare() { @@ -56,6 +59,9 @@ prepare() { # Use xdg-open patch -Np1 -i "$srcdir/use-xdg-open.patch" + # Port gloobus-preview-configuration to pygobject3 + patch -Np1 -i "$srcdir/gloobus-preview-configuration-pygobject3-port.patch" + # Use bsdtar (libarchive) if unrar is not found. patch -Np0 -i "$srcdir/gloobus-preview-usr-bsdtar-for-rar.patch" @@ -64,6 +70,9 @@ prepare() { # Python2 fix sed -i 's/python /python2 /' src/gloobus-sushi.in + + # Port gloobus-sushi to pygobject3 + patch -Np1 -i "$srcdir/gloobus-sushi-pygobject3-port.patch" } diff --git a/libre/gloobus-preview-libre/gloobus-preview-configuration-pygobject3-port.patch b/libre/gloobus-preview-libre/gloobus-preview-configuration-pygobject3-port.patch new file mode 100644 index 000000000..2c2540753 --- /dev/null +++ b/libre/gloobus-preview-libre/gloobus-preview-configuration-pygobject3-port.patch @@ -0,0 +1,124 @@ +diff -Naur gloobus-preview-0.4.5-ubuntu11~ppa290.orig/src/gloobus-preview-configuration gloobus-preview-0.4.5-ubuntu11~ppa290/src/gloobus-preview-configuration +--- gloobus-preview-0.4.5-ubuntu11~ppa290.orig/src/gloobus-preview-configuration 2014-01-22 21:54:41.555697168 +0100 ++++ gloobus-preview-0.4.5-ubuntu11~ppa290/src/gloobus-preview-configuration 2014-01-22 21:34:36.867164953 +0100 +@@ -6,10 +6,9 @@ + import os + import sys + import glob +-import gtk ++from gi.repository import Gtk, GConf + import signal + import gettext +-import gconf + #import config + + #=========================== CLASS COLORS =======================================================# +@@ -69,54 +68,54 @@ + def __init__(self): + self.config = config_load() + +- self.client = gconf.client_get_default() ++ self.client = GConf.Client.get_default() + self.gconf_win_layout = self.client.get_string('/apps/metacity/general/button_layout') + + #================= Show In Taskbar ================= # +- self.entry1 = gtk.CheckButton(label=_("Show in TaskBar"), use_underline=False) ++ self.entry1 = Gtk.CheckButton(label=_("Show in TaskBar"), use_underline=False) + self.entry1.set_tooltip_markup(_("When enabled gloobus-preview will be\nshown in the <b>taskbar</b>")) + self.entry1.set_active(self.config.getboolean("Main","taskbar")) + + #================= Allways on top ================= # +- self.entry2 = gtk.CheckButton(label=_("Always on top"), use_underline=False) ++ self.entry2 = Gtk.CheckButton(label=_("Always on top"), use_underline=False) + self.entry2.set_tooltip_markup(_("When enabled gloobus-preview will be\n<b>always on top</b> of the other windows")) + self.entry2.set_active(self.config.getboolean("Main","ontop")) + win.set_keep_above(self.config.getboolean("Main","ontop")) + + + #================= Quit on lose focus ================= # +- self.entry3 = gtk.CheckButton(label=_("Quit on lose focus"), use_underline=False) ++ self.entry3 = Gtk.CheckButton(label=_("Quit on lose focus"), use_underline=False) + self.entry3.set_tooltip_markup(_("When enabled, gloobus-preview will <b>exit</b>\nwhen it loses focus")) + self.entry3.set_active(self.config.getboolean("Main","focus")) + + #================= Win bar layout ================= # +- self.entry4 = gtk.CheckButton(label=_("Window Bar Layout inverted"), use_underline=False) ++ self.entry4 = Gtk.CheckButton(label=_("Window Bar Layout inverted"), use_underline=False) + self.entry4.set_tooltip_markup(_("Layout of the buttons\nclose button on the right/left?")) + self.entry4.set_active(self.config.getboolean("Main","winbar_layout")) + + #================= Use gtk theme ================= # +- self.theme_gtk_entry = gtk.CheckButton(label=_("Use gtk theme"), use_underline=False) ++ self.theme_gtk_entry = Gtk.CheckButton(label=_("Use gtk theme"), use_underline=False) + self.theme_gtk_entry.set_tooltip_markup(_("When enabled, gloobus-preview will use system GTK theme")) + self.theme_gtk_entry.set_active(self.config.getboolean("Theme","gtk")) + + #=================== BUTTONS ===================== # +- container0 = gtk.HBox(True,1) #Save and close buttons ++ container0 = Gtk.HBox(True,1) #Save and close buttons + +- ok_button = gtk.Button(_("Save")) +- cancel_button = gtk.Button(_("Cancel")) ++ ok_button = Gtk.Button(_("Save")) ++ cancel_button = Gtk.Button(_("Cancel")) + + container0.add(cancel_button) + container0.add(ok_button) +- cancel_button.connect('clicked', gtk.main_quit) ++ cancel_button.connect('clicked', Gtk.main_quit) + ok_button.connect('clicked', self.save_conf) + + #============ GENERAL CONTAINER ================== # + +- general_container = gtk.VBox(False,1) ++ general_container = Gtk.VBox(False,1) + +- title = gtk.Label() ++ title = Gtk.Label() + title.set_markup(_("<b>Main settings</b>")) +- align2 = gtk.Alignment(0,0,0,0) ++ align2 = Gtk.Alignment.new(0,0,0,0) + align2.set_padding(0,5,0,0) + align2.add(title) + +@@ -128,11 +127,11 @@ + if self.gconf_win_layout == None: + general_container.add(self.entry4) #Always on top + +- general_container.add(gtk.HSeparator()) +- general_container.add(gtk.Label()) #White Space ++ general_container.add(Gtk.HSeparator()) ++ general_container.add(Gtk.Label()) #White Space + general_container.add(container0) #Close & save buttons + +- align = gtk.Alignment(0,0,0,0); ++ align = Gtk.Alignment.new(0,0,0,0); + align.set_padding(10,5,10,10) + + align.add(general_container) +@@ -155,7 +154,7 @@ + + config_save(self.config) + +- gtk.main_quit() ++ Gtk.main_quit() + + + #==================================== GLOBAL FUNCTIONS ===============================================# +@@ -232,13 +231,13 @@ + g.debug("Path: " + abspath) + g.debug("Config File: " + CONFIG_PATH) + +-win = gtk.Window() ++win = Gtk.Window() + win.set_title(_("Gloobus-Preview Configuration")) + #win.set_default_size(400,150) +-win.connect('delete-event', gtk.main_quit) ++win.connect('delete-event', Gtk.main_quit) + + + gui = GUI() + +-gtk.main() ++Gtk.main() + diff --git a/libre/gloobus-preview-libre/gloobus-sushi-pygobject3-port.patch b/libre/gloobus-preview-libre/gloobus-sushi-pygobject3-port.patch new file mode 100644 index 000000000..f748da875 --- /dev/null +++ b/libre/gloobus-preview-libre/gloobus-sushi-pygobject3-port.patch @@ -0,0 +1,21 @@ +diff -Naur gloobus-sushi.orig/src/gloobus-sushi.py gloobus-sushi/src/gloobus-sushi.py +--- gloobus-sushi.orig/src/gloobus-sushi.py 2014-01-22 21:54:41.297590000 +0100 ++++ gloobus-sushi/src/gloobus-sushi.py 2014-01-22 21:45:21.244184455 +0100 +@@ -16,7 +16,7 @@ + + import dbus + import dbus.service +-import gobject ++from gi.repository import GObject + import os + + from dbus.mainloop.glib import DBusGMainLoop +@@ -28,7 +28,7 @@ + def __init__(self): + bus_name = dbus.service.BusName(DBUS_NAME, bus=dbus.SessionBus()) + super(DBusWrapper, self).__init__(bus_name, DBUS_PATH) +- self.loop = gobject.MainLoop() ++ self.loop = GObject.MainLoop() + self.loop.run() + + @dbus.service.method(DBUS_NAME) |