2006-11-28 08:43:17

by Ingo Molnar

[permalink] [raw]
Subject: 2.6.19-rc6-rt8

i have released the 2.6.19-rc6-rt8 tree, which can be downloaded from
the usual place:

http://redhat.com/~mingo/realtime-preempt/

lots of fixes are included in -rt8. In particular the inode/dentry leak
found and fixed by Karsten Wiese (and the related OOMs reported by
others) should be fixed.

I also started tracking Linus' latest -git tree, so all upstream
stabilization fixes since -rc6 are included in -rt8 as well.

[ the latest KVM patchqueue is now included in -rt too. KVM should not
impact anyone unless enabled. The YUM rpms have KVM enabled on both
i686 and x86_64. ]

to build a 2.6.19-rc6-rt8 tree, the following patches should be applied:

http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz2
http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.19-rc6.bz2
http://redhat.com/~mingo/realtime-preempt/patch-2.6.19-rc6-rt8

the -rt YUM repository for Fedora Core 6 and 5, for architectures x86_64
and i686 can be activated via:

cd /etc/yum.repos.d
wget http://people.redhat.com/~mingo/realtime-preempt/rt.repo

yum install kernel-rt.x86_64 # on x86_64
yum install kernel-rt # on i686

yum update kernel-rt # refresh - or enable yum-updatesd

as usual, bugreports, fixes and suggestions are welcome,

Ingo


2006-11-28 13:04:42

by Sergio Monteiro Basto

[permalink] [raw]
Subject: rt7 sucess Re: 2.6.19-rc6-rt8

On Mon, 2006-11-27 at 10:49 +0100, Ingo Molnar wrote:
> i have released the 2.6.19-rc6-rt8 tree, which can be downloaded from
> the usual place:
>
> http://redhat.com/~mingo/realtime-preempt/

Hi, yesterday I have done a "yum -y update" and have installed rt7.
I test it with success, boot without notsc, don't loose any timer ticket
and found a second new clocksource, tsc. Now I have apci_pm, jiffies and
tsc.
so now for the first time I have a kernel that can boot without boot
options (and without major problems) .

Thanks,
>
> I also started tracking Linus' latest -git tree, so all upstream
> stabilization fixes since -rc6 are included in -rt8 as well.

I don't know how you work with gits, but could be a good idea, if you
split Linus gits of rts patches, I don't know if it is difficult, it is
just an idea.

Thanks,
--
Sérgio M. B.

2006-11-28 22:40:01

by Karsten Wiese

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8

Am Montag, 27. November 2006 10:49 schrieb Ingo Molnar:
> i have released the 2.6.19-rc6-rt8 tree, which can be downloaded from

I saw usb transport errors here before rebooting with
nmi_watchdog=0
contained in kernel command line.

Testcase stalled within 2 minutes before change,
ticks happily after change for 15 minutes now.
.config is a "release" type, no debugging options.

Karsten

2006-11-29 00:04:33

by Karsten Wiese

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8

Am Dienstag, 28. November 2006 23:40 schrieb Karsten Wiese:
> Am Montag, 27. November 2006 10:49 schrieb Ingo Molnar:
> > i have released the 2.6.19-rc6-rt8 tree, which can be downloaded from
>
> I saw usb transport errors here before rebooting with
> nmi_watchdog=0
> contained in kernel command line.
>
> Testcase stalled within 2 minutes before change,
> ticks happily after change for 15 minutes now.
> .config is a "release" type, no debugging options.

After estimated 15 minutes more it bugged again.
Related dmesg translates to linux error
-EXDEV
propably caused by the following lines:

<snip>
static int uhci_result_isochronous(struct uhci_hcd *uhci, struct urb *urb)
{
struct uhci_td *td, *tmp;
struct urb_priv *urbp = urb->hcpriv;
struct uhci_qh *qh = urbp->qh;

list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
unsigned int ctrlstat;
int status;
int actlength;

if (uhci_frame_before_eq(uhci->cur_iso_frame, qh->iso_frame))
return -EINPROGRESS;

uhci_remove_tds_from_frame(uhci, qh->iso_frame);

ctrlstat = td_status(td);
if (ctrlstat & TD_CTRL_ACTIVE) {
status = -EXDEV; /* TD was added too late? */
</snip>

Karsten

2006-11-29 01:22:08

by Hu Gang

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8

On Mon, 27 Nov 2006 10:49:27 +0100
Ingo Molnar <[email protected]> wrote:

> i have released the 2.6.19-rc6-rt8 tree, which can be downloaded from
> the usual place:
>
> http://redhat.com/~mingo/realtime-preempt/

attached patch to making it compile and works in my PowerBook G4.


Index: linux-2.6.19-rc6-rt5/arch/powerpc/kernel/time.c
===================================================================
--- linux-2.6.19-rc6-rt5.orig/arch/powerpc/kernel/time.c 2006-11-28 22:13:54.000000000 +0000
+++ linux-2.6.19-rc6-rt5/arch/powerpc/kernel/time.c 2006-11-28 22:15:48.000000000 +0000
@@ -507,7 +507,7 @@
if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) {
tb_last_jiffy = tb_next_jiffy;
do_timer(1);
- timer_recalc_offset(tb_last_jiffy);
+ /*timer_recalc_offset(tb_last_jiffy);*/
timer_check_rtc();
}
write_sequnlock(&xtime_lock);
Index: linux-2.6.19-rc6-rt5/include/asm-powerpc/semaphore.h
===================================================================
--- linux-2.6.19-rc6-rt5.orig/include/asm-powerpc/semaphore.h 2006-11-28 22:13:54.000000000 +0000
+++ linux-2.6.19-rc6-rt5/include/asm-powerpc/semaphore.h 2006-11-28 22:15:48.000000000 +0000
@@ -10,7 +10,7 @@

#ifdef __KERNEL__

-#include <linux/config.h>
+/*#include <linux/config.h>*/
#include <asm/atomic.h>
#include <asm/system.h>
#include <linux/wait.h>
Index: linux-2.6.19-rc6-rt5/mm/page_alloc.c
===================================================================
--- linux-2.6.19-rc6-rt5.orig/mm/page_alloc.c 2006-11-28 22:13:54.000000000 +0000
+++ linux-2.6.19-rc6-rt5/mm/page_alloc.c 2006-11-28 22:15:48.000000000 +0000
@@ -2800,7 +2800,9 @@

void __init page_alloc_init(void)
{
+#ifdef CONFIG_HOTPLUG_CPU
hotcpu_notifier(page_alloc_cpu_notify, 0);
+#endif
}

/*

2006-11-29 06:43:13

by Ingo Molnar

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8


* Hu Gang <[email protected]> wrote:

> On Mon, 27 Nov 2006 10:49:27 +0100
> Ingo Molnar <[email protected]> wrote:
>
> > i have released the 2.6.19-rc6-rt8 tree, which can be downloaded from
> > the usual place:
> >
> > http://redhat.com/~mingo/realtime-preempt/
>
> attached patch to making it compile and works in my PowerBook G4.

thanks, applied. I'll let the PPC -rt folks sort out the hack effects.
Do you have CONFIG_HIGH_RES_TIMERS enabled?

Ingo

2006-11-29 06:49:28

by Hu Gang

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8

On Wed, 29 Nov 2006 07:41:09 +0100
Ingo Molnar <[email protected]> wrote:

>
> * Hu Gang <[email protected]> wrote:
>
> > On Mon, 27 Nov 2006 10:49:27 +0100
> > Ingo Molnar <[email protected]> wrote:
> >
> > > i have released the 2.6.19-rc6-rt8 tree, which can be downloaded from
> > > the usual place:
> > >
> > > http://redhat.com/~mingo/realtime-preempt/
> >
> > attached patch to making it compile and works in my PowerBook G4.
>
> thanks, applied. I'll let the PPC -rt folks sort out the hack effects.
> Do you have CONFIG_HIGH_RES_TIMERS enabled?
no.


[hugang@:~]$ uname -a
Linux hugang.soulinfo.com 2.6.19-rc6-rt8 #2 PREEMPT Wed Nov 29 09:29:43 UTC 2006 ppc GNU/Linux
[hugang@:~]$ zgrep CONFIG_HIGH_RES_TIMERS /proc/config.gz
[hugang@:~]$

2006-11-29 07:00:38

by Ingo Molnar

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8


* Karsten Wiese <[email protected]> wrote:

> Am Montag, 27. November 2006 10:49 schrieb Ingo Molnar:
> > i have released the 2.6.19-rc6-rt8 tree, which can be downloaded from
>
> I saw usb transport errors here before rebooting with
> nmi_watchdog=0
> contained in kernel command line.

so nmi_watchdog=1 (or was it nmi_watchdog=2 ?) caused these problems -
and then nmi_watchdog=0 fixed them? i686? Extremely weird. Does the
patch below fix the issue perhaps?

Ingo

Index: linux/arch/i386/kernel/nmi.c
===================================================================
--- linux.orig/arch/i386/kernel/nmi.c
+++ linux/arch/i386/kernel/nmi.c
@@ -932,12 +932,14 @@ notrace __kprobes int nmi_watchdog_tick(

__profile_tick(CPU_PROFILING, regs);

+#if 0
/* check for other users first */
if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT)
== NOTIFY_STOP) {
rc = 1;
touched = 1;
}
+#endif

/*
* Take the local apic timer and PIT/HPET into account. We don't
Index: linux/arch/x86_64/kernel/nmi.c
===================================================================
--- linux.orig/arch/x86_64/kernel/nmi.c
+++ linux/arch/x86_64/kernel/nmi.c
@@ -814,12 +814,14 @@ int __kprobes nmi_watchdog_tick(struct p

__profile_tick(CPU_PROFILING, regs);

+#if 0
/* check for other users first */
if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT)
== NOTIFY_STOP) {
rc = 1;
touched = 1;
}
+#endif

sum = read_pda(apic_timer_irqs);
if (nmi_show_regs[cpu]) {

2006-11-29 07:01:54

by Ingo Molnar

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8


* Hu Gang <[email protected]> wrote:

> > thanks, applied. I'll let the PPC -rt folks sort out the hack effects.
> > Do you have CONFIG_HIGH_RES_TIMERS enabled?
> no.
>
>
> [hugang@:~]$ uname -a
> Linux hugang.soulinfo.com 2.6.19-rc6-rt8 #2 PREEMPT Wed Nov 29 09:29:43 UTC 2006 ppc GNU/Linux
> [hugang@:~]$ zgrep CONFIG_HIGH_RES_TIMERS /proc/config.gz
> [hugang@:~]$

could you send me your config? (i'm just curious what else is
enabled/disabled)

Ingo

2006-11-29 07:10:25

by Ingo Molnar

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8


* Karsten Wiese <[email protected]> wrote:

> After estimated 15 minutes more it bugged again.
> Related dmesg translates to linux error
> -EXDEV
> propably caused by the following lines:
>
> <snip>
> static int uhci_result_isochronous(struct uhci_hcd *uhci, struct urb *urb)

hm. Below are all the USB changes done by -rt. Maybe one of them has
some side-effect?

Ingo

Index: linux/drivers/usb/core/devio.c
===================================================================
--- linux.orig/drivers/usb/core/devio.c
+++ linux/drivers/usb/core/devio.c
@@ -309,10 +309,11 @@ static void async_completed(struct urb *
struct async *as = urb->context;
struct dev_state *ps = as->ps;
struct siginfo sinfo;
+ unsigned long flags;

- spin_lock(&ps->lock);
- list_move_tail(&as->asynclist, &ps->async_completed);
- spin_unlock(&ps->lock);
+ spin_lock_irqsave(&ps->lock, flags);
+ list_move_tail(&as->asynclist, &ps->async_completed);
+ spin_unlock_irqrestore(&ps->lock, flags);
if (as->signr) {
sinfo.si_signo = as->signr;
sinfo.si_errno = as->urb->status;
Index: linux/drivers/usb/core/hcd.c
===================================================================
--- linux.orig/drivers/usb/core/hcd.c
+++ linux/drivers/usb/core/hcd.c
@@ -517,13 +517,11 @@ error:
}

/* any errors get returned through the urb completion */
- local_irq_save (flags);
- spin_lock (&urb->lock);
+ spin_lock_irqsave(&urb->lock, flags);
if (urb->status == -EINPROGRESS)
urb->status = status;
- spin_unlock (&urb->lock);
+ spin_unlock_irqrestore(&urb->lock, flags);
usb_hcd_giveback_urb (hcd, urb);
- local_irq_restore (flags);
return 0;
}

@@ -551,8 +549,7 @@ void usb_hcd_poll_rh_status(struct usb_h
if (length > 0) {

/* try to complete the status urb */
- local_irq_save (flags);
- spin_lock(&hcd_root_hub_lock);
+ spin_lock_irqsave(&hcd_root_hub_lock, flags);
urb = hcd->status_urb;
if (urb) {
spin_lock(&urb->lock);
@@ -568,14 +565,13 @@ void usb_hcd_poll_rh_status(struct usb_h
spin_unlock(&urb->lock);
} else
length = 0;
- spin_unlock(&hcd_root_hub_lock);
+ spin_unlock_irqrestore(&hcd_root_hub_lock, flags);

/* local irqs are always blocked in completions */
if (length > 0)
usb_hcd_giveback_urb (hcd, urb);
else
hcd->poll_pending = 1;
- local_irq_restore (flags);
}

/* The USB 2.0 spec says 256 ms. This is close enough and won't
@@ -647,17 +643,15 @@ static int usb_rh_urb_dequeue (struct us
} else { /* Status URB */
if (!hcd->uses_new_polling)
del_timer (&hcd->rh_timer);
- local_irq_save (flags);
- spin_lock (&hcd_root_hub_lock);
+ spin_lock_irqsave(&hcd_root_hub_lock, flags);
if (urb == hcd->status_urb) {
hcd->status_urb = NULL;
urb->hcpriv = NULL;
} else
urb = NULL; /* wasn't fully queued */
- spin_unlock (&hcd_root_hub_lock);
+ spin_unlock_irqrestore(&hcd_root_hub_lock, flags);
if (urb)
usb_hcd_giveback_urb (hcd, urb);
- local_irq_restore (flags);
}

return 0;
@@ -1311,11 +1305,9 @@ void usb_hcd_endpoint_disable (struct us
WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT &&
udev->state != USB_STATE_NOTATTACHED);

- local_irq_disable ();
-
/* ep is already gone from udev->ep_{in,out}[]; no more submits */
rescan:
- spin_lock (&hcd_data_lock);
+ spin_lock_irq(&hcd_data_lock);
list_for_each_entry (urb, &ep->urb_list, urb_list) {
int tmp;

@@ -1323,13 +1315,13 @@ rescan:
if (urb->status != -EINPROGRESS)
continue;
usb_get_urb (urb);
- spin_unlock (&hcd_data_lock);
+ spin_unlock_irq(&hcd_data_lock);

- spin_lock (&urb->lock);
+ spin_lock_irq(&urb->lock);
tmp = urb->status;
if (tmp == -EINPROGRESS)
urb->status = -ESHUTDOWN;
- spin_unlock (&urb->lock);
+ spin_unlock_irq(&urb->lock);

/* kick hcd unless it's already returning this */
if (tmp == -EINPROGRESS) {
@@ -1352,8 +1344,7 @@ rescan:
/* list contents may have changed */
goto rescan;
}
- spin_unlock (&hcd_data_lock);
- local_irq_enable ();
+ spin_unlock_irq(&hcd_data_lock);

/* synchronize with the hardware, so old configuration state
* clears out immediately (and will be freed).
Index: linux/drivers/usb/core/message.c
===================================================================
--- linux.orig/drivers/usb/core/message.c
+++ linux/drivers/usb/core/message.c
@@ -249,8 +249,9 @@ static void sg_clean (struct usb_sg_requ
static void sg_complete (struct urb *urb)
{
struct usb_sg_request *io = urb->context;
+ unsigned long flags;

- spin_lock (&io->lock);
+ spin_lock_irqsave (&io->lock, flags);

/* In 2.5 we require hcds' endpoint queues not to progress after fault
* reports, until the completion callback (this!) returns. That lets
@@ -284,7 +285,7 @@ static void sg_complete (struct urb *urb
* unlink pending urbs so they won't rx/tx bad data.
* careful: unlink can sometimes be synchronous...
*/
- spin_unlock (&io->lock);
+ spin_unlock_irqrestore (&io->lock, flags);
for (i = 0, found = 0; i < io->entries; i++) {
if (!io->urbs [i] || !io->urbs [i]->dev)
continue;
@@ -299,7 +300,7 @@ static void sg_complete (struct urb *urb
} else if (urb == io->urbs [i])
found = 1;
}
- spin_lock (&io->lock);
+ spin_lock_irqsave (&io->lock, flags);
}
urb->dev = NULL;

@@ -309,7 +310,7 @@ static void sg_complete (struct urb *urb
if (!io->count)
complete (&io->complete);

- spin_unlock (&io->lock);
+ spin_unlock_irqrestore (&io->lock, flags);
}


@@ -571,7 +572,7 @@ void usb_sg_cancel (struct usb_sg_reques
dev_warn (&io->dev->dev, "%s, unlink --> %d\n",
__FUNCTION__, retval);
}
- spin_lock (&io->lock);
+ spin_lock_irqsave (&io->lock, flags);
}
spin_unlock_irqrestore (&io->lock, flags);
}
Index: linux/drivers/usb/net/usbnet.c
===================================================================
--- linux.orig/drivers/usb/net/usbnet.c
+++ linux/drivers/usb/net/usbnet.c
@@ -898,6 +898,8 @@ static void tx_complete (struct urb *urb

urb->dev = NULL;
entry->state = tx_done;
+ spin_lock_rt(&dev->txq.lock);
+ spin_unlock_rt(&dev->txq.lock);
defer_bh(dev, skb, &dev->txq);
}

2006-11-29 13:20:59

by Karsten Wiese

[permalink] [raw]
Subject: Re: 2.6.19-rc6-rt8

Am Mittwoch, 29. November 2006 08:06 schrieb Ingo Molnar:
> * Karsten Wiese <[email protected]> wrote:
> > After estimated 15 minutes more it bugged again.
> > Related dmesg translates to linux error
> > -EXDEV
> > propably caused by the following lines:
> >
> > <snip>
> > static int uhci_result_isochronous(struct uhci_hcd *uhci, struct
> > urb *urb)
>
> hm. Below are all the USB changes done by -rt. Maybe one of them has
> some side-effect?

On rc6-rt5 rt-audio with usb-sound runs just fine so far,
and I didn't find any USB changes between rc6-rt5 and rc6-rt8.

Karsten