Re: [PATCH] Fix Bug messages

Previous thread: ROMFS error reading 0 byte files by Chris Fester on Friday, July 25, 2008 - 12:54 pm. (1 message)

Next thread: [PATCH] sys_paccept definition missing __user annotation by Harvey Harrison on Friday, July 25, 2008 - 1:19 pm. (1 message)
From: Thomas Gleixner
Subject: 2.6.24.7-rt15
Date: Friday, July 25, 2008 - 1:09 pm

We are pleased to announce the 2.6.24.7-rt15 tree, which can be
downloaded from the location:

  http://rt.et.redhat.com/download/

Information on the RT patch can be found at:

  http://rt.wiki.kernel.org/index.php/Main_Page

This is a rather large update on top of 2.6.24.7-rt14:

     - add support for m68knommu (Sebastian Siewior)

       Don't be scared about the size of the patch. It contains a lot
       of changes in the m68knommu code which are on the way to
       upstream already, but we want to make the new -rt arch
       available for testing right away.

     - Various general mainline bugfixes collected by Clark Williams

     - mm fix race in COW logic (Nick Piggin)

     - Various hrtimer/nohz bugfix backports (tglx)

     - command line option to supply the acpi pmtimer port (tglx)

     - rtmutex debug fix (John Stultz)

     - CPU hotplug fixes (Peter Zijlstra)

     - rt rwlock locking fixes (Steven Rostedt)

     - ftrace function pointer fix (Josh Triplett)

     - RCU memory barrier fix (Paul McKenney)

     - scheduler: round robin time slice fix (Miao Xie)

     - frace: preempt trace fix (Steven Rostedt)

     - scheduler: SCHED_FIFO spec violation fix (Peter Zijlstra, Darren Hart)

     - PPC64 fixes (Chirag Jog, Sebastian Dugue)

     - load average calculation fix (Michal Schmidt)

     - ftrace: do not wakeup the waitqueue when interrupts disabled (tglx)

     - ACPI: fix reschedule checks (tglx)

     - smp boot hotplug fix (Peter Zijlstra)

     - scheduler: Fix race of dequeued SCHED_RR task against timer interrupt (tglx)

to build a 2.6.24.7-rt14 tree, the following patches should be applied:

  http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2
  http://kernel.org/pub/linux/kernel/v2.6/patch-2.6.24.7.bz2
  http://rt.et.redhat.com/download/patch-2.6.24.7-rt15.bz2


And like always, Steven's RT version of Matt Mackall's ketchup will get this
for you nicely:

  ...
From: Carsten Emde
Date: Saturday, July 26, 2008 - 4:03 am

Looks like this newest is also our greatest:

Board: Core 2 Duo, 2.4 GHz, Intel G965, 64 bit
Kernel: 2.6.24.7-rt15 prerelease
Config: CONFIG_IRQSOFF_TRACER, CONFIG_PREEMPT_TRACER, CONFIG_FTRACE
Stress: hackbench 25 loop, ls -Ral / loop, flood ping from outside
On-demand cpufreq disabled:
# cd /sys/devices/system/cpu
# echo performance >cpu0/cpufreq/scaling_governor
# echo performance >cpu1/cpufreq/scaling_governor
Test: cyclictest -a -t -n -p99 -i100 -d50
Result:
560.44 586.11 606.12 211/1160 3727
T: 0 (18617) P:99 I:100 C:1011846111 Min:  2 Act:  4 Avg:  5 Max: 39
T: 1 (18618) P:98 I:150 C: 708641019 Min:  2 Act:  5 Avg: 11 Max: 57

While running more than one billion cyclictest loops, the internal
worst-case latency did not exceed 39 microseconds.


Great work, thanks a lot!

	--cbe
--

From: Thomas Gleixner
Subject: 2.6.24.7-rt16
Date: Sunday, July 27, 2008 - 9:16 am

We are pleased to announce the 2.6.24.7-rt16 tree, which can be
downloaded from the location:
 
  http://rt.et.redhat.com/download/

Information on the RT patch can be found at:

  http://rt.wiki.kernel.org/index.php/Main_Page

This is a bugfix update:

     - remove m68knommu merge artifacts (tglx)

     - fix x86_64 UP build (Peter Zijlstra)

     - powerpc ftrace backport (tglx)

     - fix long standing NFS missing preemption check (tglx)

       This is not a MPC5200 specific problem, it affects all
       architectures, but was not noticed for a long time as the race
       window is extremly tight.

to build a 2.6.24.7-rt16 tree, the following patches should be applied:

  http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2
  http://kernel.org/pub/linux/kernel/v2.6/patch-2.6.24.7.bz2
  http://rt.et.redhat.com/download/patch-2.6.24.7-rt16.bz2

And like always, Steven's RT version of Matt Mackall's ketchup will get this
for you nicely:

  http://people.redhat.com/srostedt/rt/tools/ketchup-0.9.8-rt3

As usual the broken out patches are also available.

Thanks,

	tglx
--

From: Avuton Olrich
Date: Sunday, July 27, 2008 - 1:28 pm

Getting a forbidden on this link.
-- 
avuton
--
 "I've got a fever. And the only prescription is more cowbell." --
Christopher Walken
--

From: Thomas Gleixner
Date: Sunday, July 27, 2008 - 1:37 pm

Fixed. Thanks,

       tglx
--

From: Wolfgang Grandegger
Date: Monday, July 28, 2008 - 1:12 am

Hi Thomas,



This fix finally solves my latency issues with the MPC5200, also with 
2.6.25.8-rt7. After 2 hours the latency is still below 150us for both 
versions. Thanks a lot for your effort.

Wolfgang.


--

From: Peter Zijlstra
Date: Monday, July 28, 2008 - 2:48 am

But it seems to be upstream ;-)

root@twins:/mnt/build/linux-2.6# find arch/powerpc/ | grep ftrace
arch/powerpc/kernel/ftrace.c


--

From: Wolfgang Grandegger
Date: Monday, July 28, 2008 - 3:12 am

Ah, right. I obviously missed that.

Wolfgang.
--

From: Thomas Gleixner
Date: Tuesday, July 29, 2008 - 5:57 am

We are pleased to announce the 2.6.24.7-rt17 tree, which can be
downloaded from the location:
  
   http://rt.et.redhat.com/download/
 
Information on the RT patch can be found at:

   http://rt.wiki.kernel.org/index.php/Main_Page
 
This is a bugfix update:
 
	- use the correct version of the ppc64 percpu patch
	  pointed out by Chirag Jog

to build a 2.6.24.7-rt17 tree, the following patches should be applied:

  http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2
  http://kernel.org/pub/linux/kernel/v2.6/patch-2.6.24.7.bz2
  http://rt.et.redhat.com/download/patch-2.6.24.7-rt17.bz2
 
And like always, Steven's RT version of Matt Mackall's ketchup will get this
for you nicely:

  http://people.redhat.com/srostedt/rt/tools/ketchup-0.9.8-rt3

As usual the broken out patches are also available.

Thanks,

	tglx

---

--- patches/series	2008-07-27 11:20:44.000000000 +0200
+++ patches/series	2008-07-29 14:28:39.000000000 +0200
@@ -1105,7 +1105,7 @@
 ftrace-preempt-trace-check.patch
 fix_SCHED_FIFO_spec_violation.patch
 
-ppc64-fix_preempt_unsafe_access_to_per_cpu_variables.patch
+ppc64-fix-preempt-unsafe-paths-accessing-per_cpu-variables.patch
 bz235099-idle-load-fix.patch
 
 raw-spinlocks-for-nmi-print.patch


Index: linux-2.6.24.7/arch/powerpc/mm/tlb_64.c
===================================================================
--- linux-2.6.24.7.orig/arch/powerpc/mm/tlb_64.c
+++ linux-2.6.24.7/arch/powerpc/mm/tlb_64.c
@@ -99,7 +99,6 @@ void pgtable_free_tlb(struct mmu_gather 
 	    cpus_equal(tlb->mm->cpu_vm_mask, local_cpumask)) {
 		pgtable_free(pgf);
 		goto cleanup;
-		return;
 	}
 
 	if (*batchp == NULL) {
@@ -107,7 +106,6 @@ void pgtable_free_tlb(struct mmu_gather 
 		if (*batchp == NULL) {
 			pgtable_free_now(pgf);
 			goto cleanup;
-			return;
 		}
 		(*batchp)->index = 0;
 	}
@@ -261,6 +259,7 @@ void pte_free_finish(void)
 		pte_free_submit(*batchp);
 		*batchp = NULL;
 	}
+
 	put_cpu_var_locked(pte_freelist_cur, cpu);
 }
 ...
From: Thomas Gleixner
Subject: 2.6.26-rt1
Date: Tuesday, July 29, 2008 - 3:21 pm

We are pleased to announce the 2.6.26-rt1 tree, which can be
downloaded from the location:
  
   http://rt.et.redhat.com/download/

Information on the RT patch can be found at:

   http://rt.wiki.kernel.org/index.php/Main_Page

The merge was mostly done by Steven Rostedt, I just fixed it up, added
the fixes from .24-rt17 and tested it on x86 32/64bit.

This is the first cut of .26-rt, so don't expect it to be perfect.

I run out of time, so I dropped Peter's cpu-hotplug patches
completely. The hotplug and rcupreempt code has changed radically, so
we need to redo that lot. Peter, Paul can you please look into that ?

I tried to address the non-x86 issues as far as I could, but I had no
chance to compile test them. So please check the wreckage.

to build a 2.6.26-rt1 tree, the following patches should be applied:
 
   http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2
   http://rt.et.redhat.com/download/patch-2.6.26-rt1.bz2
  
And like always, Steven's RT version of Matt Mackall's ketchup will get this
for you nicely:

  http://people.redhat.com/srostedt/rt/tools/ketchup-0.9.8-rt3

As usual the broken out patches are also available.

I'm going on vacation tomorrow so feel free to blame/curse/flame me,
but please work with Steven to get it into shape.

Thanks,

	tglx
--

From: Jürgen Mell
Date: Wednesday, July 30, 2008 - 2:01 am

Hello Thomas,


I have tried the new kernel and have some good news and some bad news:

The good news: The machine boots and seems to run without major problems.

The bad news: It produces continuously lots of bug messages in the error=20
logs (cf. attached dmesg.tgz). The error at rtmutex.c:743 was already=20
present in 2.6.25-rt* when ACPI was enabled. The 'using smp_processor_id=20
()  in preemptible code' is new here with 2.6.26.

Machine is an old Athlon XP (single core) on an EPOX mainboard with VIA=20
chipset.

If I can help with testing, please let me know.

Bye,
         J=FCrgen


From: Chirag Jog
Date: Wednesday, July 30, 2008 - 10:18 am

This patch should solve some of the bug messages.
It does two things:
1. Change rt_runtime_lock to be a raw spinlock as the comment above it
says: it is nested inside the rq lock.

2. Change mnt_writers to be a per_cpu locked variable.
This eliminates the need for the codepath to disable preemption and
then potentially sleep, leading to the BUG messages

Signed-Off-By: Chirag <chirag@linux.vnet.ibm.com>



Index: linux-2.6.26-rt1/kernel/sched.c
===================================================================
--- linux-2.6.26-rt1.orig/kernel/sched.c	2008-07-30 22:37:19.000000000 +0530
+++ linux-2.6.26-rt1/kernel/sched.c	2008-07-30 22:37:24.000000000 +0530
@@ -208,7 +208,7 @@
 
 struct rt_bandwidth {
 	/* nests inside the rq lock: */
-	spinlock_t		rt_runtime_lock;
+	raw_spinlock_t		rt_runtime_lock;
 	ktime_t			rt_period;
 	u64			rt_runtime;
 	struct hrtimer		rt_period_timer;
@@ -472,7 +472,7 @@
 	u64 rt_time;
 	u64 rt_runtime;
 	/* Nests inside the rq lock: */
-	spinlock_t rt_runtime_lock;
+	raw_spinlock_t rt_runtime_lock;
 
 #ifdef CONFIG_RT_GROUP_SCHED
 	unsigned long rt_nr_boosted;
Index: linux-2.6.26-rt1/fs/namespace.c
===================================================================
--- linux-2.6.26-rt1.orig/fs/namespace.c	2008-07-30 22:39:30.000000000 +0530
+++ linux-2.6.26-rt1/fs/namespace.c	2008-07-30 22:39:36.000000000 +0530
@@ -178,13 +178,13 @@
 	unsigned long count;
 	struct vfsmount *mnt;
 } ____cacheline_aligned_in_smp;
-static DEFINE_PER_CPU(struct mnt_writer, mnt_writers);
+static DEFINE_PER_CPU_LOCKED(struct mnt_writer, mnt_writers);
 
 static int __init init_mnt_writers(void)
 {
 	int cpu;
 	for_each_possible_cpu(cpu) {
-		struct mnt_writer *writer = &per_cpu(mnt_writers, cpu);
+		struct mnt_writer *writer = &per_cpu_var_locked(mnt_writers, cpu);
 		spin_lock_init(&writer->lock);
 		lockdep_set_class(&writer->lock, &writer->lock_class);
 		writer->count = 0;
@@ -199,7 +199,7 @@
 	struct mnt_writer *cpu_writer;
 
 ...
From: Jürgen Mell
Date: Wednesday, July 30, 2008 - 1:16 pm

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

Yes, the number of bug messages is reduced very much by this patch,=20
although both messages are still present in the log (cf. attached dmesg).=20
But with the patch they only occur sporadically after the system has=20
completed start-up and no longer continuously. Thanks a lot!

Bye,
           J=FCrgen
From: Peter Zijlstra
Date: Wednesday, July 30, 2008 - 11:06 pm

From: Sebastien Dugue
Date: Thursday, July 31, 2008 - 1:00 am

Neat, the only remaining BUGs I see are from sock_prot_inuse_add()

BUG: using smp_processor_id() in preemptible [00000000] code: arping/1916
caller is .sock_prot_inuse_add+0x30/0x80
Call Trace:
[c0000000eed2f910] [c000000000010304] .show_stack+0x70/0x1bc (unreliable)
[c0000000eed2f9c0] [c0000000001a2340] .debug_smp_processor_id+0x138/0x168
[c0000000eed2fa70] [c0000000002181f4] .sock_prot_inuse_add+0x30/0x80
[c0000000eed2fb10] [c00000000026d96c] .udp_lib_get_port+0x2a8/0x320
[c0000000eed2fbc0] [c000000000275b30] .inet_bind+0x168/0x248
[c0000000eed2fc60] [c000000000215024] .sys_bind+0x98/0xdc
[c0000000eed2fd90] [c0000000002370bc] .compat_sys_socketcall+0xcc/0x214
[c0000000eed2fe30] [c0000000000086ac] syscall_exit+0x0/0x40
BUG: arping:1916 task might have lost a preemption check!
Call Trace:
[c0000000eed2f890] [c000000000010304] .show_stack+0x70/0x1bc (unreliable)
[c0000000eed2f940] [c00000000004e298] .preempt_enable_no_resched+0x60/0x78
[c0000000eed2f9c0] [c0000000001a2348] .debug_smp_processor_id+0x140/0x168
[c0000000eed2fa70] [c0000000002181f4] .sock_prot_inuse_add+0x30/0x80
[c0000000eed2fb10] [c00000000026d96c] .udp_lib_get_port+0x2a8/0x320
[c0000000eed2fbc0] [c000000000275b30] .inet_bind+0x168/0x248
[c0000000eed2fc60] [c000000000215024] .sys_bind+0x98/0xdc
[c0000000eed2fd90] [c0000000002370bc] .compat_sys_socketcall+0xcc/0x214
[c0000000eed2fe30] [c0000000000086ac] syscall_exit+0x0/0x40

...

  Thanks,

  Sebastien.


--

From: John Kacur
Date: Thursday, July 31, 2008 - 3:13 am

On Thu, Jul 31, 2008 at 10:00 AM, Sebastien Dugue

Does this simple fix do the trick for you?
From: Sebastien Dugue
Date: Thursday, July 31, 2008 - 4:23 am

Hi John,


  Nope, still the same BUGs, I do not have the net namespaces configured, so the
version of sock_prot_inuse_add() which is used is defined a few lines below:

static DEFINE_PER_CPU(struct prot_inuse, prot_inuse);

void sock_prot_inuse_add(struct net *net, struct proto *prot, int val)
{
	__get_cpu_var(prot_inuse).val[prot->inuse_idx] += val;
}
EXPORT_SYMBOL_GPL(sock_prot_inuse_add);

  Looks like another case of percpu variables Chirag has benn fixing.

  Sebastien.


--

From: John Kacur
Date: Thursday, July 31, 2008 - 6:49 am

On Thu, Jul 31, 2008 at 1:23 PM, Sebastien Dugue
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

Pls withdraw my last patch. Ok, please use with caution, I'm still
testing, but trying to follow Chirag's example, does this patch help
you?
(Let's consider this patch as for review)
From: Peter Zijlstra
Date: Thursday, July 31, 2008 - 7:01 am

This doesn't look good. You declare it as a PER_CPU_LOCKED, but then
never use the extra lock to synchronize data.

Given that sock_proc_inuse_get() is a racy read anyway, the 'right' fix
would be to do something like:

diff --git a/net/core/sock.c b/net/core/sock.c
index 91f8bbc..5a8ace4 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1941,8 +1941,9 @@ static DECLARE_BITMAP(proto_inuse_idx, PROTO_INUSE_NR);
 #ifdef CONFIG_NET_NS
 void sock_prot_inuse_add(struct net *net, struct proto *prot, int val)
 {
-	int cpu = smp_processor_id();
+	int cpu = get_cpu();
 	per_cpu_ptr(net->core.inuse, cpu)->val[prot->inuse_idx] += val;
+	put_cpu();
 }
 EXPORT_SYMBOL_GPL(sock_prot_inuse_add);
 
@@ -1988,7 +1989,9 @@ static DEFINE_PER_CPU(struct prot_inuse, prot_inuse);
 
 void sock_prot_inuse_add(struct net *net, struct proto *prot, int val)
 {
-	__get_cpu_var(prot_inuse).val[prot->inuse_idx] += val;
+	int cpu = get_cpu();
+	per_cpu(prot_inuse, cpu).val[prot->inuse_idx] += val;
+	put_cpu();
 }
 EXPORT_SYMBOL_GPL(sock_prot_inuse_add);
 
This disables preemption, but only for a very short time - so it doesn't
hurt the preempt-latency.

The alternative is to take a lock, do the inc, and drop the lock again,
which is much more expensive.

--

From: John Kacur
Date: Thursday, July 31, 2008 - 7:10 am

Cool, thanks for the quick feedback. What kind of criteria are used to
decide between disabling preemption for a short time, or using the
more expensive lock?
--

From: Peter Zijlstra
Date: Thursday, July 31, 2008 - 7:18 am

Basically total cost of the operation.. in this case the cost of taking
the lock utterly dwarfs the cost of the operation.

And since its Real-Time we're talking about, its the WCET of the
operation that counts.

--

From: Sebastien Dugue
Date: Thursday, July 31, 2008 - 7:35 am

Hi Peter,


  This does indeed seem to fix the problem, no more BUGs appearing
on the console with 2.6.26-rt1 now.

  Thanks,

  Sebastien.


--

From: Clark Williams
Date: Thursday, July 31, 2008 - 8:01 am

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Sebastien,

Would you send me your config? I'm running -rt1 on my laptop and am not seeing any of
the messages you listed earlier. It's bound to be that I turned off something that
you're using, so I'd like to see what that is.

Thank,
Clark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkiR07IACgkQHyuj/+TTEp2LgACfTK3sNyABEtR+BDc29L3DdP/c
KKsAoM0RvuG4EHLyfHJUnfERhXbWuZY4
=1eZ6
-----END PGP SIGNATURE-----
--

From: Sebastien Dugue
Date: Thursday, July 31, 2008 - 8:14 am

Sure, here it is:

 (I'm running on a Power 6 JS22 blade)

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.26-rt1
# Wed Jul 30 16:12:35 2008
#
CONFIG_PPC64=y

#
# Processor support
#
# CONFIG_POWER4_ONLY is not set
CONFIG_POWER3=y
CONFIG_POWER4=y
# CONFIG_TUNE_CELL is not set
CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y
CONFIG_PPC_STD_MMU=y
# CONFIG_PPC_MM_SLICES is not set
CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_SMP=y
CONFIG_NR_CPUS=128
CONFIG_64BIT=y
CONFIG_WORD_SIZE=64
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_IRQ_PER_CPU=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_GENERIC_LOCKBREAK=y
CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_ARCH_HAS_ILOG2_U64=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_ARCH_NO_VIRT_TO_BUS=y
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
CONFIG_COMPAT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_PPC_OF=y
CONFIG_OF=y
CONFIG_PPC_UDBG_16550=y
# CONFIG_GENERIC_TBSYNC is not set
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
# CONFIG_DEFAULT_UIMAGE is not set
# CONFIG_PPC_DCR_NATIVE is not set
# CONFIG_PPC_DCR_MMIO is not set
# CONFIG_PPC_OF_PLATFORM_PCI is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=17
# CONFIG_CGROUPS is not set
# CONFIG_GROUP_SCHED is not ...
From: Paul E. McKenney
Date: Friday, August 1, 2008 - 2:11 pm

The following patch should clear things up.  It is against 2.6.25.8-rt7,
but should still apply.

------------------------------------------------------------------------

Disable preemption around statistics for RCU boost and unboost calls.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---

 rcupreempt-boost.c |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff -urpNa -X dontdiff linux-2.6.25.8-rt7/kernel/rcupreempt-boost.c linux-2.6.25.8-rt7-preemptfix/kernel/rcupreempt-boost.c
--- linux-2.6.25.8-rt7/kernel/rcupreempt-boost.c	2008-06-24 14:14:52.000000000 -0700
+++ linux-2.6.25.8-rt7-preemptfix/kernel/rcupreempt-boost.c	2008-06-24 14:38:59.000000000 -0700
@@ -205,11 +205,23 @@ RCU_BOOST_TRACE_FUNC_DECL(boost_readers)
 RCU_BOOST_TRACE_FUNC_DECL(try_unboost_readers)
 RCU_BOOST_TRACE_FUNC_DECL(unboost_readers)
 RCU_BOOST_TRACE_FUNC_DECL(over_taken)
+static void rcu_trace_boost_boost_called_preempt(void)
+{
+	preempt_disable();
+	rcu_trace_boost_boost_called(RCU_BOOST_ME);
+	preempt_enable();
+}
+static void rcu_trace_boost_unboost_called_preempt(void)
+{
+	preempt_disable();
+	rcu_trace_boost_unboost_called(RCU_BOOST_ME);
+	preempt_enable();
+}
 #else /* CONFIG_RCU_TRACE */
 /* These were created by the above macro "RCU_BOOST_TRACE_FUNC_DECL" */
-# define rcu_trace_boost_task_boost_called(rbd) do { } while (0)
+# define rcu_trace_boost_task_boost_called_preempt(rbd) do { } while (0)
 # define rcu_trace_boost_task_boosted(rbd) do { } while (0)
-# define rcu_trace_boost_boost_called(rbd) do { } while (0)
+# define rcu_trace_boost_boost_called_preempt(rbd) do { } while (0)
 # define rcu_trace_boost_try_boost(rbd) do { } while (0)
 # define rcu_trace_boost_boosted(rbd) do { } while (0)
 # define rcu_trace_boost_unboost_called(rbd) do { } while (0)
@@ -261,7 +273,7 @@ void __rcu_preempt_boost(void)
 
 	WARN_ON(!current->rcu_read_lock_nesting);
 ...
From: Juergen Beisert
Date: Wednesday, August 13, 2008 - 6:30 am

Using this patch on top of 2.6.26-rt1 results into:

[...]
 CC      kernel/rcupreempt-boost.o
kernel/rcupreempt-boost.c: In function 'rcu_boost_task':
kernel/rcupreempt-boost.c:249: error: implicit declaration of function 'rcu_trace_boost_task_boost_called'
kernel/rcupreempt-boost.c: In function '__rcu_preempt_unboost':
kernel/rcupreempt-boost.c:328: error: implicit declaration of function 'rcu_trace_boost_unboost_called_preempt'

when CONFIG_PREEMPT_RCU_BOOST is enabled and target is a PowerPC of
type MPC5200B.

jbe

-- 
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
    Handelsregister: Amtsgericht Hildesheim, HRA 2686
         Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9
--

From: Paul E. McKenney
Date: Wednesday, August 13, 2008 - 9:37 am

Ah, 2.6.26-rt1 took a different approach to fix the issue my patch
was targeted at.  Please accept my apologies for the noise!

The other thing to try would be Chirag Jog's patch sent out to
linux-rt-users on July 30.

						Thanx, Paul
--

From: John Kacur
Date: Wednesday, July 30, 2008 - 7:31 am

Hmnn, I'm getting a build error with this.

drivers/infiniband/hw/ipath/ipath_verbs.c: In function 'sdma_complete':
drivers/infiniband/hw/ipath/ipath_verbs.c:1028: error: size of array
'type name' is negative
drivers/infiniband/hw/ipath/ipath_verbs.c:1028: warning: comparison of
distinct pointer types lacks a cast
drivers/infiniband/hw/ipath/ipath_verbs.c:1035: error: size of array
'type name' is negative
drivers/infiniband/hw/ipath/ipath_verbs.c:1035: warning: comparison of
distinct pointer types lacks a cast
drivers/infiniband/hw/ipath/ipath_verbs.c:1038: error: size of array
'type name' is negative
drivers/infiniband/hw/ipath/ipath_verbs.c:1038: warning: comparison of
distinct pointer types lacks a cast
drivers/infiniband/hw/ipath/ipath_verbs.c:1040: error: size of array
'type name' is negative
drivers/infiniband/hw/ipath/ipath_verbs.c:1040: warning: comparison of
distinct pointer types lacks a cast
drivers/infiniband/hw/ipath/ipath_verbs.c: In function 'decrement_dma_busy':
drivers/infiniband/hw/ipath/ipath_verbs.c:1056: error: size of array
'type name' is negative
drivers/infiniband/hw/ipath/ipath_verbs.c:1056: warning: comparison of
distinct pointer types lacks a cast
drivers/infiniband/hw/ipath/ipath_verbs.c:1061: error: size of array
'type name' is negative
drivers/infiniband/hw/ipath/ipath_verbs.c:1061: warning: comparison of
distinct pointer types lacks a cast
drivers/infiniband/hw/ipath/ipath_verbs.c: In function 'ipath_verbs_send_pio':
drivers/infiniband/hw/ipath/ipath_verbs.c:1295: error: size of array
'type name' is negative
drivers/infiniband/hw/ipath/ipath_verbs.c:1295: warning: comparison of
distinct pointer types lacks a cast
drivers/infiniband/hw/ipath/ipath_verbs.c:1297: error: size of array
'type name' is negative
drivers/infiniband/hw/ipath/ipath_verbs.c:1297: warning: comparison of
distinct pointer types lacks a cast
make[3]: *** [drivers/infiniband/hw/ipath/ipath_verbs.o] Error 1
make[2]: *** [drivers/infiniband/hw/ipath] Error 2
make[1]: *** ...
From: Ryan Hope
Date: Wednesday, July 30, 2008 - 7:41 am

I've been running this for a few days now. If I remove all debug
options from kconfig my dmesg is clean. Every thing seems pretty
stable but I have had a few random hardlocks that I can really narrow
down to anything.

-Ryan

--

From: Paul E. McKenney
Date: Friday, August 1, 2008 - 2:11 pm

Hmmm...  Still quite a few RCU-related patches in there.  Here is my
kneejerk reaction on what to do about them:

o	call_rcu_bh-rename-of-call_rcu.patch should go to mainline.

o	rcu-trace-fix-free.patch should go to mainline.

o	rcu-preempt-fix-bad-dyntick-accounting.patch can be dropped
	from -rt without going to mainline.

o	Some of rcu-hrt-fixups.patch needs to go over, some need to
	come back:

	o	__rcu_process_callbacks() change of local_irq_disable()
		to local_irq_save() should go to mainline.

	o	-rt needs to take the change that dropped the parameter
		for softirq functions.

	o	-rt needs to take the change of rcu_process_callbacks()
		to static (both declaration and definition).

	o	-rt needs to take the deletion of rcu_advance_callbacks()

o	rcu-new-7.patch needs to move over (torture preemptable RCU)
	Ditto for rcu-torture-preempt-update.patch.  But not blazingly
	urgent.

o	RCU boosting needs re-implementation, in the works.

o	preempt_realtime_rcu.patch is mostly about raw_spinlock_t.
	Is mainline's raw_spinlock_t compatible with that of -rt?
	If so, this should go to mainline.

o	rcu-preempt-hotplug-hackaround.patch should be able to be
	dropped at some point (maybe even as of 2.6.26?).

Thoughts?

							Thanx, Paul
--

From: Juergen Beisert
Date: Monday, August 11, 2008 - 1:36 am

When CONFIG_GROUP_SCHED is enabled this compile error is back.

[...]
  CC      mm/bootmem.o
In file included from kernel/sched.c:1618:
kernel/sched_rt.c: In function 'inc_rt_tasks':
kernel/sched_rt.c:408: error: 'struct rq' has no member named 'online'

jbe
-- 
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
    Handelsregister: Amtsgericht Hildesheim, HRA 2686
         Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9
--

Previous thread: ROMFS error reading 0 byte files by Chris Fester on Friday, July 25, 2008 - 12:54 pm. (1 message)

Next thread: [PATCH] sys_paccept definition missing __user annotation by Harvey Harrison on Friday, July 25, 2008 - 1:19 pm. (1 message)