Commit e97977e5 authored by Ingo Molnar's avatar Ingo Molnar Committed by Thomas Gleixner

fs/block: preempt-rt support

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 6772ca45
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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) {
......
......@@ -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);
}
}
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment