summaryrefslogtreecommitdiffstats
path: root/fs-block-preempt-rt-support.patch
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-09 17:28:50 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-09 17:28:50 -0500
commitdf67451664637854e23d676983f2f8fbf7fffb50 (patch)
tree7fda580263803763a5db398996e30c4e5f0e35e8 /fs-block-preempt-rt-support.patch
downloadrt-patches-df67451664637854e23d676983f2f8fbf7fffb50.tar.gz
v2.6.33.5-rc25: initial patch importstart
The goal is to capture the RT work as a linear series of merge-free standalone commits. Changes made in merges don't lend themselves to easy viewing or rebasing onto other versions. You typically end up being forced to just generate a giant opaque diff if merges are in play. In order to have the RT patchset as a linear merge-free set of commits, we have to start somewhere. With the benefit of hindsight, choosing 33-rt25 makes sense since we can immediately nullify the VFS commits with their corresponding revert. $ git rev-list v2.6.33.5-rt25 ^v2.6.33.5 |wc -l 699 $ git rev-list --no-merges v2.6.33.5-rt25 ^v2.6.33.5 |wc -l 618 Unfortunately you can see there are ~80 merge commits mixed in there. Even if you assume the most trivial merge conflict, there are still ~100 instances where the 620 commits will fail to apply lurking. Rewinding deeper into the 33 devel cycle doesn't help, since ~2/3 of them date from 31. $ git rev-list --merges v2.6.33-rc8-rt1 ^v2.6.33-rc8|xargs git describe|grep v2 69 $ git rev-list --merges v2.6.33-rc8-rt1 ^v2.6.33-rc8|xargs git describe|grep v2 29 So, export the 618 raw commits (what you see here) and dive in. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'fs-block-preempt-rt-support.patch')
-rw-r--r--fs-block-preempt-rt-support.patch175
1 files changed, 175 insertions, 0 deletions
diff --git a/fs-block-preempt-rt-support.patch b/fs-block-preempt-rt-support.patch
new file mode 100644
index 0000000..eeec210
--- /dev/null
+++ b/fs-block-preempt-rt-support.patch
@@ -0,0 +1,175 @@
+From e97977e5171636cba43ae9d30f00cb82e175511b Mon Sep 17 00:00:00 2001
+From: Ingo Molnar <mingo@elte.hu>
+Date: Fri, 3 Jul 2009 08:30:12 -0500
+Subject: [PATCH] fs/block: preempt-rt support
+
+commit e97977e5171636cba43ae9d30f00cb82e175511b in tip.
+
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+
+diff --git a/block/blk-core.c b/block/blk-core.c
+index 4b45435..712b29b 100644
+--- a/block/blk-core.c
++++ b/block/blk-core.c
+@@ -201,7 +201,7 @@ EXPORT_SYMBOL(blk_dump_rq_flags);
+ */
+ void blk_plug_device(struct request_queue *q)
+ {
+- WARN_ON(!irqs_disabled());
++ WARN_ON_NONRT(!irqs_disabled());
+
+ /*
+ * don't plug a stopped queue, it must be paired with blk_start_queue()
+@@ -241,7 +241,7 @@ EXPORT_SYMBOL(blk_plug_device_unlocked);
+ */
+ int blk_remove_plug(struct request_queue *q)
+ {
+- WARN_ON(!irqs_disabled());
++ WARN_ON_NONRT(!irqs_disabled());
+
+ if (!queue_flag_test_and_clear(QUEUE_FLAG_PLUGGED, q))
+ return 0;
+@@ -333,7 +333,7 @@ EXPORT_SYMBOL(blk_unplug);
+ **/
+ void blk_start_queue(struct request_queue *q)
+ {
+- WARN_ON(!irqs_disabled());
++ WARN_ON_NONRT(!irqs_disabled());
+
+ queue_flag_clear(QUEUE_FLAG_STOPPED, q);
+ __blk_run_queue(q);
+diff --git a/fs/aio.c b/fs/aio.c
+index d065b2c..05e61f7 100644
+--- a/fs/aio.c
++++ b/fs/aio.c
+@@ -612,9 +612,11 @@ static void use_mm(struct mm_struct *mm)
+ task_lock(tsk);
+ active_mm = tsk->active_mm;
+ atomic_inc(&mm->mm_count);
++ local_irq_disable(); // FIXME
++ switch_mm(active_mm, mm, tsk);
+ tsk->mm = mm;
+ tsk->active_mm = mm;
+- switch_mm(active_mm, mm, tsk);
++ local_irq_enable();
+ task_unlock(tsk);
+
+ mmdrop(active_mm);
+diff --git a/fs/dcache.c b/fs/dcache.c
+index 9e5cd3c..ce00455 100644
+--- a/fs/dcache.c
++++ b/fs/dcache.c
+@@ -726,8 +726,9 @@ void shrink_dcache_for_umount(struct super_block *sb)
+ {
+ struct dentry *dentry;
+
+- if (down_read_trylock(&sb->s_umount))
+- BUG();
++// -rt: this might succeed there ...
++// if (down_read_trylock(&sb->s_umount))
++// BUG();
+
+ dentry = sb->s_root;
+ sb->s_root = NULL;
+diff --git a/fs/exec.c b/fs/exec.c
+index 4a8849e..8d5f4bd 100644
+--- a/fs/exec.c
++++ b/fs/exec.c
+@@ -48,6 +48,7 @@
+ #include <linux/security.h>
+ #include <linux/ima.h>
+ #include <linux/syscalls.h>
++#include <linux/delay.h>
+ #include <linux/tsacct_kern.h>
+ #include <linux/cn_proc.h>
+ #include <linux/audit.h>
+@@ -719,10 +720,12 @@ static int exec_mmap(struct mm_struct *mm)
+ }
+ }
+ task_lock(tsk);
++ local_irq_disable();
+ active_mm = tsk->active_mm;
++ activate_mm(active_mm, mm);
+ tsk->mm = mm;
+ tsk->active_mm = mm;
+- activate_mm(active_mm, mm);
++ local_irq_enable();
+ task_unlock(tsk);
+ arch_pick_mmap_layout(mm);
+ if (old_mm) {
+diff --git a/fs/file.c b/fs/file.c
+index f313314..710e9b0 100644
+--- a/fs/file.c
++++ b/fs/file.c
+@@ -102,14 +102,15 @@ void free_fdtable_rcu(struct rcu_head *rcu)
+ kfree(fdt->open_fds);
+ kfree(fdt);
+ } else {
+- fddef = &get_cpu_var(fdtable_defer_list);
++
++ fddef = &per_cpu(fdtable_defer_list, raw_smp_processor_id());
++
+ spin_lock(&fddef->lock);
+ fdt->next = fddef->next;
+ fddef->next = fdt;
+ /* vmallocs are handled from the workqueue context */
+ schedule_work(&fddef->wq);
+ spin_unlock(&fddef->lock);
+- put_cpu_var(fdtable_defer_list);
+ }
+ }
+
+diff --git a/fs/pipe.c b/fs/pipe.c
+index 52c4151..7f30ed2 100644
+--- a/fs/pipe.c
++++ b/fs/pipe.c
+@@ -434,8 +434,14 @@ redo:
+ wake_up_interruptible_sync(&pipe->wait);
+ kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
+ }
++ /*
++ * Hack: we turn off atime updates for -RT kernels.
++ * Who uses them on pipes anyway?
++ */
++#ifndef CONFIG_PREEMPT_RT
+ if (ret > 0)
+ file_accessed(filp);
++#endif
+ return ret;
+ }
+
+@@ -607,8 +613,14 @@ out:
+ wake_up_interruptible_sync(&pipe->wait);
+ kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
+ }
++ /*
++ * Hack: we turn off atime updates for -RT kernels.
++ * Who uses them on pipes anyway?
++ */
++#ifndef CONFIG_PREEMPT_RT
+ if (ret > 0)
+ file_update_time(filp);
++#endif
+ return ret;
+ }
+
+diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
+index 6f61b7c..dc39a6a 100644
+--- a/fs/proc/task_mmu.c
++++ b/fs/proc/task_mmu.c
+@@ -137,8 +137,10 @@ static void *m_start(struct seq_file *m, loff_t *pos)
+ vma = NULL;
+ if ((unsigned long)l < mm->map_count) {
+ vma = mm->mmap;
+- while (l-- && vma)
++ while (l-- && vma) {
+ vma = vma->vm_next;
++ cond_resched();
++ }
+ goto out;
+ }
+
+--
+1.7.1.1
+