mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch-rt 0/5] more 2.6.26-rt updates
@ 2009-01-30 11:43 Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 1/5] commit 42ef73fe134732b2e91c0326df5fd568da17c4b2 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Jan 23 17:37:49 2009 +0100 Thomas Gleixner
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Thomas Gleixner @ 2009-01-30 11:43 UTC (permalink / raw)
  To: LKML; +Cc: Steven Rostedt, Carsten Emde

Steven,

the following patches are needed to make 2.6.26-rt usable.

Thanks,

	tglx




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch-rt 1/5] commit 42ef73fe134732b2e91c0326df5fd568da17c4b2 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Jan 23 17:37:49 2009 +0100
  2009-01-30 11:43 [patch-rt 0/5] more 2.6.26-rt updates Thomas Gleixner
@ 2009-01-30 11:43 ` Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 2/5] commit 6626bff24578753808c8b5bd4f1619e14e980f0f Author: Thomas Gleixner <tglx@linutronix.de> Date: Sun Jan 25 11:31:36 " Thomas Gleixner
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2009-01-30 11:43 UTC (permalink / raw)
  To: LKML; +Cc: Steven Rostedt, Carsten Emde

[-- Attachment #1: x86-mm-fix-pte-free.patch --]
[-- Type: text/plain, Size: 2451 bytes --]

    x86, mm: fix pte_free()
    
    On -rt we were seeing spurious bad page states like:
    
    Bad page state in process 'firefox'
    page:c1bc2380 flags:0x40000000 mapping:c1bc2390 mapcount:0 count:0
    Trying to fix it up, but a reboot is needed
    Backtrace:
    Pid: 503, comm: firefox Not tainted 2.6.26.8-rt13 #3
    [<c043d0f3>] ? printk+0x14/0x19
    [<c0272d4e>] bad_page+0x4e/0x79
    [<c0273831>] free_hot_cold_page+0x5b/0x1d3
    [<c02739f6>] free_hot_page+0xf/0x11
    [<c0273a18>] __free_pages+0x20/0x2b
    [<c027d170>] __pte_alloc+0x87/0x91
    [<c027d25e>] handle_mm_fault+0xe4/0x733
    [<c043f680>] ? rt_mutex_down_read_trylock+0x57/0x63
    [<c043f680>] ? rt_mutex_down_read_trylock+0x57/0x63
    [<c0218875>] do_page_fault+0x36f/0x88a
    
    This is the case where a concurrent fault already installed the PTE and
    we get to free the newly allocated one.
    
    This is due to pgtable_page_ctor() doing the spin_lock_init(&page->ptl)
    which is overlaid with the {private, mapping} struct.
    
    union {
        struct {
            unsigned long private;
            struct address_space *mapping;
        };
        spinlock_t ptl;
        struct kmem_cache *slab;
        struct page *first_page;
    };
    
    Normally the spinlock is small enough to not stomp on page->mapping, but
    PREEMPT_RT=y has huge 'spin'locks.
    
    But lockdep kernels should also be able to trigger this splat, as the
    lock tracking code grows the spinlock to cover page->mapping.
    
    The obvious fix is calling pgtable_page_dtor() like the regular pte free
    path __pte_free_tlb() does.
    
    It seems all architectures except x86 and nm10300 already do this, and
    nm10300 doesn't seem to use pgtable_page_ctor(), which suggests it
    doesn't do SMP or simply doesnt do MMU at all or something.
    
    Signed-off-by: Peter Zijlstra <a.p.zijlsta@chello.nl>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Cc: <stable@kernel.org>

---
 include/asm-x86/pgalloc.h |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.26.8/include/asm-x86/pgalloc.h
===================================================================
--- linux-2.6.26.8.orig/include/asm-x86/pgalloc.h
+++ linux-2.6.26.8/include/asm-x86/pgalloc.h
@@ -38,6 +38,7 @@ static inline void pte_free_kernel(struc
 
 static inline void pte_free(struct mm_struct *mm, struct page *pte)
 {
+	pgtable_page_dtor(pte);
 	__free_page(pte);
 }
 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch-rt 2/5] commit 6626bff24578753808c8b5bd4f1619e14e980f0f Author: Thomas Gleixner <tglx@linutronix.de> Date: Sun Jan 25 11:31:36 2009 +0100
  2009-01-30 11:43 [patch-rt 0/5] more 2.6.26-rt updates Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 1/5] commit 42ef73fe134732b2e91c0326df5fd568da17c4b2 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Jan 23 17:37:49 2009 +0100 Thomas Gleixner
@ 2009-01-30 11:43 ` Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 3/5] trace: fix typo in kernel/trace/Kconfig Thomas Gleixner
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2009-01-30 11:43 UTC (permalink / raw)
  To: LKML; +Cc: Steven Rostedt, Carsten Emde

[-- Attachment #1: hrtimer-prevent-negative-expiry-value.patch --]
[-- Type: text/plain, Size: 1409 bytes --]

    hrtimer: prevent negative expiry value after clock_was_set()
    
    Impact: prevent false positive WARN_ON() in clockevents_program_event()
    
    clock_was_set() changes the base->offset of CLOCK_REALTIME and
    enforces the reprogramming of the clockevent device to expire timers
    which are based on CLOCK_REALTIME. If the clock change is large enough
    then the subtraction of the timer expiry value and base->offset can
    become negative which triggers the warning in
    clockevents_program_event().
    
    Check the subtraction result and set a negative value to 0.
    
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 kernel/hrtimer.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux-2.6.26.8/kernel/hrtimer.c
===================================================================
--- linux-2.6.26.8.orig/kernel/hrtimer.c
+++ linux-2.6.26.8/kernel/hrtimer.c
@@ -520,6 +520,13 @@ static void hrtimer_force_reprogram(stru
 			continue;
 		timer = rb_entry(base->first, struct hrtimer, node);
 		expires = ktime_sub(timer->expires, base->offset);
+		/*
+		 * clock_was_set() has changed base->offset so the
+		 * result might be negative. Fix it up to prevent a
+		 * false positive in clockevents_program_event()
+		 */
+		if (expires.tv64 < 0)
+			expires.tv64 = 0;
 		if (expires.tv64 < cpu_base->expires_next.tv64)
 			cpu_base->expires_next = expires;
 	}



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch-rt 3/5] trace: fix typo in kernel/trace/Kconfig
  2009-01-30 11:43 [patch-rt 0/5] more 2.6.26-rt updates Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 1/5] commit 42ef73fe134732b2e91c0326df5fd568da17c4b2 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Jan 23 17:37:49 2009 +0100 Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 2/5] commit 6626bff24578753808c8b5bd4f1619e14e980f0f Author: Thomas Gleixner <tglx@linutronix.de> Date: Sun Jan 25 11:31:36 " Thomas Gleixner
@ 2009-01-30 11:43 ` Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 4/5] x86: remove redundant local_irq_enable() in handle_signal() Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 5/5] trace: warn if irqs already enabled in irqs_off latency check Thomas Gleixner
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2009-01-30 11:43 UTC (permalink / raw)
  To: LKML; +Cc: Steven Rostedt, Carsten Emde, Carsten Emde

[-- Attachment #1: typo-in-kernel-trace-kconfig.patch --]
[-- Type: text/plain, Size: 604 bytes --]

Fixed confusing Kconfig label of WAKEUP_LATENCY_HIST

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

--- linux-2.6.26.8-rt13/kernel/trace/Kconfig-orig	2009-01-25 23:06:19.000000000 +0100
+++ linux-2.6.26.8-rt13/kernel/trace/Kconfig	2009-01-25 23:05:07.000000000 +0100
@@ -183,7 +183,7 @@
 	  preemption off timings to create a histogram of latencies.
 
 config WAKEUP_LATENCY_HIST
-	bool "Interrupts off critical timings histogram"
+	bool "Wakeup latency histogram"
 	select TRACING
 	select MARKERS
 	help




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch-rt 4/5] x86: remove redundant local_irq_enable() in handle_signal()
  2009-01-30 11:43 [patch-rt 0/5] more 2.6.26-rt updates Thomas Gleixner
                   ` (2 preceding siblings ...)
  2009-01-30 11:43 ` [patch-rt 3/5] trace: fix typo in kernel/trace/Kconfig Thomas Gleixner
@ 2009-01-30 11:43 ` Thomas Gleixner
  2009-01-30 11:43 ` [patch-rt 5/5] trace: warn if irqs already enabled in irqs_off latency check Thomas Gleixner
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2009-01-30 11:43 UTC (permalink / raw)
  To: LKML; +Cc: Steven Rostedt, Carsten Emde, Carsten Emde

[-- Attachment #1: irqs-do-not-need-to-be-enabled-explicitly-in-handle-signal.patch --]
[-- Type: text/plain, Size: 830 bytes --]

IRQs are already enabled when handle_signal() is called.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/x86/kernel/signal_32.c |    7 -------
 1 file changed, 7 deletions(-)

Index: linux-2.6.26.8/arch/x86/kernel/signal_32.c
===================================================================
--- linux-2.6.26.8.orig/arch/x86/kernel/signal_32.c
+++ linux-2.6.26.8/arch/x86/kernel/signal_32.c
@@ -529,13 +529,6 @@ handle_signal(unsigned long sig, siginfo
 		}
 	}
 
-#ifdef CONFIG_PREEMPT_RT
-	/*
-	 * Fully-preemptible kernel does not need interrupts disabled:
-	 */
-	local_irq_enable();
-	preempt_check_resched();
-#endif
 	/*
 	 * If TF is set due to a debugger (TIF_FORCED_TF), clear the TF
 	 * flag so that register information in the sigcontext is correct.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch-rt 5/5] trace: warn if irqs already enabled in irqs_off latency check
  2009-01-30 11:43 [patch-rt 0/5] more 2.6.26-rt updates Thomas Gleixner
                   ` (3 preceding siblings ...)
  2009-01-30 11:43 ` [patch-rt 4/5] x86: remove redundant local_irq_enable() in handle_signal() Thomas Gleixner
@ 2009-01-30 11:43 ` Thomas Gleixner
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2009-01-30 11:43 UTC (permalink / raw)
  To: LKML; +Cc: Steven Rostedt, Carsten Emde, Carsten Emde

[-- Attachment #1: warn-if-irqs-already-enabled-in-irqs-off-latency-check.patch --]
[-- Type: text/plain, Size: 892 bytes --]

Be consistent: Warn if irqs are already enabled in irqs_off latency
processing, same as in preempt_off and in irqs_off && preempt_off. This
warning can now safely be inserted, after a problem was fixed that
caused false positives.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


---
 kernel/trace/trace_hist.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.26.8/kernel/trace/trace_hist.c
===================================================================
--- linux-2.6.26.8.orig/kernel/trace/trace_hist.c
+++ linux-2.6.26.8/kernel/trace/trace_hist.c
@@ -356,6 +356,7 @@ notrace void tracing_hist_preempt_stop(i
 #ifdef CONFIG_INTERRUPT_OFF_HIST
 	if (irqs_on &&
 	    per_cpu(hist_irqsoff_tracing, cpu)) {
+		WARN_ON(!irqs_disabled());
 		stop = ftrace_now(cpu);
 		stop_set++;
 		start = per_cpu(hist_irqsoff_start, cpu);



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-30 11:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-30 11:43 [patch-rt 0/5] more 2.6.26-rt updates Thomas Gleixner
2009-01-30 11:43 ` [patch-rt 1/5] commit 42ef73fe134732b2e91c0326df5fd568da17c4b2 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Jan 23 17:37:49 2009 +0100 Thomas Gleixner
2009-01-30 11:43 ` [patch-rt 2/5] commit 6626bff24578753808c8b5bd4f1619e14e980f0f Author: Thomas Gleixner <tglx@linutronix.de> Date: Sun Jan 25 11:31:36 " Thomas Gleixner
2009-01-30 11:43 ` [patch-rt 3/5] trace: fix typo in kernel/trace/Kconfig Thomas Gleixner
2009-01-30 11:43 ` [patch-rt 4/5] x86: remove redundant local_irq_enable() in handle_signal() Thomas Gleixner
2009-01-30 11:43 ` [patch-rt 5/5] trace: warn if irqs already enabled in irqs_off latency check Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome