3.12.13-rt21
Subsystems (5)
Dear RT folks!
I'm pleased to announce the v3.12.13-rt21 patch set.
Changes since v3.12.13-rt20
- the recent change to cpu_chill() could defeat its purpose if the task invoking cpu_chill() had a signal pending. Noticed by Ulrich Obergfell and fixed by Steven Rostedt.
- David Miller coverted a few sparc serial drivers.
- the system may deadlock if a high prio process tries to shutdown a network device. This results in a busy loop until the interrupt thread has completed its work which will never happen if its priority is lower compared to the task that requested the shutdown. Reported and fixed by Marc Kleine-Budde.
- I run into a dead lock situtation in ext4 on v3.2. I couldn't reproduce the same lockup on v3.12 but since we keep a similar patch fot ext3 I decided to add one for ext4 just in case the problem is harder to trigger now.
Known issues:
- bcache is disabled.
The delta patch against v3.12.13-rt20 is appended below and can be found here:
https://www.kernel.org/pub/linux/kernel/projects/rt/3.12/incr/patch-3.12.13-rt20-rt21.patch.xz
The RT patch against 3.12.13 can be found here:
https://www.kernel.org/pub/linux/kernel/projects/rt/3.12/patch-3.12.13-rt21.patch.xz
The split quilt queue is available at:
https://www.kernel.org/pub/linux/kernel/projects/rt/3.12/patches-3.12.13-rt21.tar.xz
Sebastian
drivers/tty/serial/sunhv.c +10 -12
@@ -433,13 +433,10 @@ static void sunhv_console_write_paged(struct console *con, const char *s, unsignunsigned long flags;int locked =1 ; -local_irq_save (flags); -if (port->sysrq) { - locked =0 ; - }else if (oops_in_progress) { - locked =spin_trylock (&port->lock); - }else -spin_lock (&port->lock); +if (port->sysrq || oops_in_progress) + locked =spin_trylock_irqsave (&port->lock, flags); +else +spin_lock_irqsave (&port->lock, flags);while (n >0 ) {unsigned long ra =__pa (con_write_page);
@@ -470,8 +467,7 @@ static void sunhv_console_write_paged(struct console *con, const char *s, unsign }if (locked) -spin_unlock (&port->lock); -local_irq_restore (flags); +spin_unlock_irqrestore (&port->lock, flags); }static inline void sunhv_console_putchar (struct uart_port *port,char c)
@@ -492,7 +488,10 @@ static void sunhv_console_write_bychar(struct console *con, const char *s, unsigunsigned long flags;int i, locked =1 ; -local_irq_save (flags); +if (port->sysrq || oops_in_progress) + locked =spin_trylock_irqsave (&port->lock, flags); +else +spin_lock_irqsave (&port->lock, flags);if (port->sysrq) { locked =0 ; }else if (oops_in_progress) {
@@ -507,8 +506,7 @@ static void sunhv_console_write_bychar(struct console *con, const char *s, unsig }if (locked) -spin_unlock (&port->lock); -local_irq_restore (flags); +spin_unlock_irqrestore (&port->lock, flags); }static struct console sunhv_console = {
drivers/tty/serial/sunsab.c +5 -9
@@ -844,20 +844,16 @@ static void sunsab_console_write(struct console *con, const char *s, unsigned n)unsigned long flags;int locked =1 ; -local_irq_save (flags); -if (up->port.sysrq) { - locked =0 ; - }else if (oops_in_progress) { - locked =spin_trylock (&up->port.lock); - }else -spin_lock (&up->port.lock); +if (up->port.sysrq || oops_in_progress) + locked =spin_trylock_irqsave (&up->port.lock, flags); +else +spin_lock_irqsave (&up->port.lock, flags);uart_console_write (&up->port, s, n, sunsab_console_putchar);sunsab_tec_wait (up);if (locked) -spin_unlock (&up->port.lock); -local_irq_restore (flags); +spin_unlock_irqrestore (&up->port.lock, flags); }static int sunsab_console_setup (struct console *con,char *options)
drivers/tty/serial/sunsu.c +5 -9
@@ -1295,13 +1295,10 @@ static void sunsu_console_write(struct console *co, const char *s,unsigned int ier;int locked =1 ; -local_irq_save (flags); -if (up->port.sysrq) { - locked =0 ; - }else if (oops_in_progress) { - locked =spin_trylock (&up->port.lock); - }else -spin_lock (&up->port.lock); +if (up->port.sysrq || oops_in_progress) + locked =spin_trylock_irqsave (&up->port.lock, flags); +else +spin_lock_irqsave (&up->port.lock, flags);/* * First save the UER then disable the interrupts
@@ -1319,8 +1316,7 @@ static void sunsu_console_write(struct console *co, const char *s,serial_out (up,UART_IER , ier);if (locked) -spin_unlock (&up->port.lock); -local_irq_restore (flags); +spin_unlock_irqrestore (&up->port.lock, flags); }/*
drivers/tty/serial/sunzilog.c +5 -9
@@ -1195,20 +1195,16 @@ sunzilog_console_write(struct console *con, const char *s, unsigned int count)unsigned long flags;int locked =1 ; -local_irq_save (flags); -if (up->port.sysrq) { - locked =0 ; - }else if (oops_in_progress) { - locked =spin_trylock (&up->port.lock); - }else -spin_lock (&up->port.lock); +if (up->port.sysrq || oops_in_progress) + locked =spin_trylock_irqsave (&up->port.lock, flags); +else +spin_lock_irqsave (&up->port.lock, flags);uart_console_write (&up->port, s, count, sunzilog_putchar);udelay (2 );if (locked) -spin_unlock (&up->port.lock); -local_irq_restore (flags); +spin_unlock_irqrestore (&up->port.lock, flags); }static int __init sunzilog_console_setup (struct console *con,char *options)
fs/jbd2/checkpoint.c +2 -0
@@ -125,6 +125,8 @@ void __jbd2_log_wait_for_space(journal_t *journal)if (journal->j_flags &JBD2_ABORT )return ;write_unlock (&journal->j_state_lock); +if (current->plug) +io_schedule ();mutex_lock (&journal->j_checkpoint_mutex);/*
kernel/hrtimer.c +18 -7
@@ -1769,12 +1769,13 @@ void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, struct task_struct *task) }EXPORT_SYMBOL_GPL (hrtimer_init_sleeper); -static int __sched do_nanosleep(struct hrtimer_sleeper *t, enum hrtimer_mode mode) +static int __sched do_nanosleep(struct hrtimer_sleeper *t, enum hrtimer_mode mode, +unsigned long state) {hrtimer_init_sleeper (t, current); do { - set_current_state(TASK_INTERRUPTIBLE); + set_current_state(state); hrtimer_start_expires(&t->timer, mode); if (!hrtimer_active(&t->timer)) t->task = NULL;
@@ -1818,7 +1819,8 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart) HRTIMER_MODE_ABS);hrtimer_set_expires_tv64 (&t.timer, restart->nanosleep.expires); -if (do_nanosleep (&t,HRTIMER_MODE_ABS )) +/* cpu_chill() does not care about restart state. */ +if (do_nanosleep (&t,HRTIMER_MODE_ABS ,TASK_INTERRUPTIBLE )) goto out; rmtp = restart->nanosleep.rmtp;
@@ -1835,8 +1837,10 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart)return ret; } -long hrtimer_nanosleep (struct timespec *rqtp,struct timespec __user *rmtp, -const enum hrtimer_mode mode,const clockid_t clockid) +static long +__hrtimer_nanosleep (struct timespec *rqtp,struct timespec __user *rmtp, +const enum hrtimer_mode mode,const clockid_t clockid, +unsigned long state) {struct restart_block *restart;struct hrtimer_sleeper t;
@@ -1849,7 +1853,7 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,hrtimer_init_on_stack (&t.timer, clockid, mode);hrtimer_set_expires_range_ns (&t.timer,timespec_to_ktime (*rqtp), slack); -if (do_nanosleep (&t, mode)) +if (do_nanosleep (&t, mode, state)) goto out;/* Absolute timers do not update the rmtp value and restart: */
@@ -1876,6 +1880,12 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,return ret; } +long hrtimer_nanosleep (struct timespec *rqtp,struct timespec __user *rmtp, +const enum hrtimer_mode mode,const clockid_t clockid) +{ +return __hrtimer_nanosleep (rqtp, rmtp, mode, clockid,TASK_INTERRUPTIBLE ); +} + SYSCALL_DEFINE2(nanosleep, struct timespec __user *, rqtp, struct timespec __user *, rmtp) {
@@ -1902,7 +1912,8 @@ void cpu_chill(void)unsigned int freeze_flag = current->flags &PF_NOFREEZE ; current->flags |=PF_NOFREEZE ; -hrtimer_nanosleep (&tu,NULL ,HRTIMER_MODE_REL ,CLOCK_MONOTONIC ); +__hrtimer_nanosleep (&tu,NULL ,HRTIMER_MODE_REL ,CLOCK_MONOTONIC , +TASK_UNINTERRUPTIBLE );if (!freeze_flag) current->flags &= ~PF_NOFREEZE ; }
localversion-rt +1 -1
@@ -1 +1 @@ --rt20 +-rt21
net/sched/sch_generic.c +1 -1
@@ -850,7 +850,7 @@ void dev_deactivate_many(struct list_head *head)/* Wait for outstanding qdisc_run calls. */ list_for_each_entry (dev, head, unreg_list)while (some_qdisc_is_busy (dev)) -yield (); +msleep (1 ); }void dev_deactivate (struct net_device *dev)