[ANNOUNCE] 3.0-rt3

31 messages, 11 authors, 2011-07-27 · open the first message on its own page

[ANNOUNCE] 3.0-rt3

From: Thomas Gleixner <hidden>
Date: 2011-07-24 10:33:42

Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.

Changes versus 3.0-rt2:

  * Fix earlyprintk really

  * AMD NB fix for allocation in smp function call, reported by Ed

  * Disabled a few config options on RT which have known issues

Patch against 3.0 can be found here:

  http://www.kernel.org/pub/linux/kernel/projects/rt/patch-3.0-rt3.patch.bz2

The split quilt queue is available at:

  http://www.kernel.org/pub/linux/kernel/projects/rt/patches-3.0-rt3.tar.bz2

Delta patch below.

Thanks,

	tglx
----
 arch/x86/include/asm/amd_nb.h         |    6 +
 arch/x86/kernel/cpu/intel_cacheinfo.c |  121 +++++++++++-----------------------
 arch/x86/kernel/early_printk.c        |    2 
 drivers/net/Kconfig                   |    1 
 localversion-rt                       |    2 
 mm/Kconfig                            |    2 
 6 files changed, 51 insertions(+), 83 deletions(-)

Index: linux-2.6/arch/x86/kernel/early_printk.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/early_printk.c
+++ linux-2.6/arch/x86/kernel/early_printk.c
@@ -171,7 +171,7 @@ static struct console early_serial_conso
 
 static inline void early_console_register(struct console *con, int keep_early)
 {
-	if (early_console->index != -1) {
+	if (con->index != -1) {
 		printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n",
 		       con->name);
 		return;
Index: linux-2.6/localversion-rt
===================================================================
--- linux-2.6.orig/localversion-rt
+++ linux-2.6/localversion-rt
@@ -1 +1 @@
--rt2
+-rt3
Index: linux-2.6/arch/x86/kernel/cpu/intel_cacheinfo.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ linux-2.6/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -151,28 +151,17 @@ union _cpuid4_leaf_ecx {
 	u32 full;
 };
 
-struct amd_l3_cache {
-	struct	 amd_northbridge *nb;
-	unsigned indices;
-	u8	 subcaches[4];
-};
-
-struct _cpuid4_info {
+struct _cpuid4_info_regs {
 	union _cpuid4_leaf_eax eax;
 	union _cpuid4_leaf_ebx ebx;
 	union _cpuid4_leaf_ecx ecx;
 	unsigned long size;
-	struct amd_l3_cache *l3;
-	DECLARE_BITMAP(shared_cpu_map, NR_CPUS);
+	struct amd_northbridge *nb;
 };
 
-/* subset of above _cpuid4_info w/o shared_cpu_map */
-struct _cpuid4_info_regs {
-	union _cpuid4_leaf_eax eax;
-	union _cpuid4_leaf_ebx ebx;
-	union _cpuid4_leaf_ecx ecx;
-	unsigned long size;
-	struct amd_l3_cache *l3;
+struct _cpuid4_info {
+	struct _cpuid4_info_regs base;
+	DECLARE_BITMAP(shared_cpu_map, NR_CPUS);
 };
 
 unsigned short			num_cache_leaves;
@@ -314,12 +303,13 @@ struct _cache_attr {
 /*
  * L3 cache descriptors
  */
-static void __cpuinit amd_calc_l3_indices(struct amd_l3_cache *l3)
+static void __cpuinit amd_calc_l3_indices(struct amd_northbridge *nb)
 {
+	struct amd_l3_cache *l3 = &nb->l3_cache;
 	unsigned int sc0, sc1, sc2, sc3;
 	u32 val = 0;
 
-	pci_read_config_dword(l3->nb->misc, 0x1C4, &val);
+	pci_read_config_dword(nb->misc, 0x1C4, &val);
 
 	/* calculate subcache sizes */
 	l3->subcaches[0] = sc0 = !(val & BIT(0));
@@ -333,33 +323,16 @@ static void __cpuinit amd_calc_l3_indice
 static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf,
 					int index)
 {
-	static struct amd_l3_cache *__cpuinitdata l3_caches;
 	int node;
 
 	/* only for L3, and not in virtualized environments */
-	if (index < 3 || amd_nb_num() == 0)
+	if (index < 3)
 		return;
 
-	/*
-	 * Strictly speaking, the amount in @size below is leaked since it is
-	 * never freed but this is done only on shutdown so it doesn't matter.
-	 */
-	if (!l3_caches) {
-		int size = amd_nb_num() * sizeof(struct amd_l3_cache);
-
-		l3_caches = kzalloc(size, GFP_ATOMIC);
-		if (!l3_caches)
-			return;
-	}
-
 	node = amd_get_nb_id(smp_processor_id());
-
-	if (!l3_caches[node].nb) {
-		l3_caches[node].nb = node_to_amd_nb(node);
-		amd_calc_l3_indices(&l3_caches[node]);
-	}
-
-	this_leaf->l3 = &l3_caches[node];
+	this_leaf->nb = node_to_amd_nb(node);
+	if (this_leaf->nb && !this_leaf->nb->l3_cache.indices)
+		amd_calc_l3_indices(this_leaf->nb);
 }
 
 /*
@@ -369,11 +342,11 @@ static void __cpuinit amd_init_l3_cache(
  *
  * @returns: the disabled index if used or negative value if slot free.
  */
-int amd_get_l3_disable_slot(struct amd_l3_cache *l3, unsigned slot)
+int amd_get_l3_disable_slot(struct amd_northbridge *nb, unsigned slot)
 {
 	unsigned int reg = 0;
 
-	pci_read_config_dword(l3->nb->misc, 0x1BC + slot * 4, &reg);
+	pci_read_config_dword(nb->misc, 0x1BC + slot * 4, &reg);
 
 	/* check whether this slot is activated already */
 	if (reg & (3UL << 30))
@@ -387,11 +360,10 @@ static ssize_t show_cache_disable(struct
 {
 	int index;
 
-	if (!this_leaf->l3 ||
-	    !amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
+	if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
 		return -EINVAL;
 
-	index = amd_get_l3_disable_slot(this_leaf->l3, slot);
+	index = amd_get_l3_disable_slot(this_leaf->base.nb, slot);
 	if (index >= 0)
 		return sprintf(buf, "%d\n", index);
 
@@ -408,7 +380,7 @@ show_cache_disable_##slot(struct _cpuid4
 SHOW_CACHE_DISABLE(0)
 SHOW_CACHE_DISABLE(1)
 
-static void amd_l3_disable_index(struct amd_l3_cache *l3, int cpu,
+static void amd_l3_disable_index(struct amd_northbridge *nb, int cpu,
 				 unsigned slot, unsigned long idx)
 {
 	int i;
@@ -421,10 +393,10 @@ static void amd_l3_disable_index(struct 
 	for (i = 0; i < 4; i++) {
 		u32 reg = idx | (i << 20);
 
-		if (!l3->subcaches[i])
+		if (!nb->l3_cache.subcaches[i])
 			continue;
 
-		pci_write_config_dword(l3->nb->misc, 0x1BC + slot * 4, reg);
+		pci_write_config_dword(nb->misc, 0x1BC + slot * 4, reg);
 
 		/*
 		 * We need to WBINVD on a core on the node containing the L3
@@ -434,7 +406,7 @@ static void amd_l3_disable_index(struct 
 		wbinvd_on_cpu(cpu);
 
 		reg |= BIT(31);
-		pci_write_config_dword(l3->nb->misc, 0x1BC + slot * 4, reg);
+		pci_write_config_dword(nb->misc, 0x1BC + slot * 4, reg);
 	}
 }
 
@@ -448,24 +420,24 @@ static void amd_l3_disable_index(struct 
  *
  * @return: 0 on success, error status on failure
  */
-int amd_set_l3_disable_slot(struct amd_l3_cache *l3, int cpu, unsigned slot,
+int amd_set_l3_disable_slot(struct amd_northbridge *nb, int cpu, unsigned slot,
 			    unsigned long index)
 {
 	int ret = 0;
 
 	/*  check if @slot is already used or the index is already disabled */
-	ret = amd_get_l3_disable_slot(l3, slot);
+	ret = amd_get_l3_disable_slot(nb, slot);
 	if (ret >= 0)
 		return -EINVAL;
 
-	if (index > l3->indices)
+	if (index > nb->l3_cache.indices)
 		return -EINVAL;
 
 	/* check whether the other slot has disabled the same index already */
-	if (index == amd_get_l3_disable_slot(l3, !slot))
+	if (index == amd_get_l3_disable_slot(nb, !slot))
 		return -EINVAL;
 
-	amd_l3_disable_index(l3, cpu, slot, index);
+	amd_l3_disable_index(nb, cpu, slot, index);
 
 	return 0;
 }
@@ -480,8 +452,7 @@ static ssize_t store_cache_disable(struc
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
 
-	if (!this_leaf->l3 ||
-	    !amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
+	if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
 		return -EINVAL;
 
 	cpu = cpumask_first(to_cpumask(this_leaf->shared_cpu_map));
@@ -489,7 +460,7 @@ static ssize_t store_cache_disable(struc
 	if (strict_strtoul(buf, 10, &val) < 0)
 		return -EINVAL;
 
-	err = amd_set_l3_disable_slot(this_leaf->l3, cpu, slot, val);
+	err = amd_set_l3_disable_slot(this_leaf->base.nb, cpu, slot, val);
 	if (err) {
 		if (err == -EEXIST)
 			printk(KERN_WARNING "L3 disable slot %d in use!\n",
@@ -518,7 +489,7 @@ static struct _cache_attr cache_disable_
 static ssize_t
 show_subcaches(struct _cpuid4_info *this_leaf, char *buf, unsigned int cpu)
 {
-	if (!this_leaf->l3 || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
+	if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
 		return -EINVAL;
 
 	return sprintf(buf, "%x\n", amd_get_subcaches(cpu));
@@ -533,7 +504,7 @@ store_subcaches(struct _cpuid4_info *thi
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
 
-	if (!this_leaf->l3 || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
+	if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
 		return -EINVAL;
 
 	if (strict_strtoul(buf, 16, &val) < 0)
@@ -769,7 +740,7 @@ static void __cpuinit cache_shared_cpu_m
 		return;
 	}
 	this_leaf = CPUID4_INFO_IDX(cpu, index);
-	num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing;
+	num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing;
 
 	if (num_threads_sharing == 1)
 		cpumask_set_cpu(cpu, to_cpumask(this_leaf->shared_cpu_map));
@@ -820,29 +791,19 @@ static void __cpuinit free_cache_attribu
 	for (i = 0; i < num_cache_leaves; i++)
 		cache_remove_shared_cpu_map(cpu, i);
 
-	kfree(per_cpu(ici_cpuid4_info, cpu)->l3);
 	kfree(per_cpu(ici_cpuid4_info, cpu));
 	per_cpu(ici_cpuid4_info, cpu) = NULL;
 }
 
-static int
-__cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf)
-{
-	struct _cpuid4_info_regs *leaf_regs =
-		(struct _cpuid4_info_regs *)this_leaf;
-
-	return cpuid4_cache_lookup_regs(index, leaf_regs);
-}
-
 static void __cpuinit get_cpu_leaves(void *_retval)
 {
 	int j, *retval = _retval, cpu = smp_processor_id();
 
 	/* Do cpuid and store the results */
 	for (j = 0; j < num_cache_leaves; j++) {
-		struct _cpuid4_info *this_leaf;
-		this_leaf = CPUID4_INFO_IDX(cpu, j);
-		*retval = cpuid4_cache_lookup(j, this_leaf);
+		struct _cpuid4_info *this_leaf = CPUID4_INFO_IDX(cpu, j);
+
+		*retval = cpuid4_cache_lookup_regs(j, &this_leaf->base);
 		if (unlikely(*retval < 0)) {
 			int i;
 
@@ -900,16 +861,16 @@ static ssize_t show_##file_name(struct _
 	return sprintf(buf, "%lu\n", (unsigned long)this_leaf->object + val); \
 }
 
-show_one_plus(level, eax.split.level, 0);
-show_one_plus(coherency_line_size, ebx.split.coherency_line_size, 1);
-show_one_plus(physical_line_partition, ebx.split.physical_line_partition, 1);
-show_one_plus(ways_of_associativity, ebx.split.ways_of_associativity, 1);
-show_one_plus(number_of_sets, ecx.split.number_of_sets, 1);
+show_one_plus(level, base.eax.split.level, 0);
+show_one_plus(coherency_line_size, base.ebx.split.coherency_line_size, 1);
+show_one_plus(physical_line_partition, base.ebx.split.physical_line_partition, 1);
+show_one_plus(ways_of_associativity, base.ebx.split.ways_of_associativity, 1);
+show_one_plus(number_of_sets, base.ecx.split.number_of_sets, 1);
 
 static ssize_t show_size(struct _cpuid4_info *this_leaf, char *buf,
 			 unsigned int cpu)
 {
-	return sprintf(buf, "%luK\n", this_leaf->size / 1024);
+	return sprintf(buf, "%luK\n", this_leaf->base.size / 1024);
 }
 
 static ssize_t show_shared_cpu_map_func(struct _cpuid4_info *this_leaf,
@@ -946,7 +907,7 @@ static inline ssize_t show_shared_cpu_li
 static ssize_t show_type(struct _cpuid4_info *this_leaf, char *buf,
 			 unsigned int cpu)
 {
-	switch (this_leaf->eax.split.type) {
+	switch (this_leaf->base.eax.split.type) {
 	case CACHE_TYPE_DATA:
 		return sprintf(buf, "Data\n");
 	case CACHE_TYPE_INST:
@@ -1135,7 +1096,7 @@ static int __cpuinit cache_add_dev(struc
 
 		ktype_cache.default_attrs = default_attrs;
 #ifdef CONFIG_AMD_NB
-		if (this_leaf->l3)
+		if (this_leaf->base.nb)
 			ktype_cache.default_attrs = amd_l3_attrs();
 #endif
 		retval = kobject_init_and_add(&(this_object->kobj),
Index: linux-2.6/arch/x86/include/asm/amd_nb.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/amd_nb.h
+++ linux-2.6/arch/x86/include/asm/amd_nb.h
@@ -19,9 +19,15 @@ extern int amd_numa_init(void);
 extern int amd_get_subcaches(int);
 extern int amd_set_subcaches(int, int);
 
+struct amd_l3_cache {
+	unsigned indices;
+	u8	 subcaches[4];
+};
+
 struct amd_northbridge {
 	struct pci_dev *misc;
 	struct pci_dev *link;
+	struct amd_l3_cache l3_cache;
 };
 
 struct amd_northbridge_info {
Index: linux-2.6/drivers/net/Kconfig
===================================================================
--- linux-2.6.orig/drivers/net/Kconfig
+++ linux-2.6/drivers/net/Kconfig
@@ -3410,6 +3410,7 @@ config NET_FC
 
 config NETCONSOLE
 	tristate "Network console logging support"
+	depends on !PREEMPT_RT_FULL
 	---help---
 	If you want to log kernel messages over the network, enable this.
 	See <file:Documentation/networking/netconsole.txt> for details.
Index: linux-2.6/mm/Kconfig
===================================================================
--- linux-2.6.orig/mm/Kconfig
+++ linux-2.6/mm/Kconfig
@@ -304,7 +304,7 @@ config NOMMU_INITIAL_TRIM_EXCESS
 
 config TRANSPARENT_HUGEPAGE
 	bool "Transparent Hugepage Support"
-	depends on X86 && MMU
+	depends on X86 && MMU && !PREEMPT_RT_FULL
 	select COMPACTION
 	help
 	  Transparent Hugepages allows the kernel to use huge pages and

Re: [ANNOUNCE] 3.0-rt3

From: Maarten Lankhorst <hidden>
Date: 2011-07-24 14:40:31

On 07/24/2011 12:33 PM, Thomas Gleixner wrote:
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.

Changes versus 3.0-rt2:

  * Fix earlyprintk really

  * AMD NB fix for allocation in smp function call, reported by Ed

  * Disabled a few config options on RT which have known issues

Patch against 3.0 can be found here:

  http://www.kernel.org/pub/linux/kernel/projects/rt/patch-3.0-rt3.patch.bz2

The split quilt queue is available at:

  http://www.kernel.org/pub/linux/kernel/projects/rt/patches-3.0-rt3.tar.bz2
Oprofile seems to be upset at me, I swear I'm innocent!

[   46.460786] oprofile: using NMI interrupt.
[   47.492263] BUG: sleeping function called from invalid context at kernel/rtmutex.c:645
[   47.492265] in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: kworker/0:1
[   47.492267] Pid: 0, comm: kworker/0:1 Tainted: G         C  3.0.0-rt3-patser+ #39
[   47.492269] Call Trace:
[   47.492270]  <IRQ>  [<ffffffff8103fc0a>] __might_sleep+0xca/0xf0
[   47.492279]  [<ffffffff8160d424>] rt_spin_lock+0x24/0x40
[   47.492282]  [<ffffffff811476c7>] __kmalloc+0xc7/0x370
[   47.492287]  [<ffffffffa0275c85>] ? ppro_setup_ctrs+0x215/0x260 [oprofile]
[   47.492291]  [<ffffffffa0273de0>] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
[   47.492295]  [<ffffffffa0275c85>] ppro_setup_ctrs+0x215/0x260 [oprofile]
[   47.492305]  [<ffffffffa0273de0>] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
[   47.492307]  [<ffffffffa0273de0>] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
[   47.492308]  [<ffffffffa0273ea4>] nmi_cpu_setup+0xc4/0x110 [oprofile]
[   47.492310]  [<ffffffff81094455>] generic_smp_call_function_interrupt+0x95/0x190
[   47.492313]  [<ffffffff8101df77>] smp_call_function_interrupt+0x27/0x40
[   47.492315]  [<ffffffff81615093>] call_function_interrupt+0x13/0x20
[   47.492316]  <EOI>  [<ffffffff8131d0c4>] ? plist_check_head+0x54/0xc0
[   47.492321]  [<ffffffff81371fe8>] ? intel_idle+0xc8/0x120
[   47.492322]  [<ffffffff81371fc7>] ? intel_idle+0xa7/0x120
[   47.492324]  [<ffffffff814a57b0>] cpuidle_idle_call+0xb0/0x230
[   47.492326]  [<ffffffff810011db>] cpu_idle+0x8b/0xe0
[   47.492328]  [<ffffffff815fc82f>] start_secondary+0x1d3/0x1d8

Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
[   37.456712]  [<ffffffff81157dcd>] ? fget_light+0x6d/0x110
[   37.456714]  [<ffffffff810b77b7>] ? audit_syscall_entry+0x2e7/0x310
[   37.456715]  [<ffffffff814c9375>] ? sys_recvmsg+0x75/0x90
[   37.456717]  [<ffffffff810923e6>] compat_sys_futex+0xf6/0x190
[   37.456719]  [<ffffffff8100e864>] ? syscall_trace_enter+0x184/0x210
[   37.456721]  [<ffffffff816158b3>] ia32_do_call+0x13/0x13

Running linux 3.0rt3 with (drm-preempt patched) nouveau out of tree.

Re: [ANNOUNCE] 3.0-rt3

From: Thomas Gleixner <hidden>
Date: 2011-07-24 16:12:25

On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
Oprofile seems to be upset at me, I swear I'm innocent!
I bet you are. Seems oprofile needs some care, but that has to wait a
couple of days as i'm travelling.
 
[   46.460786] oprofile: using NMI interrupt.
[   47.492263] BUG: sleeping function called from invalid context at kernel/rtmutex.c:645
[   47.492265] in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: kworker/0:1
[   47.492267] Pid: 0, comm: kworker/0:1 Tainted: G         C  3.0.0-rt3-patser+ #39
[   47.492269] Call Trace:
[   47.492270]  <IRQ>  [<ffffffff8103fc0a>] __might_sleep+0xca/0xf0
[   47.492279]  [<ffffffff8160d424>] rt_spin_lock+0x24/0x40
[   47.492282]  [<ffffffff811476c7>] __kmalloc+0xc7/0x370
Grrr. Allocating memory from SMP function calls seems to become a
pattern :(
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
[   37.456712]  [<ffffffff81157dcd>] ? fget_light+0x6d/0x110
[   37.456714]  [<ffffffff810b77b7>] ? audit_syscall_entry+0x2e7/0x310
[   37.456715]  [<ffffffff814c9375>] ? sys_recvmsg+0x75/0x90
[   37.456717]  [<ffffffff810923e6>] compat_sys_futex+0xf6/0x190
[   37.456719]  [<ffffffff8100e864>] ? syscall_trace_enter+0x184/0x210
[   37.456721]  [<ffffffff816158b3>] ia32_do_call+0x13/0x13
Urrgh, that's not a good one. Darren, can you please have a look at that?

Thanks,

	tglx

Re: [ANNOUNCE] 3.0-rt3

From: hermann <hidden>
Date: 2011-07-24 16:42:42

 schrieb Thomas Gleixner:
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.

Changes versus 3.0-rt2:

  * Fix earlyprintk really
Hi

I still have some trouble with rt1 - rt3. 
During boot, the kernel is absolutely silent, sometimes it hangs on boot,
sometimes it hangs on login, sometimes it freeze without any known reason 
during session (no heavy load or some thing like that).
I cant find any meaningful log, so I just can report it as it is here.
rc7-rt0 works very well here, I build 3.0-rt1 - rt3 with the same config 
then rt0.

regards
hermann

Re: [ANNOUNCE] 3.0-rt3

From: Thomas Gleixner <hidden>
Date: 2011-07-24 16:44:21

On Sun, 24 Jul 2011, hermann wrote:
I still have some trouble with rt1 - rt3. 
During boot, the kernel is absolutely silent, sometimes it hangs on boot,
sometimes it hangs on login, sometimes it freeze without any known reason 
during session (no heavy load or some thing like that).
I cant find any meaningful log, so I just can report it as it is here.
rc7-rt0 works very well here, I build 3.0-rt1 - rt3 with the same config 
then rt0.
Hmm, can you please provide your .config and a demsg from a rc7-rt0 boot?

Thanks,

	tglx

Re: [ANNOUNCE] 3.0-rt3

From: hermann <hidden>
Date: 2011-07-24 16:54:01

Am Sonntag, den 24.07.2011, 18:44 +0200 schrieb Thomas Gleixner:
On Sun, 24 Jul 2011, hermann wrote:
quoted
I still have some trouble with rt1 - rt3. 
During boot, the kernel is absolutely silent, sometimes it hangs on boot,
sometimes it hangs on login, sometimes it freeze without any known reason 
during session (no heavy load or some thing like that).
I cant find any meaningful log, so I just can report it as it is here.
rc7-rt0 works very well here, I build 3.0-rt1 - rt3 with the same config 
then rt0.
Hmm, can you please provide your .config and a demsg from a rc7-rt0 boot?

Thanks,

	tglx
Sure, it's attached

regards
hermann 

Re: [ANNOUNCE] 3.0-rt3

From: Georgiewskiy Yuriy <hidden>
Date: 2011-07-24 18:12:16

On 2011-07-24 18:42 +0200, hermann wrote Thomas Gleixner:

Hi, I confirm it too - random freezes during normal work, no load, no logs too, sometimes 
while starting X, sometimes after X started and worked, also randome freezes 
while suspend-resume то ram aka ACPI S3 state.

h> schrieb Thomas Gleixner:
h>
h>> Dear RT Folks,
h>> 
h>> I'm pleased to announce the 3.0-rt3 release.
h>> 
h>> Changes versus 3.0-rt2:
h>> 
h>>   * Fix earlyprintk really
h>> 
h>
h>Hi
h>
h>I still have some trouble with rt1 - rt3. 
h>During boot, the kernel is absolutely silent, sometimes it hangs on boot,
h>sometimes it hangs on login, sometimes it freeze without any known reason 
h>during session (no heavy load or some thing like that).
h>I cant find any meaningful log, so I just can report it as it is here.
h>rc7-rt0 works very well here, I build 3.0-rt1 - rt3 with the same config 
h>then rt0.
h>
h>regards
h>hermann
h>
h>--
h>To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
h>the body of a message to majordomo@vger.kernel.org
h>More majordomo info at  http://vger.kernel.org/majordomo-info.html
h>

C уважением                       With Best Regards
Георгиевский Юрий.                Georgiewskiy Yuriy
+7 4872 711666                    +7 4872 711666
факс +7 4872 711143               fax +7 4872 711143
Компания ООО "Ай Ти Сервис"       IT Service Ltd
http://nkoort.ru                  http://nkoort.ru
JID: GHhost@icf.org.ru            JID: GHhost@icf.org.ru
YG129-RIPE                        YG129-RIPE

Re: [ANNOUNCE] 3.0-rt3

From: Darren Hart <hidden>
Date: 2011-07-25 22:20:05


On 07/24/2011 09:12 AM, Thomas Gleixner wrote:
On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
...
quoted
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
[   37.456712]  [<ffffffff81157dcd>] ? fget_light+0x6d/0x110
[   37.456714]  [<ffffffff810b77b7>] ? audit_syscall_entry+0x2e7/0x310
[   37.456715]  [<ffffffff814c9375>] ? sys_recvmsg+0x75/0x90
[   37.456717]  [<ffffffff810923e6>] compat_sys_futex+0xf6/0x190
[   37.456719]  [<ffffffff8100e864>] ? syscall_trace_enter+0x184/0x210
[   37.456721]  [<ffffffff816158b3>] ia32_do_call+0x13/0x13
Urrgh, that's not a good one. Darren, can you please have a look at that?
Will do.

Maarten, what are you running when you hit this?
rt_mutex_start_proxy_lock() is only called by the requeue_pi code and
there is no libc support for that yet, so I'm surprised to see that in
the stack trace (unless you're running my futextest suite).

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Re: [ANNOUNCE] 3.0-rt3

From: Fernando Lopez-Lezcano <hidden>
Date: 2011-07-25 22:55:31

On 07/24/2011 03:33 AM, Thomas Gleixner wrote:
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
Thanks!!... testing on a dual core laptop, fedora 15, 32 bit:

[   32.169727] BUG: MAX_LOCKDEP_ENTRIES too low!
[   32.169730] turning off the locking correctness validator.

(where do I change this?)

[   32.169733] Pid: 830, comm: iptables-restor Not tainted 
3.0.0-1.rt3.1.fc14.ccrma.i686.rtPAE #1
[   32.169735] Call Trace:
[   32.169742]  [<c086c6f3>] ? printk+0x2d/0x32
[   32.169746]  [<c047689e>] add_lock_to_list.clone.11.clone.17+0x41/0x9e
[   32.169749]  [<c047927d>] __lock_acquire+0xac3/0xc2f
[   32.169753]  [<c046abe4>] ? sched_clock_cpu+0x13d/0x14d
[   32.169756]  [<c0476300>] ? lock_is_held+0x5b/0x7d
[   32.169760]  [<c040e748>] ? native_sched_clock+0x4d/0x52
[   32.169762]  [<c047614c>] ? trace_hardirqs_off+0xb/0xd
[   32.169765]  [<c040e755>] ? sched_clock+0x8/0xb
[   32.169767]  [<c046a8ea>] ? sched_clock_local+0x12/0x16b
[   32.169770]  [<c086dd67>] ? rt_spin_lock_slowlock+0x31/0x170
[   32.169772]  [<c04798a9>] lock_acquire+0xde/0x11d
[   32.169775]  [<c086dd67>] ? rt_spin_lock_slowlock+0x31/0x170
[   32.169778]  [<c086ea7b>] _raw_spin_lock+0x45/0x72
[   32.169780]  [<c086dd67>] ? rt_spin_lock_slowlock+0x31/0x170
[   32.169783]  [<c086dd67>] rt_spin_lock_slowlock+0x31/0x170
[   32.169787]  [<c047e4df>] rt_spin_lock_fastlock.clone.8+0x23/0x26
[   32.169789]  [<c086e392>] rt_spin_lock+0x13/0x43
[   32.169792]  [<c0442acd>] ? migrate_disable+0xf1/0x100
[   32.169796]  [<c04d6047>] __local_lock_irqsave+0x29/0x72
[   32.169799]  [<c04d8827>] get_page_from_freelist+0x113/0x432
[   32.169803]  [<c04d8de6>] __alloc_pages_nodemask+0x160/0x6ce
[   32.169806]  [<c086ed7d>] ? _raw_spin_unlock_irqrestore+0x56/0x63
[   32.169809]  [<c0439644>] ? task_rq_unlock+0x20/0x24
[   32.169812]  [<c04428e4>] ? migrate_enable+0x11f/0x12e
[   32.169816]  [<c04f66d1>] ? kmalloc_node.clone.13+0xd/0xf
[   32.169819]  [<c04f7e2b>] __vmalloc_node_range+0x103/0x174
[   32.169821]  [<c04f7fdd>] ? vzalloc+0x15/0x17
[   32.169824]  [<c04f7eec>] __vmalloc_node+0x50/0x58
[   32.169826]  [<c04f7fdd>] ? vzalloc+0x15/0x17
[   32.169829]  [<c04f7fdd>] ? vzalloc+0x15/0x17
[   32.169831]  [<c04f7fae>] __vmalloc_node_flags+0x30/0x36
[   32.169834]  [<c04f7fdd>] ? vzalloc+0x15/0x17
[   32.169836]  [<c04f7fdd>] vzalloc+0x15/0x17
[   32.169840]  [<c08044bb>] do_ipt_get_ctl+0xfd/0x2e2
[   32.169842]  [<c047691b>] ? put_lock_stats.clone.12+0x12/0x1d
[   32.169845]  [<c04769db>] ? lock_release_holdtime+0xb5/0xba
[   32.169847]  [<c04797a5>] ? lock_release+0x19f/0x1c5
[   32.169851]  [<c07c25d4>] nf_sockopt+0x179/0x1df
[   32.169854]  [<c07c2663>] nf_getsockopt+0x29/0x2f
[   32.169857]  [<c07ce9ed>] ip_getsockopt+0x79/0xa4
[   32.169861]  [<c07e6dfc>] raw_getsockopt+0x2e/0xb0
[   32.169865]  [<c07936b6>] sock_common_getsockopt+0x23/0x29
[   32.169867]  [<c0792c1f>] sys_getsockopt+0x70/0x89
[   32.169870]  [<c0793231>] sys_socketcall+0x21c/0x29c
[   32.169873]  [<c0874654>] ? sysenter_exit+0xf/0x1e
[   32.169877]  [<c0603370>] ? trace_hardirqs_on_thunk+0xc/0x10
[   32.169879]  [<c087461f>] sysenter_do_call+0x12/0x38
[   32.733546] ip6_tables: (C) 2000-2006 Netfilter Core Team

complete dmesg and kernel config attached...

-- Fernando

Re: [ANNOUNCE] 3.0-rt3

From: Frank Rowand <hidden>
Date: 2011-07-26 03:12:42

On 07/24/11 03:33, Thomas Gleixner wrote:
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
ARM panda board boots for PREEMPT_RT_FULL, with a BUG:

Freeing init memory: 308K
BUG: sleeping function called from invalid context at kernel/rtmutex.c:645
in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper
1 lock held by swapper/0:
 #0:  (&irq_desc_lock_class){-.....}, at: [<c00ed470>] handle_fasteoi_irq+0x14/0x10c
irq event stamp: 21292
hardirqs last  enabled at (21291): [<c0061ee0>] default_idle+0x2c/0x3c
hardirqs last disabled at (21292): [<c0484bb4>] __irq_svc+0x34/0x138
softirqs last  enabled at (0): [<  (null)>]   (null)
softirqs last disabled at (0): [<  (null)>]   (null)
[<c00681b8>] (unwind_backtrace+0x0/0xf0) from [<c0483d20>] (rt_spin_lock+0x24/0x5c)
[<c0483d20>] (rt_spin_lock+0x24/0x5c) from [<c006df74>] (gic_mask_irq+0x28/0x7c)
[<c006df74>] (gic_mask_irq+0x28/0x7c) from [<c00ece20>] (mask_irq+0x1c/0x2c)
[<c00ece20>] (mask_irq+0x1c/0x2c) from [<c00ed514>] (handle_fasteoi_irq+0xb8/0x10c)
[<c00ed514>] (handle_fasteoi_irq+0xb8/0x10c) from [<c00ea724>] (generic_handle_irq+0x34/0x50)
[<c00ea724>] (generic_handle_irq+0x34/0x50) from [<c0055048>] (asm_do_IRQ+0x48/0xa8)
[<c0055048>] (asm_do_IRQ+0x48/0xa8) from [<c0484bd0>] (__irq_svc+0x50/0x138)
Exception stack(0xc0629f60 to 0xc0629fa8)
9f60: 00000001 00000001 00000000 0000532b c0628000 c06b6908 c048f7a0 00000000
9f80: c0649268 411fc092 c0649448 00000000 00000000 c0629fa8 c00d7750 c0061ee4
9fa0: 20000013 ffffffff
[<c0484bd0>] (__irq_svc+0x50/0x138) from [<c0061ee4>] (default_idle+0x30/0x3c)
[<c0061ee4>] (default_idle+0x30/0x3c) from [<c006253c>] (cpu_idle+0xc0/0x104)
[<c006253c>] (cpu_idle+0xc0/0x104) from [<c0008980>] (start_kernel+0x278/0x31c)
[<c0008980>] (start_kernel+0x278/0x31c) from [<80008040>] (0x80008040)



.config is attached or use this recipe:

   make omap2plus_defconfig

   Then additional config changes:

   # this allows USB thumb drive
   # Device Drivers -> USB support -> EHCI HCD (USB 2.0) support
   CONFIG_USB_EHCI_HCD=y
   # Device Drivers -> USB support -> EHCI support for OMAP3 and later chips
   CONFIG_USB_EHCI_HCD_OMAP=y

   # ethernet device
   # Device Drivers -> Network device support -> USB Network Adapters ->
   #  Multi-purpose USB Networking Framework ->
   #  SMSC LAN95XX based USB 2.0 10/100 ethernet devices
   CONFIG_USB_NET_SMSC95XX=y

   # Kernel Features -> Preemption Model -> Fully Preemptible Kernel (RT)


-Frank

Re: [ANNOUNCE] 3.0-rt3

From: Frank Rowand <hidden>
Date: 2011-07-26 03:14:12

On 07/24/11 03:33, Thomas Gleixner wrote:
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
ARM panda board boots for PREEMPT_NONE.

New compile warning for ARM pandaboard, PREEMPT_NONE:

kernel/softirq.c: In function 'softirq_check_pending_idle':
kernel/softirq.c:119: warning: format '%02lx' expects type 'long unsigned int', but argument 2 has type 'unsigned int'


.config is attached or use this recipe:

   make omap2plus_defconfig

   Then additional config changes:

   # this allows USB thumb drive
   # Device Drivers -> USB support -> EHCI HCD (USB 2.0) support
   CONFIG_USB_EHCI_HCD=y
   # Device Drivers -> USB support -> EHCI support for OMAP3 and later chips
   CONFIG_USB_EHCI_HCD_OMAP=y

   # ethernet device
   # Device Drivers -> Network device support -> USB Network Adapters ->
   #  Multi-purpose USB Networking Framework ->
   #  SMSC LAN95XX based USB 2.0 10/100 ethernet devices
   CONFIG_USB_NET_SMSC95XX=y


-Frank

Re: [ANNOUNCE] 3.0-rt3

From: Frank Rowand <hidden>
Date: 2011-07-26 03:30:17

On 07/24/11 03:33, Thomas Gleixner wrote:
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.

ARM panda board for PREEMPT_RT_FULL, new compile warnings:

kernel/softirq.c:105: warning: format '%02lx' expects type 'long unsigned int', but argument 2 has type 'u32'
kernel/trace/ring_buffer.c: In function 'trace_recursive_fail':
kernel/trace/ring_buffer.c:2217: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'int'
kernel/lockdep.c: In function 'print_bad_irq_dependency':
kernel/lockdep.c:1476: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'int'
kernel/lockdep.c: In function 'print_usage_bug':
kernel/lockdep.c:2193: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'int'
drivers/tty/serial/8250.c: In function 'serial8250_interrupt':
drivers/tty/serial/8250.c:1642: warning: unused variable 'pass_counter'


.config is attached or use this recipe:

   make omap2plus_defconfig

   Then additional config changes:

   # this allows USB thumb drive
   # Device Drivers -> USB support -> EHCI HCD (USB 2.0) support
   CONFIG_USB_EHCI_HCD=y
   # Device Drivers -> USB support -> EHCI support for OMAP3 and later chips
   CONFIG_USB_EHCI_HCD_OMAP=y

   # ethernet device
   # Device Drivers -> Network device support -> USB Network Adapters ->
   #  Multi-purpose USB Networking Framework ->
   #  SMSC LAN95XX based USB 2.0 10/100 ethernet devices
   CONFIG_USB_NET_SMSC95XX=y

   # Kernel Features -> Preemption Model -> Fully Preemptible Kernel (RT)


-Frank

Re: [ANNOUNCE] 3.0-rt3

From: Darren Hart <hidden>
Date: 2011-07-26 03:49:39


On 07/24/2011 03:33 AM, Thomas Gleixner wrote:
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.

Changes versus 3.0-rt2:

  * Fix earlyprintk really

Confirmed. The following kernel boot parameters now work correctly together:

"console=tty0 console=ttyS1,115200n8 earlyprintk=ttyS1,115200"

Thanks Thomas,

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Re: [ANNOUNCE] 3.0-rt3

From: Darren Hart <hidden>
Date: 2011-07-26 06:00:36


On 07/25/2011 03:20 PM, Darren Hart wrote:

On 07/24/2011 09:12 AM, Thomas Gleixner wrote:
quoted
On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
...
quoted
quoted
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
[   37.456712]  [<ffffffff81157dcd>] ? fget_light+0x6d/0x110
[   37.456714]  [<ffffffff810b77b7>] ? audit_syscall_entry+0x2e7/0x310
[   37.456715]  [<ffffffff814c9375>] ? sys_recvmsg+0x75/0x90
[   37.456717]  [<ffffffff810923e6>] compat_sys_futex+0xf6/0x190
[   37.456719]  [<ffffffff8100e864>] ? syscall_trace_enter+0x184/0x210
[   37.456721]  [<ffffffff816158b3>] ia32_do_call+0x13/0x13
Urrgh, that's not a good one. Darren, can you please have a look at that?
Will do.

Maarten, what are you running when you hit this?
rt_mutex_start_proxy_lock() is only called by the requeue_pi code and
there is no libc support for that yet, so I'm surprised to see that in
the stack trace (unless you're running my futextest suite).
I've run a couple iterations of functional/run.sh from futextest which
exercises the requeue_pi code with no errors. I also wrote a new test to
improperly use the requeue_pi path, and the kernel properly detects the
abuse and kicks the user back with -EINVAL.

Could you try running futextest on your system to see if you can
reproduce the above? Specifically the functional/run.sh script (no need
to run the performance bits).

http://git.kernel.org/?p=linux/kernel/git/dvhart/futextest.git;a=summary

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Re: [ANNOUNCE] 3.0-rt3

From: Yong Zhang <hidden>
Date: 2011-07-26 06:20:41

On Sun, Jul 24, 2011 at 6:33 PM, Thomas Gleixner [off-list ref] wrote:
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
Get below bug when I switch tracer between 'function' and 'preemptirqoff'.

[  112.408041] BUG: sleeping function called from invalid context at
kernel/rtmutex.c:645
[  112.408045] in_atomic(): 1, irqs_disabled(): 1, pid: 2213, name: bash
[  112.408048] Pid: 2213, comm: bash Not tainted 3.0.0-rt3-00239-g05a16b8 #3
[  112.408051] Call Trace:
[  112.408059]  [<c15bddb4>] ? printk+0x1d/0x21
[  112.408064]  [<c1036276>] __might_sleep+0xe6/0x110
[  112.408068]  [<c15c048c>] rt_spin_lock+0x1c/0x40
[  112.408072]  [<c10e3087>] free_hot_cold_page+0x87/0x250
[  112.408075]  [<c10e3285>] __free_pages+0x35/0x40
[  112.408078]  [<c10e32c4>] free_pages+0x34/0x40
[  112.408082]  [<c10b3200>] free_buffer_page+0x10/0x20
[  112.408085]  [<c10b5614>] ring_buffer_resize+0x144/0x410
[  112.408089]  [<c10bb0ff>] tracing_set_tracer+0x16f/0x250
[  112.408093]  [<c127c116>] ? __copy_from_user_ll+0x16/0xf0
[  112.408096]  [<c10bb248>] tracing_set_trace_write+0x68/0x90
[  112.408101]  [<c124f846>] ? apparmor_file_permission+0x16/0x20
[  112.408105]  [<c12206f4>] ? security_file_permission+0x24/0xb0
[  112.408109]  [<c11207cc>] ? rw_verify_area+0x6c/0x130
[  112.408112]  [<c1120e0d>] ? sys_write+0x1d/0x70
[  112.408115]  [<c1121f51>] ? fget_light+0x11/0xd0
[  112.408118]  [<c1120b52>] vfs_write+0xa2/0x170
[  112.408121]  [<c10bb1e0>] ? tracing_set_tracer+0x250/0x250
[  112.408123]  [<c1121f56>] ? fget_light+0x16/0xd0
[  112.408127]  [<c1120e32>] sys_write+0x42/0x70
[  112.408130]  [<c15c6cdf>] sysenter_do_call+0x12/0x2d

-- 
Only stand for myself

Re: [ANNOUNCE] 3.0-rt3

From: Thomas Gleixner <hidden>
Date: 2011-07-26 09:01:52

On Mon, 25 Jul 2011, Darren Hart wrote:

On 07/24/2011 09:12 AM, Thomas Gleixner wrote:
quoted
On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
...
quoted
quoted
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
[   37.456712]  [<ffffffff81157dcd>] ? fget_light+0x6d/0x110
[   37.456714]  [<ffffffff810b77b7>] ? audit_syscall_entry+0x2e7/0x310
[   37.456715]  [<ffffffff814c9375>] ? sys_recvmsg+0x75/0x90
[   37.456717]  [<ffffffff810923e6>] compat_sys_futex+0xf6/0x190
[   37.456719]  [<ffffffff8100e864>] ? syscall_trace_enter+0x184/0x210
[   37.456721]  [<ffffffff816158b3>] ia32_do_call+0x13/0x13
Urrgh, that's not a good one. Darren, can you please have a look at that?
Will do.

Maarten, what are you running when you hit this?
rt_mutex_start_proxy_lock() is only called by the requeue_pi code and
there is no libc support for that yet, so I'm surprised to see that in
the stack trace (unless you're running my futextest suite).
threaded-ml, whatever that is. I suspect that the changes to the futex
code, which I ported forward from 33-rt have some wreckage in it.

Re: [ANNOUNCE] 3.0-rt3

From: Uwe Kleine-König <hidden>
Date: 2011-07-26 09:13:17

On Mon, Jul 25, 2011 at 03:55:21PM -0700, Fernando Lopez-Lezcano wrote:
On 07/24/2011 03:33 AM, Thomas Gleixner wrote:
quoted
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
Thanks!!... testing on a dual core laptop, fedora 15, 32 bit:

[   32.169727] BUG: MAX_LOCKDEP_ENTRIES too low!
[   32.169730] turning off the locking correctness validator.

(where do I change this?)
I'd guess you need to increase MAX_LOCKDEP_ENTRIES which is defined in
kernel/lockdep_internals.h.

BTW, I hit that, too.

Best regards
Uwe


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Re: [ANNOUNCE] 3.0-rt3

From: Uwe Kleine-König <hidden>
Date: 2011-07-26 09:19:28

On Mon, Jul 25, 2011 at 08:12:09PM -0700, Frank Rowand wrote:
On 07/24/11 03:33, Thomas Gleixner wrote:
quoted
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
ARM panda board boots for PREEMPT_RT_FULL, with a BUG:

Freeing init memory: 308K
BUG: sleeping function called from invalid context at kernel/rtmutex.c:645
in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper
1 lock held by swapper/0:
 #0:  (&irq_desc_lock_class){-.....}, at: [<c00ed470>] handle_fasteoi_irq+0x14/0x10c
irq event stamp: 21292
hardirqs last  enabled at (21291): [<c0061ee0>] default_idle+0x2c/0x3c
hardirqs last disabled at (21292): [<c0484bb4>] __irq_svc+0x34/0x138
softirqs last  enabled at (0): [<  (null)>]   (null)
softirqs last disabled at (0): [<  (null)>]   (null)
[<c00681b8>] (unwind_backtrace+0x0/0xf0) from [<c0483d20>] (rt_spin_lock+0x24/0x5c)
[<c0483d20>] (rt_spin_lock+0x24/0x5c) from [<c006df74>] (gic_mask_irq+0x28/0x7c)
[<c006df74>] (gic_mask_irq+0x28/0x7c) from [<c00ece20>] (mask_irq+0x1c/0x2c)
[<c00ece20>] (mask_irq+0x1c/0x2c) from [<c00ed514>] (handle_fasteoi_irq+0xb8/0x10c)
[<c00ed514>] (handle_fasteoi_irq+0xb8/0x10c) from [<c00ea724>] (generic_handle_irq+0x34/0x50)
[<c00ea724>] (generic_handle_irq+0x34/0x50) from [<c0055048>] (asm_do_IRQ+0x48/0xa8)
[<c0055048>] (asm_do_IRQ+0x48/0xa8) from [<c0484bd0>] (__irq_svc+0x50/0x138)
I guess you need something like the patch below.

Best regards
Uwe
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index 4ddd0a6..5c1dd07 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -33,7 +33,7 @@
 #include <asm/mach/irq.h>
 #include <asm/hardware/gic.h>
 
-static DEFINE_SPINLOCK(irq_controller_lock);
+static DEFINE_RAW_SPINLOCK(irq_controller_lock);
 
 /* Address of GIC 0 CPU interface */
 void __iomem *gic_cpu_base_addr __read_mostly;
@@ -88,30 +88,30 @@ static void gic_mask_irq(struct irq_data *d)
 {
 	u32 mask = 1 << (d->irq % 32);
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 	writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
 	if (gic_arch_extn.irq_mask)
 		gic_arch_extn.irq_mask(d);
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 }
 
 static void gic_unmask_irq(struct irq_data *d)
 {
 	u32 mask = 1 << (d->irq % 32);
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 	if (gic_arch_extn.irq_unmask)
 		gic_arch_extn.irq_unmask(d);
 	writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4);
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 }
 
 static void gic_eoi_irq(struct irq_data *d)
 {
 	if (gic_arch_extn.irq_eoi) {
-		spin_lock(&irq_controller_lock);
+		raw_spin_lock(&irq_controller_lock);
 		gic_arch_extn.irq_eoi(d);
-		spin_unlock(&irq_controller_lock);
+		raw_spin_unlock(&irq_controller_lock);
 	}
 
 	writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
@@ -135,7 +135,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
 	if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING)
 		return -EINVAL;
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 
 	if (gic_arch_extn.irq_set_type)
 		gic_arch_extn.irq_set_type(d, type);
@@ -160,7 +160,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
 	if (enabled)
 		writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff);
 
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 
 	return 0;
 }
@@ -188,11 +188,11 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
 	mask = 0xff << shift;
 	bit = 1 << (cpu + shift);
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 	d->node = cpu;
 	val = readl_relaxed(reg) & ~mask;
 	writel_relaxed(val | bit, reg);
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 
 	return 0;
 }
@@ -222,9 +222,9 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
 
 	chained_irq_enter(chip, desc);
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 	status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK);
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 
 	gic_irq = (status & 0x3ff);
 	if (gic_irq == 1023)
-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [ANNOUNCE] 3.0-rt3

From: Thomas Gleixner <hidden>
Date: 2011-07-26 09:25:08

On Tue, 26 Jul 2011, Uwe Kleine-König wrote:
On Mon, Jul 25, 2011 at 08:12:09PM -0700, Frank Rowand wrote:
quoted
On 07/24/11 03:33, Thomas Gleixner wrote:
quoted
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
ARM panda board boots for PREEMPT_RT_FULL, with a BUG:

Freeing init memory: 308K
BUG: sleeping function called from invalid context at kernel/rtmutex.c:645
in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper
1 lock held by swapper/0:
 #0:  (&irq_desc_lock_class){-.....}, at: [<c00ed470>] handle_fasteoi_irq+0x14/0x10c
irq event stamp: 21292
hardirqs last  enabled at (21291): [<c0061ee0>] default_idle+0x2c/0x3c
hardirqs last disabled at (21292): [<c0484bb4>] __irq_svc+0x34/0x138
softirqs last  enabled at (0): [<  (null)>]   (null)
softirqs last disabled at (0): [<  (null)>]   (null)
[<c00681b8>] (unwind_backtrace+0x0/0xf0) from [<c0483d20>] (rt_spin_lock+0x24/0x5c)
[<c0483d20>] (rt_spin_lock+0x24/0x5c) from [<c006df74>] (gic_mask_irq+0x28/0x7c)
[<c006df74>] (gic_mask_irq+0x28/0x7c) from [<c00ece20>] (mask_irq+0x1c/0x2c)
[<c00ece20>] (mask_irq+0x1c/0x2c) from [<c00ed514>] (handle_fasteoi_irq+0xb8/0x10c)
[<c00ed514>] (handle_fasteoi_irq+0xb8/0x10c) from [<c00ea724>] (generic_handle_irq+0x34/0x50)
[<c00ea724>] (generic_handle_irq+0x34/0x50) from [<c0055048>] (asm_do_IRQ+0x48/0xa8)
[<c0055048>] (asm_do_IRQ+0x48/0xa8) from [<c0484bd0>] (__irq_svc+0x50/0x138)
I guess you need something like the patch below.
Yep. Will add it to the other pile of ARM lock conversions.
 
quoted hunk
Best regards
Uwe
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index 4ddd0a6..5c1dd07 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -33,7 +33,7 @@
 #include <asm/mach/irq.h>
 #include <asm/hardware/gic.h>
 
-static DEFINE_SPINLOCK(irq_controller_lock);
+static DEFINE_RAW_SPINLOCK(irq_controller_lock);
 
 /* Address of GIC 0 CPU interface */
 void __iomem *gic_cpu_base_addr __read_mostly;
@@ -88,30 +88,30 @@ static void gic_mask_irq(struct irq_data *d)
 {
 	u32 mask = 1 << (d->irq % 32);
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 	writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
 	if (gic_arch_extn.irq_mask)
 		gic_arch_extn.irq_mask(d);
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 }
 
 static void gic_unmask_irq(struct irq_data *d)
 {
 	u32 mask = 1 << (d->irq % 32);
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 	if (gic_arch_extn.irq_unmask)
 		gic_arch_extn.irq_unmask(d);
 	writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4);
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 }
 
 static void gic_eoi_irq(struct irq_data *d)
 {
 	if (gic_arch_extn.irq_eoi) {
-		spin_lock(&irq_controller_lock);
+		raw_spin_lock(&irq_controller_lock);
 		gic_arch_extn.irq_eoi(d);
-		spin_unlock(&irq_controller_lock);
+		raw_spin_unlock(&irq_controller_lock);
 	}
 
 	writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
@@ -135,7 +135,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
 	if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING)
 		return -EINVAL;
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 
 	if (gic_arch_extn.irq_set_type)
 		gic_arch_extn.irq_set_type(d, type);
@@ -160,7 +160,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
 	if (enabled)
 		writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff);
 
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 
 	return 0;
 }
@@ -188,11 +188,11 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
 	mask = 0xff << shift;
 	bit = 1 << (cpu + shift);
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 	d->node = cpu;
 	val = readl_relaxed(reg) & ~mask;
 	writel_relaxed(val | bit, reg);
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 
 	return 0;
 }
@@ -222,9 +222,9 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
 
 	chained_irq_enter(chip, desc);
 
-	spin_lock(&irq_controller_lock);
+	raw_spin_lock(&irq_controller_lock);
 	status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK);
-	spin_unlock(&irq_controller_lock);
+	raw_spin_unlock(&irq_controller_lock);
 
 	gic_irq = (status & 0x3ff);
 	if (gic_irq == 1023)
-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Re: [ANNOUNCE] 3.0-rt3

From: Uwe Kleine-König <hidden>
Date: 2011-07-26 09:30:37

On Mon, Jul 25, 2011 at 08:11:38PM -0700, Frank Rowand wrote:
On 07/24/11 03:33, Thomas Gleixner wrote:
quoted
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
ARM panda board boots for PREEMPT_NONE.

New compile warning for ARM pandaboard, PREEMPT_NONE:

kernel/softirq.c: In function 'softirq_check_pending_idle':
kernel/softirq.c:119: warning: format '%02lx' expects type 'long unsigned int', but argument 2 has type 'unsigned int'
This happens on x86, too.

The obvious fix is:
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 99620ec..af749f6 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -77,7 +77,7 @@ char *softirq_to_name[NR_SOFTIRQS] = {
 void softirq_check_pending_idle(void)
 {
 	static int rate_limit;
-	u32 warnpending = 0, pending = local_softirq_pending();
+	unsigned warnpending = 0, pending = local_softirq_pending();
 
 	if (rate_limit >= 10)
 		return;
@@ -101,7 +101,7 @@ void softirq_check_pending_idle(void)
 	}
 
 	if (warnpending) {
-		printk(KERN_ERR "NOHZ: local_softirq_pending %02lx\n",
+		printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n",
 		       pending);
 		rate_limit++;
 	}
@@ -115,7 +115,7 @@ void softirq_check_pending_idle(void)
 	static int rate_limit;
 
 	if (rate_limit < 10) {
-		printk(KERN_ERR "NOHZ: local_softirq_pending %02lx\n",
+		printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n",
 		       local_softirq_pending());
 		rate_limit++;
 	}
Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [ANNOUNCE] 3.0-rt3

From: Maarten Lankhorst <hidden>
Date: 2011-07-26 11:44:41

On 07/26/2011 08:00 AM, Darren Hart wrote:
On 07/25/2011 03:20 PM, Darren Hart wrote:
quoted
On 07/24/2011 09:12 AM, Thomas Gleixner wrote:
quoted
On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
...
quoted
quoted
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
[   37.456712]  [<ffffffff81157dcd>] ? fget_light+0x6d/0x110
[   37.456714]  [<ffffffff810b77b7>] ? audit_syscall_entry+0x2e7/0x310
[   37.456715]  [<ffffffff814c9375>] ? sys_recvmsg+0x75/0x90
[   37.456717]  [<ffffffff810923e6>] compat_sys_futex+0xf6/0x190
[   37.456719]  [<ffffffff8100e864>] ? syscall_trace_enter+0x184/0x210
[   37.456721]  [<ffffffff816158b3>] ia32_do_call+0x13/0x13
Urrgh, that's not a good one. Darren, can you please have a look at that?
Will do.

Maarten, what are you running when you hit this?
rt_mutex_start_proxy_lock() is only called by the requeue_pi code and
there is no libc support for that yet, so I'm surprised to see that in
the stack trace (unless you're running my futextest suite).
I've run a couple iterations of functional/run.sh from futextest which
exercises the requeue_pi code with no errors. I also wrote a new test to
improperly use the requeue_pi path, and the kernel properly detects the
abuse and kicks the user back with -EINVAL.

Could you try running futextest on your system to see if you can
reproduce the above? Specifically the functional/run.sh script (no need
to run the performance bits).

http://git.kernel.org/?p=linux/kernel/git/dvhart/futextest.git;a=summary
Same bug if I just call run.sh, it happens in futex_requeue_pi -b

I attached my kernel config file in case it's needed to trigger.

It only happens once, after that I have to reboot to trigger it again.
The tid matches the waker thread. You probably have to run it before
pulseaudio is started because sometimes I get that error on that one
too.

~Maarten

Re: [ANNOUNCE] 3.0-rt3

From: Darren Hart <hidden>
Date: 2011-07-26 17:02:04


On 07/26/2011 04:44 AM, Maarten Lankhorst wrote:
On 07/26/2011 08:00 AM, Darren Hart wrote:
quoted
On 07/25/2011 03:20 PM, Darren Hart wrote:
quoted
On 07/24/2011 09:12 AM, Thomas Gleixner wrote:
quoted
On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
...
quoted
quoted
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
Maarten, I'm finding fairly little out there on what threaded-ml might
be. What I do find suggests 3D visualization and real-time audio
playback. Are you working with something like this? If so, which
libraries are you using? If not, any idea what this is?
quoted
quoted
quoted
quoted
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
Maarten, could you provide the addr2line of the addresses from do_futex
to spin_bug ? This will help me trace the path.

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Re: [ANNOUNCE] 3.0-rt3

From: Maarten Lankhorst <hidden>
Date: 2011-07-26 17:11:25

On 07/26/2011 07:01 PM, Darren Hart wrote:
On 07/26/2011 04:44 AM, Maarten Lankhorst wrote:
quoted
On 07/26/2011 08:00 AM, Darren Hart wrote:
quoted
On 07/25/2011 03:20 PM, Darren Hart wrote:
quoted
On 07/24/2011 09:12 AM, Thomas Gleixner wrote:
quoted
On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
...
quoted
quoted
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
Maarten, I'm finding fairly little out there on what threaded-ml might
be. What I do find suggests 3D visualization and real-time audio
playback. Are you working with something like this? If so, which
libraries are you using? If not, any idea what this is?
threaded ml = from pulseaudio,
src/pulse/thread-mainloop.c to be exact. But like I said it occurs with the functional broadcast test too, on the waker thread.
quoted
quoted
quoted
quoted
quoted
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
Maarten, could you provide the addr2line of the addresses from do_futex
to spin_bug ? This will help me trace the path.
decodes to:
linux/lib/spinlock_debug.c:72
linux/lib/spinlock_debug.c:79
linux/kernel/sched.c:4114
linux/kernel/spinlock.c:141
linux/kernel/rtmutex.c:100
linux/kernel/futex.c:1378
linux/kernel/futex.c:2662

~Maarten

Re: [ANNOUNCE] 3.0-rt3

From: Fernando Lopez-Lezcano <hidden>
Date: 2011-07-26 23:52:41

On 07/26/2011 02:13 AM, Uwe Kleine-König wrote:
On Mon, Jul 25, 2011 at 03:55:21PM -0700, Fernando Lopez-Lezcano wrote:
quoted
On 07/24/2011 03:33 AM, Thomas Gleixner wrote:
quoted
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
Thanks!!... testing on a dual core laptop, fedora 15, 32 bit:

[   32.169727] BUG: MAX_LOCKDEP_ENTRIES too low!
[   32.169730] turning off the locking correctness validator.

(where do I change this?)
I'd guess you need to increase MAX_LOCKDEP_ENTRIES which is defined in
kernel/lockdep_internals.h.

BTW, I hit that, too.
Thanks, I upped that to 32768 (16384) but on boot I got another 
complaint about MAX_LOCKDEP_CHAINS so I changed MAX_LOCKDEP_CHAIN_BITS 
from 15 to 31 and, well, the kernel build complains about "size of array 
'local_chains' is too large" (chain_hlocks as well) and does not build...

Oh well...
-- Fernando
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [ANNOUNCE] 3.0-rt3

From: Fernando Lopez-Lezcano <hidden>
Date: 2011-07-26 23:58:04

On 07/26/2011 04:52 PM, Fernando Lopez-Lezcano wrote:
On 07/26/2011 02:13 AM, Uwe Kleine-König wrote:
quoted
On Mon, Jul 25, 2011 at 03:55:21PM -0700, Fernando Lopez-Lezcano wrote:
quoted
On 07/24/2011 03:33 AM, Thomas Gleixner wrote:
quoted
Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.
Thanks!!... testing on a dual core laptop, fedora 15, 32 bit:

[ 32.169727] BUG: MAX_LOCKDEP_ENTRIES too low!
[ 32.169730] turning off the locking correctness validator.

(where do I change this?)
I'd guess you need to increase MAX_LOCKDEP_ENTRIES which is defined in
kernel/lockdep_internals.h.

BTW, I hit that, too.
Thanks, I upped that to 32768 (16384) but on boot I got another
complaint about MAX_LOCKDEP_CHAINS so I changed MAX_LOCKDEP_CHAIN_BITS
from 15 to 31 and, well, the kernel build complains about "size of array
'local_chains' is too large" (chain_hlocks as well) and does not build...

Oh well...
(I meant to myself - of COURSE, _think_ before changing things and 
meditate about the implications of power mathematical operations).

:-)
-- Fernando
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [ANNOUNCE] 3.0-rt3 (futex_requeue bad spinlock magic)

From: Darren Hart <hidden>
Date: 2011-07-27 01:57:58


On 07/26/2011 10:11 AM, Maarten Lankhorst wrote:
On 07/26/2011 07:01 PM, Darren Hart wrote:
quoted
On 07/26/2011 04:44 AM, Maarten Lankhorst wrote:
quoted
On 07/26/2011 08:00 AM, Darren Hart wrote:
quoted
On 07/25/2011 03:20 PM, Darren Hart wrote:
quoted
On 07/24/2011 09:12 AM, Thomas Gleixner wrote:
quoted
On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
...
quoted
quoted
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
Maarten, I'm finding fairly little out there on what threaded-ml might
be. What I do find suggests 3D visualization and real-time audio
playback. Are you working with something like this? If so, which
libraries are you using? If not, any idea what this is?
threaded ml = from pulseaudio,
src/pulse/thread-mainloop.c to be exact. But like I said it occurs with the functional broadcast test too, on the waker thread.
quoted
quoted
quoted
quoted
quoted
quoted
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
Maarten, could you provide the addr2line of the addresses from do_futex
to spin_bug ? This will help me trace the path.
decodes to:
linux/lib/spinlock_debug.c:72
linux/lib/spinlock_debug.c:79
linux/kernel/sched.c:4114
linux/kernel/spinlock.c:141
linux/kernel/rtmutex.c:100
linux/kernel/futex.c:1378
linux/kernel/futex.c:2662

OK, so we're entering with a FUTEX_CMP_REQUEUE op (not FUTEX_CMP_REQUEUE_PI),
and land inside an "if (requeue_pi)" block in the futex_requeue() function -
that should never happen. The interesting thing about this is pulse is only
using the non PI pthread_cond calls, and thus FUTEX_CMP_REQUEUE,
(http://gitorious.org/~elmarco/pulseaudio/pa-work/blobs/1ca76031092ab07682843fd70607696f6af7216f/src/pulsecore/mutex-posix.c). I have not been able reproduce this path.

My best guess at the moment is that we are somehow stomping on the requeue_pi
value causing the waker to enter the wrong code paths. A simple test would be to
print the value of requeue_pi throughout futex_requeue() and see if it changes
(it shouldn't) and if it is something other than 0 or 1 (which it should never
be). Are you able to reliably reproduce the pulse audio failure?

The futex_requeue_pi test is of course using FUTEX_CMP_REQUEUE_PI, and it will
reproduce a similar path (except via the FUTEX_CMP_REQUEUE_PI demux path as it
should be) on the first time run, as Maarten observed. I have seen this with
and without the -b (broadcast) option to the test.

I was able to reproduce this on my system by adding the following to my config:
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_PI_LIST=y
+CONFIG_DEBUG_SPINLOCK=y

With a similar config, this does not occur on 2.6.33.9-rt31. Nothing jumps out
as obviously wrong in the futex delta from 33-rt to now.

I tried with 3.0.0 (non rt) with a similar .config and the problem is not
reproducible. I'll continue to try and isolate the problem, focusing mainly on
the futex delta from 3.0.0. Right after I get the kids to bed...


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Re: [ANNOUNCE] 3.0-rt3 (futex_requeue bad spinlock magic)

From: Darren Hart <hidden>
Date: 2011-07-27 08:25:21

On 07/26/2011 06:57 PM, Darren Hart wrote:

On 07/26/2011 10:11 AM, Maarten Lankhorst wrote:
quoted
On 07/26/2011 07:01 PM, Darren Hart wrote:
quoted
On 07/26/2011 04:44 AM, Maarten Lankhorst wrote:
quoted
On 07/26/2011 08:00 AM, Darren Hart wrote:
quoted
On 07/25/2011 03:20 PM, Darren Hart wrote:
quoted
On 07/24/2011 09:12 AM, Thomas Gleixner wrote:
quoted
On Sun, 24 Jul 2011, Maarten Lankhorst wrote:
...
quoted
quoted
Also not sure where this one came from:
[   37.456688] BUG: spinlock bad magic on CPU#3, threaded-ml/1619
[   37.456690]  lock: ffff8801fdc74d50, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   37.456692] Pid: 1619, comm: threaded-ml Tainted: G         C  3.0.0-rt3-patser+ #39
Maarten, I'm finding fairly little out there on what threaded-ml might
be. What I do find suggests 3D visualization and real-time audio
playback. Are you working with something like this? If so, which
libraries are you using? If not, any idea what this is?
threaded ml = from pulseaudio,
src/pulse/thread-mainloop.c to be exact. But like I said it occurs with the functional broadcast test too, on the waker thread.
quoted
quoted
quoted
quoted
quoted
quoted
[   37.456693] Call Trace:
[   37.456697]  [<ffffffff81607a78>] spin_bug+0xa0/0xa8
[   37.456699]  [<ffffffff8132b412>] do_raw_spin_lock+0xa2/0x170
[   37.456702]  [<ffffffff8104a201>] ? get_parent_ip+0x11/0x50
[   37.456704]  [<ffffffff8160d783>] _raw_spin_lock+0x23/0x30
[   37.456706]  [<ffffffff810931ce>] rt_mutex_start_proxy_lock+0x2e/0xd0
[   37.456708]  [<ffffffff8109093a>] futex_requeue+0x47a/0x850
[   37.456710]  [<ffffffff8109138e>] do_futex+0xae/0xb00
Maarten, could you provide the addr2line of the addresses from do_futex
to spin_bug ? This will help me trace the path.
decodes to:
linux/lib/spinlock_debug.c:72
linux/lib/spinlock_debug.c:79
linux/kernel/sched.c:4114
linux/kernel/spinlock.c:141
linux/kernel/rtmutex.c:100
linux/kernel/futex.c:1378
linux/kernel/futex.c:2662

OK, so we're entering with a FUTEX_CMP_REQUEUE op (not FUTEX_CMP_REQUEUE_PI),
and land inside an "if (requeue_pi)" block in the futex_requeue() function -
that should never happen. The interesting thing about this is pulse is only
using the non PI pthread_cond calls, and thus FUTEX_CMP_REQUEUE,
(http://gitorious.org/~elmarco/pulseaudio/pa-work/blobs/1ca76031092ab07682843fd70607696f6af7216f/src/pulsecore/mutex-posix.c). I have not been able reproduce this path.

My best guess at the moment is that we are somehow stomping on the requeue_pi
value causing the waker to enter the wrong code paths. A simple test would be to
print the value of requeue_pi throughout futex_requeue() and see if it changes
(it shouldn't) and if it is something other than 0 or 1 (which it should never
be). Are you able to reliably reproduce the pulse audio failure?

The futex_requeue_pi test is of course using FUTEX_CMP_REQUEUE_PI, and it will
reproduce a similar path (except via the FUTEX_CMP_REQUEUE_PI demux path as it
should be) on the first time run, as Maarten observed. I have seen this with
and without the -b (broadcast) option to the test.

I was able to reproduce this on my system by adding the following to my config:
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_PI_LIST=y
+CONFIG_DEBUG_SPINLOCK=y

With a similar config, this does not occur on 2.6.33.9-rt31. Nothing jumps out
as obviously wrong in the futex delta from 33-rt to now.

I tried with 3.0.0 (non rt) with a similar .config and the problem is not
reproducible. I'll continue to try and isolate the problem, focusing mainly on
the futex delta from 3.0.0. Right after I get the kids to bed...

I believe this is now fixed with:

https://lkml.org/lkml/2011/7/27/74


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Re: [ANNOUNCE] 3.0-rt3

From: Sebastian Ohl <hidden>
Date: 2011-07-27 17:00:51

Hey folks,

i just tried to compile the new rt patch and i was wondering why i
cannot select 4GB or 64GB of memory if i am selecting full preemption?
in my old rt kernel (2.6.33.1) this hasn't been a problem.

what are the implications if i am using only the basic RT option?

Regards
 Sebastian Ohl

-- 
Dipl.-Inform. Sebastian Ohl
Institut für Regelungstechnik     | Tel.(BS): (0531) 391-3824
Lehrstuhl für el. Fahrzeugsysteme | Tel.(WOB): (0531) 391-63057
TU Braunschweig                   | Fax: (0531) 391-5194
http://www.ifr.ing.tu-bs.de       | Email: ohl@ifr.ing.tu-bs.de

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

RE: [ANNOUNCE] 3.0-rt3

From: N, Mugunthan V <hidden>
Date: 2011-07-27 18:05:40

Hi RT Folks

I am testing 3.0-rt3 on AM3517 - Arm Cortex A8. As the kernel from the
mainline is not booting I am using a patch to boot AM3517 kernel on top of
the mainline kernel. Its crashing when I start hackbench and cyclictest.

There were two warnings while starting the test and then the kernel crashes.
Attaching the patch and the rt-config file.

[  266.001220] BUG: sleeping function called from invalid context at
kernel/rtmutex.c:645
[  266.001251] in_atomic(): 1, irqs_disabled(): 0, pid: 3, name: ksoftirqd/0
[  266.001281] 1 lock held by ksoftirqd/0/3:
[  266.001281]  #0:  (cpu_asid_lock){+.+...}, at: [<c006acfc>]
__new_context+0x14/0xbc
[  266.001403] [<c0065f40>] (unwind_backtrace+0x0/0xf8) from [<c0466c80>]
(rt_spin_lock+0x24/0x5c)
[  266.001434] [<c0466c80>] (rt_spin_lock+0x24/0x5c) from [<c006aca8>]
(set_mm_context+0x1c/0x5c)
[  266.001464] [<c006aca8>] (set_mm_context+0x1c/0x5c) from [<c006ad3c>]
(__new_context+0x54/0xbc)
[  266.001495] [<c006ad3c>] (__new_context+0x54/0xbc) from [<c0464f14>]
(__schedule+0x738/0x818)
[  266.001556] [<c0464f14>] (__schedule+0x738/0x818) from [<c0095408>]
(schedule+0x34/0xac)
[  266.001586] [<c0095408>] (schedule+0x34/0xac) from [<c046569c>]
(schedule_preempt_disabled+0x14/0x20)
[  266.001647] [<c046569c>] (schedule_preempt_disabled+0x14/0x20) from
[<c00a2a74>] (run_ksoftirqd+0x174/0x194)
[  266.001678] [<c00a2a74>] (run_ksoftirqd+0x174/0x194) from [<c00bc81c>]
(kthread+0x84/0x8c)
[  266.001739] [<c00bc81c>] (kthread+0x84/0x8c) from [<c005fd2c>]
(kernel_thread_exit+0x0/0x8)

[  267.494995] ------------[ cut here ]------------
[  267.495086] WARNING: at kernel/lockdep.c:939 __bfs+0x1f8/0x254()
[  267.495086] Modules linked in:
[  267.495147] [<c0065f40>] (unwind_backtrace+0x0/0xf8) from [<c009b774>]
(warn_slowpath_common+0x4c/0x64)
[  267.495178] [<c009b774>] (warn_slowpath_common+0x4c/0x64) from
[<c009b7a8>] (warn_slowpath_null+0x1c/0x24)
[  267.495208] [<c009b7a8>] (warn_slowpath_null+0x1c/0x24) from
[<c00d0014>] (__bfs+0x1f8/0x254)
[  267.495239] [<c00d0014>] (__bfs+0x1f8/0x254) from [<c00d38bc>]
(check_usage_backwards+0x74/0xfc)
[  267.495269] [<c00d38bc>] (check_usage_backwards+0x74/0xfc) from
[<c00d2990>] (mark_lock+0x20c/0x660)
[  267.495300] [<c00d2990>] (mark_lock+0x20c/0x660) from [<c00d495c>]
(__lock_acquire+0x74c/0x1c84)
[  267.495330] [<c00d495c>] (__lock_acquire+0x74c/0x1c84) from [<c00d64c0>]
(lock_acquire+0x104/0x124)
[  267.495361] [<c00d64c0>] (lock_acquire+0x104/0x124) from [<c046753c>]
(_raw_spin_lock+0x3c/0x4c)
[  267.495422] [<c046753c>] (_raw_spin_lock+0x3c/0x4c) from [<c04665a4>]
(rt_mutex_slowlock+0x28/0x178)
[  267.495452] [<c04665a4>] (rt_mutex_slowlock+0x28/0x178) from
[<c00eb734>] (rcu_boost_kthread+0xd4/0x168)
[  267.495513] [<c00eb734>] (rcu_boost_kthread+0xd4/0x168) from
[<c00bc81c>] (kthread+0x84/0x8c)
[  267.495544] [<c00bc81c>] (kthread+0x84/0x8c) from [<c005fd2c>]
(kernel_thread_exit+0x0/0x8)
[  267.495574] ---[ end trace 000000000000000d ]---

[  267.495605] Unable to handle kernel NULL pointer dereference at virtual
address 00000008
[  267.495605] pgd = c0004000
[  267.495635] [00000008] *pgd=00000000
[  267.495635] Internal error: Oops: 17 [#1] PREEMPT SMP
[  267.495666] Modules linked in:
[  267.495697] CPU: 0    Tainted: G        W
(3.0.0-rt3-00001-gcd4001e-dirty #6)
[  267.495697] PC is at __bfs+0x118/0x254
[  267.495727] LR is at warn_slowpath_null+0x1c/0x24
[  267.495758] pc : [<c00cff34>]    lr : [<c009b7a8>]    psr: 60000093
[  267.495758] sp : cf84bce8  ip : 00000000  fp : cf84bcfc
[  267.495788] r10: 00004954  r9 : 00004958  r8 : c056c688
[  267.495788] r7 : c8df6be0  r6 : c0948b20  r5 : c06f3258  r4 : 00000000
[  267.495819] r3 : c094cb10  r2 : 00000200  r1 : c068ee10  r0 : 00000000
[  267.495819] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment kernel
[  267.495849] Control: 10c5387d  Table: 8df68019  DAC: 00000017
[  267.495849] Process rcub0 (pid: 10, stack limit = 0xcf84a2f8)
[  267.495880] Stack: (0xcf84bce8 to 0xcf84c000)
[  267.495910] bce0:                   cf84bff8 cf84bd54 c00cfd14 00000000
00000000 cf84bd30
[  267.495941] bd00: cf84bd34 00000000 cf84bd30 cf8499d8 cf849520 c056c688
c00d3848 cf84a000
[  267.495941] bd20: c09dc8d0 c00d38bc 00000000 c00626a8 00000000 00000000
c06f3160 c005fd2c
[  267.495971] bd40: c005fd2c c06f31a0 00000000 00000000 00000000 c06f31a0
00000004 00000000
[  267.496002] bd60: 00000002 cf8499d8 cf849520 c00d2990 00000008 cf849520
00000000 cf849520
[  267.496032] bd80: 00000000 cf8499d8 cf84bf38 3c3be3df 00000000 c00d495c
00000093 00000000
[  267.496063] bda0: cf84a000 00000000 00000000 00000000 cf84a000 cf84a000
00000000 3c3be3de
[  267.496063] bdc0: 60000013 c0664ffc 00000000 cf849520 00000001 00000000
00000000 c046a3b0
[  267.496093] bde0: 00000000 c008b7a4 00000000 cf849520 00000010 cf849520
00000000 cf8499d8
[  267.496124] be00: c0666814 0000002a 00000000 c00d4670 cf849520 c0090bb8
00000001 00000000
[  267.496154] be20: cf84a000 00000000 00000000 00000000 60000013 cf84bf38
00000002 c00d64c0
[  267.496185] be40: 00000002 00000000 00000000 c04665a4 00000000 00000001
ffffffff 00000000
[  267.496215] be60: cf84bf24 c04665a4 00000001 cf84bf24 00000000 a0000013
00000002 c046753c
[  267.496215] be80: 00000002 00000000 c04665a4 cf84a000 ce25cae0 c0666800
cf84a000 c04665a4
[  267.496246] bea0: 00000000 00000000 60000093 00000000 00000002 c00d64c0
00000002 00000080
[  267.496276] bec0: 00000000 c00eb778 00000000 c0052520 c0052520 00000000
c0666800 c00eb778
[  267.496307] bee0: a0000013 00000000 cf849520 00000000 cf84a000 00000000
cf84bf0c ce25cae0
[  267.496337] bf00: c0666800 cf84a000 00000001 00000000 00000000 a0000013
cf84bf24 c00eb734
[  267.496337] bf20: c0052520 cf84995c cf849520 c04677a8 c0df0520 c00eb660
00000000 c00d3160
[  267.496368] bf40: cf84a000 00000001 cf84bf48 cf84bf48 ce25cae0 c0666800
c00eb660 cf84bf8c
[  267.496398] bf60: cf82fec8 c0666800 c00eb660 00000000 00000000 00000000
00000000 c00bc81c
[  267.496429] bf80: cf84a000 00000000 c0666800 00000000 00000000 c005ed18
dead4ead ffffffff
[  267.496459] bfa0: ffffffff c06a1120 00000000 00000000 c0569f74 cf84bfb4
cf84bfb4 00000000
[  267.496490] bfc0: cf82fec8 c00bc798 c06a1104 00000000 00000000 c0575564
cf84bfd8 cf84bfd8
[  267.496490] bfe0: 00000000 cf82fec8 c00bc798 c005fd2c 00000013 c005fd2c
fc9cff55 b687ef0f
[  267.496551] [<c00cff34>] (__bfs+0x118/0x254) from [<c00d38bc>]
(check_usage_backwards+0x74/0xfc)
[  267.496582] [<c00d38bc>] (check_usage_backwards+0x74/0xfc) from
[<c00d2990>] (mark_lock+0x20c/0x660)
[  267.496582] [<c00d2990>] (mark_lock+0x20c/0x660) from [<c00d495c>]
(__lock_acquire+0x74c/0x1c84)
[  267.496612] [<c00d495c>] (__lock_acquire+0x74c/0x1c84) from [<c00d64c0>]
(lock_acquire+0x104/0x124)
[  267.496643] [<c00d64c0>] (lock_acquire+0x104/0x124) from [<c046753c>]
(_raw_spin_lock+0x3c/0x4c)
[  267.496673] [<c046753c>] (_raw_spin_lock+0x3c/0x4c) from [<c04665a4>]
(rt_mutex_slowlock+0x28/0x178)
[  267.496734] [<c04665a4>] (rt_mutex_slowlock+0x28/0x178) from
[<c00eb734>] (rcu_boost_kthread+0xd4/0x168)
[  267.496765] [<c00eb734>] (rcu_boost_kthread+0xd4/0x168) from
[<c00bc81c>] (kthread+0x84/0x8c)
[  267.496795] [<c00bc81c>] (kthread+0x84/0x8c) from [<c005fd2c>]
(kernel_thread_exit+0x0/0x8)
[  267.496826] Code: e0837182 e1570001 2a000035 e59f3114 (e5941008)

---
Regards,
Mugunthan V N.

-----Original Message-----
From: linux-rt-users-owner@vger.kernel.org [mailto:linux-rt-users-owner@vger.kernel.org] On Behalf Of Thomas Gleixner
Sent: Sunday, July 24, 2011 4:04 PM
To: LKML
Cc: linux-rt-users
Subject: [ANNOUNCE] 3.0-rt3

Dear RT Folks,

I'm pleased to announce the 3.0-rt3 release.

Changes versus 3.0-rt2:

  * Fix earlyprintk really

  * AMD NB fix for allocation in smp function call, reported by Ed

  * Disabled a few config options on RT which have known issues

Patch against 3.0 can be found here:

  http://www.kernel.org/pub/linux/kernel/projects/rt/patch-3.0-rt3.patch.bz2

The split quilt queue is available at:

  http://www.kernel.org/pub/linux/kernel/projects/rt/patches-3.0-rt3.tar.bz2

Delta patch below.

Thanks,

        tglx
----
 arch/x86/include/asm/amd_nb.h         |    6 +
 arch/x86/kernel/cpu/intel_cacheinfo.c |  121 +++++++++++-----------------------
 arch/x86/kernel/early_printk.c        |    2
 drivers/net/Kconfig                   |    1
 localversion-rt                       |    2
 mm/Kconfig                            |    2
 6 files changed, 51 insertions(+), 83 deletions(-)

Index: linux-2.6/arch/x86/kernel/early_printk.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/early_printk.c
+++ linux-2.6/arch/x86/kernel/early_printk.c
@@ -171,7 +171,7 @@ static struct console early_serial_conso

 static inline void early_console_register(struct console *con, int keep_early)
 {
-       if (early_console->index != -1) {
+       if (con->index != -1) {
                printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n",
                       con->name);
                return;
Index: linux-2.6/localversion-rt
===================================================================
--- linux-2.6.orig/localversion-rt
+++ linux-2.6/localversion-rt
@@ -1 +1 @@
--rt2
+-rt3
Index: linux-2.6/arch/x86/kernel/cpu/intel_cacheinfo.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ linux-2.6/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -151,28 +151,17 @@ union _cpuid4_leaf_ecx {
        u32 full;
 };

-struct amd_l3_cache {
-       struct   amd_northbridge *nb;
-       unsigned indices;
-       u8       subcaches[4];
-};
-
-struct _cpuid4_info {
+struct _cpuid4_info_regs {
        union _cpuid4_leaf_eax eax;
        union _cpuid4_leaf_ebx ebx;
        union _cpuid4_leaf_ecx ecx;
        unsigned long size;
-       struct amd_l3_cache *l3;
-       DECLARE_BITMAP(shared_cpu_map, NR_CPUS);
+       struct amd_northbridge *nb;
 };

-/* subset of above _cpuid4_info w/o shared_cpu_map */
-struct _cpuid4_info_regs {
-       union _cpuid4_leaf_eax eax;
-       union _cpuid4_leaf_ebx ebx;
-       union _cpuid4_leaf_ecx ecx;
-       unsigned long size;
-       struct amd_l3_cache *l3;
+struct _cpuid4_info {
+       struct _cpuid4_info_regs base;
+       DECLARE_BITMAP(shared_cpu_map, NR_CPUS);
 };

 unsigned short                 num_cache_leaves;
@@ -314,12 +303,13 @@ struct _cache_attr {
 /*
  * L3 cache descriptors
  */
-static void __cpuinit amd_calc_l3_indices(struct amd_l3_cache *l3)
+static void __cpuinit amd_calc_l3_indices(struct amd_northbridge *nb)
 {
+       struct amd_l3_cache *l3 = &nb->l3_cache;
        unsigned int sc0, sc1, sc2, sc3;
        u32 val = 0;

-       pci_read_config_dword(l3->nb->misc, 0x1C4, &val);
+       pci_read_config_dword(nb->misc, 0x1C4, &val);

        /* calculate subcache sizes */
        l3->subcaches[0] = sc0 = !(val & BIT(0));
@@ -333,33 +323,16 @@ static void __cpuinit amd_calc_l3_indice
 static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf,
                                        int index)
 {
-       static struct amd_l3_cache *__cpuinitdata l3_caches;
        int node;

        /* only for L3, and not in virtualized environments */
-       if (index < 3 || amd_nb_num() == 0)
+       if (index < 3)
                return;

-       /*
-        * Strictly speaking, the amount in @size below is leaked since it is
-        * never freed but this is done only on shutdown so it doesn't matter.
-        */
-       if (!l3_caches) {
-               int size = amd_nb_num() * sizeof(struct amd_l3_cache);
-
-               l3_caches = kzalloc(size, GFP_ATOMIC);
-               if (!l3_caches)
-                       return;
-       }
-
        node = amd_get_nb_id(smp_processor_id());
-
-       if (!l3_caches[node].nb) {
-               l3_caches[node].nb = node_to_amd_nb(node);
-               amd_calc_l3_indices(&l3_caches[node]);
-       }
-
-       this_leaf->l3 = &l3_caches[node];
+       this_leaf->nb = node_to_amd_nb(node);
+       if (this_leaf->nb && !this_leaf->nb->l3_cache.indices)
+               amd_calc_l3_indices(this_leaf->nb);
 }

 /*
@@ -369,11 +342,11 @@ static void __cpuinit amd_init_l3_cache(
  *
  * @returns: the disabled index if used or negative value if slot free.
  */
-int amd_get_l3_disable_slot(struct amd_l3_cache *l3, unsigned slot)
+int amd_get_l3_disable_slot(struct amd_northbridge *nb, unsigned slot)
 {
        unsigned int reg = 0;

-       pci_read_config_dword(l3->nb->misc, 0x1BC + slot * 4, &reg);
+       pci_read_config_dword(nb->misc, 0x1BC + slot * 4, &reg);

        /* check whether this slot is activated already */
        if (reg & (3UL << 30))
@@ -387,11 +360,10 @@ static ssize_t show_cache_disable(struct
 {
        int index;

-       if (!this_leaf->l3 ||
-           !amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
+       if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
                return -EINVAL;

-       index = amd_get_l3_disable_slot(this_leaf->l3, slot);
+       index = amd_get_l3_disable_slot(this_leaf->base.nb, slot);
        if (index >= 0)
                return sprintf(buf, "%d\n", index);
@@ -408,7 +380,7 @@ show_cache_disable_##slot(struct _cpuid4
 SHOW_CACHE_DISABLE(0)
 SHOW_CACHE_DISABLE(1)

-static void amd_l3_disable_index(struct amd_l3_cache *l3, int cpu,
+static void amd_l3_disable_index(struct amd_northbridge *nb, int cpu,
                                 unsigned slot, unsigned long idx)
 {
        int i;
@@ -421,10 +393,10 @@ static void amd_l3_disable_index(struct
        for (i = 0; i < 4; i++) {
                u32 reg = idx | (i << 20);

-               if (!l3->subcaches[i])
+               if (!nb->l3_cache.subcaches[i])
                        continue;

-               pci_write_config_dword(l3->nb->misc, 0x1BC + slot * 4, reg);
+               pci_write_config_dword(nb->misc, 0x1BC + slot * 4, reg);

                /*
                 * We need to WBINVD on a core on the node containing the L3
@@ -434,7 +406,7 @@ static void amd_l3_disable_index(struct
                wbinvd_on_cpu(cpu);

                reg |= BIT(31);
-               pci_write_config_dword(l3->nb->misc, 0x1BC + slot * 4, reg);
+               pci_write_config_dword(nb->misc, 0x1BC + slot * 4, reg);
        }
 }
@@ -448,24 +420,24 @@ static void amd_l3_disable_index(struct
  *
  * @return: 0 on success, error status on failure
  */
-int amd_set_l3_disable_slot(struct amd_l3_cache *l3, int cpu, unsigned slot,
+int amd_set_l3_disable_slot(struct amd_northbridge *nb, int cpu, unsigned slot,
                            unsigned long index)
 {
        int ret = 0;

        /*  check if @slot is already used or the index is already disabled */
-       ret = amd_get_l3_disable_slot(l3, slot);
+       ret = amd_get_l3_disable_slot(nb, slot);
        if (ret >= 0)
                return -EINVAL;

-       if (index > l3->indices)
+       if (index > nb->l3_cache.indices)
                return -EINVAL;

        /* check whether the other slot has disabled the same index already */
-       if (index == amd_get_l3_disable_slot(l3, !slot))
+       if (index == amd_get_l3_disable_slot(nb, !slot))
                return -EINVAL;

-       amd_l3_disable_index(l3, cpu, slot, index);
+       amd_l3_disable_index(nb, cpu, slot, index);

        return 0;
 }
@@ -480,8 +452,7 @@ static ssize_t store_cache_disable(struc
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;

-       if (!this_leaf->l3 ||
-           !amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
+       if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
                return -EINVAL;

        cpu = cpumask_first(to_cpumask(this_leaf->shared_cpu_map));
@@ -489,7 +460,7 @@ static ssize_t store_cache_disable(struc
        if (strict_strtoul(buf, 10, &val) < 0)
                return -EINVAL;

-       err = amd_set_l3_disable_slot(this_leaf->l3, cpu, slot, val);
+       err = amd_set_l3_disable_slot(this_leaf->base.nb, cpu, slot, val);
        if (err) {
                if (err == -EEXIST)
                        printk(KERN_WARNING "L3 disable slot %d in use!\n",
@@ -518,7 +489,7 @@ static struct _cache_attr cache_disable_
 static ssize_t
 show_subcaches(struct _cpuid4_info *this_leaf, char *buf, unsigned int cpu)
 {
-       if (!this_leaf->l3 || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
+       if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
                return -EINVAL;

        return sprintf(buf, "%x\n", amd_get_subcaches(cpu));
@@ -533,7 +504,7 @@ store_subcaches(struct _cpuid4_info *thi
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;

-       if (!this_leaf->l3 || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
+       if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
                return -EINVAL;

        if (strict_strtoul(buf, 16, &val) < 0)
@@ -769,7 +740,7 @@ static void __cpuinit cache_shared_cpu_m
                return;
        }
        this_leaf = CPUID4_INFO_IDX(cpu, index);
-       num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing;
+       num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing;

        if (num_threads_sharing == 1)
                cpumask_set_cpu(cpu, to_cpumask(this_leaf->shared_cpu_map));
@@ -820,29 +791,19 @@ static void __cpuinit free_cache_attribu
        for (i = 0; i < num_cache_leaves; i++)
                cache_remove_shared_cpu_map(cpu, i);

-       kfree(per_cpu(ici_cpuid4_info, cpu)->l3);
        kfree(per_cpu(ici_cpuid4_info, cpu));
        per_cpu(ici_cpuid4_info, cpu) = NULL;
 }

-static int
-__cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf)
-{
-       struct _cpuid4_info_regs *leaf_regs =
-               (struct _cpuid4_info_regs *)this_leaf;
-
-       return cpuid4_cache_lookup_regs(index, leaf_regs);
-}
-
 static void __cpuinit get_cpu_leaves(void *_retval)
 {
        int j, *retval = _retval, cpu = smp_processor_id();

        /* Do cpuid and store the results */
        for (j = 0; j < num_cache_leaves; j++) {
-               struct _cpuid4_info *this_leaf;
-               this_leaf = CPUID4_INFO_IDX(cpu, j);
-               *retval = cpuid4_cache_lookup(j, this_leaf);
+               struct _cpuid4_info *this_leaf = CPUID4_INFO_IDX(cpu, j);
+
+               *retval = cpuid4_cache_lookup_regs(j, &this_leaf->base);
                if (unlikely(*retval < 0)) {
                        int i;
@@ -900,16 +861,16 @@ static ssize_t show_##file_name(struct _
        return sprintf(buf, "%lu\n", (unsigned long)this_leaf->object + val); \
 }

-show_one_plus(level, eax.split.level, 0);
-show_one_plus(coherency_line_size, ebx.split.coherency_line_size, 1);
-show_one_plus(physical_line_partition, ebx.split.physical_line_partition, 1);
-show_one_plus(ways_of_associativity, ebx.split.ways_of_associativity, 1);
-show_one_plus(number_of_sets, ecx.split.number_of_sets, 1);
+show_one_plus(level, base.eax.split.level, 0);
+show_one_plus(coherency_line_size, base.ebx.split.coherency_line_size, 1);
+show_one_plus(physical_line_partition, base.ebx.split.physical_line_partition, 1);
+show_one_plus(ways_of_associativity, base.ebx.split.ways_of_associativity, 1);
+show_one_plus(number_of_sets, base.ecx.split.number_of_sets, 1);

 static ssize_t show_size(struct _cpuid4_info *this_leaf, char *buf,
                         unsigned int cpu)
 {
-       return sprintf(buf, "%luK\n", this_leaf->size / 1024);
+       return sprintf(buf, "%luK\n", this_leaf->base.size / 1024);
 }

 static ssize_t show_shared_cpu_map_func(struct _cpuid4_info *this_leaf,
@@ -946,7 +907,7 @@ static inline ssize_t show_shared_cpu_li
 static ssize_t show_type(struct _cpuid4_info *this_leaf, char *buf,
                         unsigned int cpu)
 {
-       switch (this_leaf->eax.split.type) {
+       switch (this_leaf->base.eax.split.type) {
        case CACHE_TYPE_DATA:
                return sprintf(buf, "Data\n");
        case CACHE_TYPE_INST:
@@ -1135,7 +1096,7 @@ static int __cpuinit cache_add_dev(struc

                ktype_cache.default_attrs = default_attrs;
 #ifdef CONFIG_AMD_NB
-               if (this_leaf->l3)
+               if (this_leaf->base.nb)
                        ktype_cache.default_attrs = amd_l3_attrs();
 #endif
                retval = kobject_init_and_add(&(this_object->kobj),
Index: linux-2.6/arch/x86/include/asm/amd_nb.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/amd_nb.h
+++ linux-2.6/arch/x86/include/asm/amd_nb.h
@@ -19,9 +19,15 @@ extern int amd_numa_init(void);
 extern int amd_get_subcaches(int);
 extern int amd_set_subcaches(int, int);

+struct amd_l3_cache {
+       unsigned indices;
+       u8       subcaches[4];
+};
+
 struct amd_northbridge {
        struct pci_dev *misc;
        struct pci_dev *link;
+       struct amd_l3_cache l3_cache;
 };

 struct amd_northbridge_info {
Index: linux-2.6/drivers/net/Kconfig
===================================================================
--- linux-2.6.orig/drivers/net/Kconfig
+++ linux-2.6/drivers/net/Kconfig
@@ -3410,6 +3410,7 @@ config NET_FC

 config NETCONSOLE
        tristate "Network console logging support"
+       depends on !PREEMPT_RT_FULL
        ---help---
        If you want to log kernel messages over the network, enable this.
        See <file:Documentation/networking/netconsole.txt> for details.
Index: linux-2.6/mm/Kconfig
===================================================================
--- linux-2.6.orig/mm/Kconfig
+++ linux-2.6/mm/Kconfig
@@ -304,7 +304,7 @@ config NOMMU_INITIAL_TRIM_EXCESS

 config TRANSPARENT_HUGEPAGE
        bool "Transparent Hugepage Support"
-       depends on X86 && MMU
+       depends on X86 && MMU && !PREEMPT_RT_FULL
        select COMPACTION
        help
          Transparent Hugepages allows the kernel to use huge pages and
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

RE: [ANNOUNCE] 3.0-rt3

From: Thomas Gleixner <hidden>
Date: 2011-07-27 18:32:44

On Wed, 27 Jul 2011, N, Mugunthan V wrote:

Please do not top post.
I am testing 3.0-rt3 on AM3517 - Arm Cortex A8. As the kernel from the
mainline is not booting I am using a patch to boot AM3517 kernel on top of
the mainline kernel. Its crashing when I start hackbench and cyclictest.

There were two warnings while starting the test and then the kernel crashes.
Attaching the patch and the rt-config file.

[  266.001220] BUG: sleeping function called from invalid context at
kernel/rtmutex.c:645
That should be fixed by the patch below.
[  267.494995] ------------[ cut here ]------------
[  267.495086] WARNING: at kernel/lockdep.c:939 __bfs+0x1f8/0x254()
Could you please disable CONFIG_RCU_BOOST ?

Thanks,

	tglx

Index: linux-2.6/arch/arm/include/asm/mmu.h
===================================================================
--- linux-2.6.orig/arch/arm/include/asm/mmu.h
+++ linux-2.6/arch/arm/include/asm/mmu.h
@@ -6,7 +6,7 @@
 typedef struct {
 #ifdef CONFIG_CPU_HAS_ASID
 	unsigned int id;
-	spinlock_t id_lock;
+	raw_spinlock_t id_lock;
 #endif
 	unsigned int kvm_seq;
 } mm_context_t;
Index: linux-2.6/arch/arm/mm/context.c
===================================================================
--- linux-2.6.orig/arch/arm/mm/context.c
+++ linux-2.6/arch/arm/mm/context.c
@@ -31,7 +31,7 @@ DEFINE_PER_CPU(struct mm_struct *, curre
 void __init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 {
 	mm->context.id = 0;
-	spin_lock_init(&mm->context.id_lock);
+	raw_spin_lock_init(&mm->context.id_lock);
 }
 
 static void flush_context(void)
@@ -58,7 +58,7 @@ static void set_mm_context(struct mm_str
 	 * the broadcast. This function is also called via IPI so the
 	 * mm->context.id_lock has to be IRQ-safe.
 	 */
-	spin_lock_irqsave(&mm->context.id_lock, flags);
+	raw_spin_lock_irqsave(&mm->context.id_lock, flags);
 	if (likely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) {
 		/*
 		 * Old version of ASID found. Set the new one and
@@ -67,7 +67,7 @@ static void set_mm_context(struct mm_str
 		mm->context.id = asid;
 		cpumask_clear(mm_cpumask(mm));
 	}
-	spin_unlock_irqrestore(&mm->context.id_lock, flags);
+	raw_spin_unlock_irqrestore(&mm->context.id_lock, flags);
 
 	/*
 	 * Set the mm_cpumask(mm) bit for the current CPU.

Re: [ANNOUNCE] 3.0-rt3

From: Thomas Gleixner <hidden>
Date: 2011-07-27 21:50:01

On Wed, 27 Jul 2011, Sebastian Ohl wrote:
Hey folks,

i just tried to compile the new rt patch and i was wondering why i
cannot select 4GB or 64GB of memory if i am selecting full preemption?
in my old rt kernel (2.6.33.1) this hasn't been a problem.
As I sadi elsewhere I dropped highmem support for now as the 33-rt
hackery to make it work is just ugly as hell and anything above 4G is
even in mainline a complete disaster.

If possible, just run a 64bit kernel on your machine (you can still
use 32bit userspace) or you have to wait until someone comes up with a
reasonable fix for that problem, unless you are the one tackling it :)

Thanks,

	tglx
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help